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/DependencyResolutionExcept…
*******************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)]