Re: [xwiki-devs] [xwiki-users] Howto use mvn xar:format ?
My editor is vi on Linux then I use unix end of line... I launch mvn -e xar:format for the second time and ^M disapeared... (X-files case? :-) ) NB: and the download is not launched at the second time Thxs a lot both. Pascal B De : Eduard Moraru <enygma2002@gmail.com> À : Pascal BASTIEN <pbasnews-xwiki@yahoo.fr>; XWiki Users <users@xwiki.org> Envoyé le : Vendredi 9 janvier 2015 13h50 Objet : Re: [xwiki-users] Howto use mvn xar:format ? On Fri, Jan 9, 2015 at 2:41 PM, Pascal BASTIEN <pbasnews-xwiki@yahoo.fr> wrote: ... erratum The wrong end of line is not on all TagCloud.xml file lines:I must remove them before to commit: with :set ff=unix with vi ? Not sure about this one. I think it might help if you configure your editor to use unix line ending. In any case, I think it does not matter because when you commit on git, the line endings will be converted to unix automatically. Thanks, Eduard <?xml version="1.0" encoding="UTF-8"?> <!--^M * See the NOTICE file distributed with this work for additional^M * information regarding copyright ownership.^M *^M ... <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType> </use> </class> <property> <cache>long</cache> </property> <property> <code>ol.tagCloud {^M text-align: justify;^M /* Overriding of toucan value */^M margin: 0;^M padding: 0;^M }^M ^M div#dashboardleft ol.tagCloud {^M /* We re-set this value here on purpose so that uses of the cloud outside of the dashboard are not affected */^M margin: 0.5em;^M }^M De : Pascal BASTIEN <pbasnews-xwiki@yahoo.fr> À : Thomas Mortagne <thomas.mortagne@xwiki.com>; XWiki Users <users@xwiki.org> Cc : devs XWiki <devs@xwiki.org> Envoyé le : Vendredi 9 janvier 2015 13h30 Objet : Re: [xwiki-users] Howto use mvn xar:format ? Yes you are right, then I found this: http://stackoverflow.com/questions/26973145/maven-build-error-tools-jar-not-... and mvn -e xar:format work well now. ... but I have a strange think with the result: each lines in TagCloud.xml contain (windows'end of line character) ^M on my linux. De : Thomas Mortagne <thomas.mortagne@xwiki.com> À : Pascal BASTIEN <pbasnews-xwiki@yahoo.fr>; XWiki Users <users@xwiki.org> Cc : devs XWiki <devs@xwiki.org> Envoyé le : Vendredi 9 janvier 2015 12h11 Objet : Re: [xwiki-users] Howto use mvn xar:format ? Well you seems to have a Java issue but no idea how you can end up with the build complaining about /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar. What version of Maven are you using ? Most of us (and more importantly the build agents) are still using 3.0.5. On Fri, Jan 9, 2015 at 10:40 AM, Pascal BASTIEN <pbasnews-xwiki@yahoo.fr> wrote:
Hello, To clean and Pull Request my patch I need to launch "mvn xar:format" command but I didn't managed to use it and didn't found a simple documentation about it (notice, I didn't eat a maven book either) I don't want rebuild Xwiki package but I want only check/clean xml file (from XAR) before to pull request it on github. Here my manipulation on my debian testing:- I installed current maven package (3.0.4 version) - I create the conf file ~/.m2/settings.xml provided here: http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven (I'm behind a http proxy, then I add http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingbehindaproxy parameter in ~/.m2/settings.xm)
I download Xwiki source with theses commands:#Only first time cd /home/git-wiki/ git clone https://github.com/XXXX/xwiki-platform.git cd xwiki-platform/ git remote add upstream https://github.com/xwiki/xwiki-platform.git git remote -v
# synchro before modify cd /home/git-wiki/xwiki-platform/ git fetch upstream git checkout master git merge upstream/master #branch creation and modif of files git checkout -B XWIKI-MaBranche vi /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui/src/main/resources/XWiki/TagCloud.xm
Here my problems, I want to check TagCloud.xm with mvn xar:format:cd /home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui mvn -e xar:formatI obtain the insanity that I paste at the end of this mail! To resume, howto check my tiny improvment with mvn xar:format?In the same time, I want to avoid maven download the entire world each time I launch it :-))
Thxs for yor help. Pascal B ***************************** root@buttle:/home/git-wiki/xwiki-platform/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-ui# mvn -e xar:format [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building XWiki Platform - Tag - UI 6.4-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.962s [INFO] Finished at: Fri Jan 09 10:24:42 CET 2015 [INFO] Final Memory: 19M/228M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project xwiki-platform-tag-ui: Could not resolve dependencies for project org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project xwiki-platform-tag-ui: Could not resolve dependencies for project org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.xwiki.platform:xwiki-platform-tag-ui:xar:6.4-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185) ... 22 more Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375) at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183) ... 23 more Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358) ... 24 more Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact com.sun:tools:jar:1.5.0 at specified path /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:256) ... 26 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcepti...
*******************If I launch mvn -e xar:format from a directory without pom.xml file: [ERROR] No plugin found for prefix 'xar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), xwiki-plugins-snapshots (http://nexus.xwiki.org/nexus/content/groups/public-snapshots), xwiki-plugins-releases (http://nexus.xwiki.org/nexus/content/groups/public), central (http://repo.maven.apache.org/maven2)] -> [Help 1] org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'xar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), xwiki-plugins-snapshots (http://nexus.xwiki.org/nexus/content/groups/public-snapshots), xwiki-plugins-releases (http://nexus.xwiki.org/nexus/content/groups/public), central (http://repo.maven.apache.org/maven2)]
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On 01/09/2015 02:11 PM, Pascal BASTIEN wrote:
My editor is vi on Linux then I use unix end of line...
I launch mvn -e xar:format for the second time and ^M disapeared... (X-files case? :-) )
Same here. Usually I run "mvn xar:format" twice before commiting. The first run fixes the indentation, comment headers, etc, but adds these ^M line endings (it might convert present in the *.xml file from the original XAR export) and the second one keeps the formatting and removes the ^M ... I guess that should be done in one run, too, but I have not bothered to check out the formatter code how todo it. Clemens
NB: and the download is not launched at the second time
Thxs a lot both. Pascal B De : Eduard Moraru <enygma2002@gmail.com> À : Pascal BASTIEN <pbasnews-xwiki@yahoo.fr>; XWiki Users <users@xwiki.org> Envoyé le : Vendredi 9 janvier 2015 13h50 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
On Fri, Jan 9, 2015 at 2:41 PM, Pascal BASTIEN <pbasnews-xwiki@yahoo.fr> wrote:
... erratum The wrong end of line is not on all TagCloud.xml file lines:I must remove them before to commit: with :set ff=unix with vi ?
Not sure about this one. I think it might help if you configure your editor to use unix line ending.
In any case, I think it does not matter because when you commit on git, the line endings will be converted to unix automatically.
Thanks, Eduard
or the template of licence contain DOS end of line ... * This is free software; you can redistribute it and/or modify it^M * under the terms of the GNU Lesser General Public License as^M * published by the Free Software Foundation; either version 2.1 of^M * the License, or (at your option) any later version.^M De : Clemens Klein-Robbenhaar <c.robbenhaar@espresto.com> À : devs@xwiki.org Envoyé le : Vendredi 9 janvier 2015 15h31 Objet : Re: [xwiki-devs] [xwiki-users] Howto use mvn xar:format ? On 01/09/2015 02:11 PM, Pascal BASTIEN wrote:
My editor is vi on Linux then I use unix end of line...
I launch mvn -e xar:format for the second time and ^M disapeared... (X-files case? :-) )
Same here. Usually I run "mvn xar:format" twice before commiting. The first run fixes the indentation, comment headers, etc, but adds these ^M line endings (it might convert present in the *.xml file from the original XAR export) and the second one keeps the formatting and removes the ^M ... I guess that should be done in one run, too, but I have not bothered to check out the formatter code how todo it. Clemens
NB: and the download is not launched at the second time
Thxs a lot both. Pascal B De : Eduard Moraru <enygma2002@gmail.com> À : Pascal BASTIEN <pbasnews-xwiki@yahoo.fr>; XWiki Users <users@xwiki.org> Envoyé le : Vendredi 9 janvier 2015 13h50 Objet : Re: [xwiki-users] Howto use mvn xar:format ?
On Fri, Jan 9, 2015 at 2:41 PM, Pascal BASTIEN <pbasnews-xwiki@yahoo.fr> wrote:
... erratum The wrong end of line is not on all TagCloud.xml file lines:I must remove them before to commit: with :set ff=unix with vi ?
Not sure about this one. I think it might help if you configure your editor to use unix line ending.
In any case, I think it does not matter because when you commit on git, the line endings will be converted to unix automatically.
Thanks, Eduard
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
participants (2)
-
Clemens Klein-Robbenhaar -
Pascal BASTIEN