Maven latest version update failed with mvn install command - java

I have using latest version of MAVEN. I have to projects which I want to build using MAVEN.
My first project is a module based project which has two modules. Parent POM for this project consists 2 child POMS. I am going to Pass version as variable through command prompt to make this build independent of static version.
My parent POM looks like :
<modelVersion>4.0.0</modelVersion>
<groupId>A.B.C</groupId>
<artifactId>D</artifactId>
<version>${major.version}.${build.version}</version>
<packaging>pom</packaging>
<!-- Some further code-->
One Module have POM like :
<parent>
<groupId>A.B.C</groupId>
<artifactId>D</artifactId>
<version>${major.version}.${build.version}</version>
</parent>
**<groupId>A.B.C</groupId>
<artifactId>E</artifactId>**
<version>${major.version}.${build.version}</version>
<!-- Some further code-->
Second Module have POM like :
<parent>
<groupId>A.B.C</groupId>
<artifactId>F</artifactId>
<version>${major.version}.${build.version}</version>
</parent>
**<groupId>A.B.C</groupId>
<artifactId>G</artifactId>**
<version>${major.version}.${build.version}</version>
<!-- Some further code-->
My Second project uses above dependency in its POM like :
<modelVersion>4.0.0</modelVersion>
<groupId>A.B.C</groupId>
<artifactId>T</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
**<groupId>A.B.C</groupId>
<artifactId>E</artifactId>
<version>LATEST</version>**
</dependency>
<dependency>
**<groupId>A.B.C</groupId>
<artifactId>G</artifactId>
<version>LATEST</version>**
</dependency>
But while using mvn clean install, it gives error for
[ERROR] Failed to execute goal on project T: Could not resolve dependencies for project
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact A.B.C:D:pom:${major.version}.${build.version} from/to nexus-all-repos : IllegalArgumentException
But if I use command mvn versions:use-latest-versions, it works fine. I want to use mvn install as I want to use latest version for some dependencies only.
What might be the issue?
Adding complete error stack
[ERROR] Failed to execute goal on project T: Could not resolve dependencies for project A.B.C:T:jar:5.6.0.15: Failed to collect dependencies at A.B.C:E:jar:LATEST: Failed to read artifact descriptor for A.B.C:E:jar:LATEST: Could not tran
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project T: Could not resolve dependencies for project A.B.C:T:jar:5.6.0.15: Failed to collect dependencies at A.B.C:E:jar:LATEST
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project A.B.C:T:jar:5.6.0.15: Failed to collect dependencies at A.B.C:E:jar:LATEST
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:167)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at A.B.C:E:jar:LATEST
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:292)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:317)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:159)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for A.B.C:E:jar:LATEST
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:384)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:231)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:461)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:261)
... 25 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact A.B.C:D:pom:${major.version}.${build.version} from/to nexus-all-repos (http://eqmavenrepo.technologic.com/nexus/content/groups/allrepo/): IllegalArgumentException
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:170)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:219)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:898)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:750)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:309)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:375)
... 28 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact A.B.C:D:pom:${major.version}.${build.version} from/to nexus-all-repos (http://eqmavenrepo.technologic.com/nexus/content/groups/allrepo/): IllegalArgumentException
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:166)
... 33 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact A.B.C:D:pom:${major.version}.${build.version} from/to nexus-all-repos (http://eqmavenrepo.technologic.com/nexus/content/groups/allrepo/): IllegalArgumentException
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1016)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at org.apache.maven.wagon.providers.http.httpclient.client.methods.HttpGet.<init>(HttpGet.java:69)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:841)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
... 4 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 119: http://eqmavenrepo.technologic.com/nexus/content/groups/allrepo/A/B/C/D/${major.version}.${build.version}/D-${major.version}.${build.version}.pom
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3066)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
... 10 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/DependencyResolutionException
Still getting error after removing illegal characters

This is not the way Maven works. Don't look at the POM as a mere build script, but more as a delivery slip shipped together with your artifact that explains how it is connected to the rest of the world, e.g. in terms of dependencies and how it was built (note the past tense), not how to build it, like Ant.
The problem is that if Maven would allow you to parameterize ${major.version}.${build.version} and use them as coordinates, when it installs/deploys it might be able to do right thing and deploy your artifact to http://.../E/X.Y/E-X.Y.pom (if you used mvn -Dmajor.version=X -Dbuild.version=Y ...).
But then the problem comes later. Another user might download your artifact correctly, but when Maven tries to parse the POM, it will encounter ${major.version}.${build.version} and wouldn't know what to do because the actual values were provided by you when you deployed and are lost in the process.
This is the reason why Maven coordinates need to be fixed and are not extrapolated with properties; it gives you (and perhaps more importantly, any other dependant) control and traceability. Of course, other non-coordinate properties may be parameterized to your heart's content, it's just coordinates that are more sensitive to this.
Maven coordinates uses five values, three of them more common than the other: groupId, artifactId and version. The other two are packaging and classifier, but are used for more exotic use-cases.
I would advise you to rethink your building approach if you are going to use Maven. It has a steep learning curve, but the view is magnificent from the top. Releasing artifacts using Maven is better done through, for instance, the Maven Release plugin.

i think problem related to wrong symbols in path to repo cuz this is in stacktrace. try check all paths related to nexus repo.
Caused by: java.net.URISyntaxException: Illegal character in path at index 119: ~^~content/groups/allrepo/~^~/E/${major.version}.${build.version}/E-${major.version}.${build.version}.pom

Related

Unable to load the mojo 'test' - org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test

I am building my apps with Maven-3 and i guess after auto-refresh of maven-surefire-plugin to 3.0.0-M1 i am not able to do build and getting the below error.
As a initial step, I have cleared the directory /org/apache/maven in my repository however still i am facing the issue. Can anyone advise. Note - if i am downgrading the surefire plugin to 2.x then I am able to build it.
Error log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.444s
[INFO] Finished at: Thu Nov 08 16:04:53 GMT 2018
[INFO] Final Memory: 60M/704M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project TEST_PROJECT: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1': com.google.inject.ProvisionException: Guice provision errors:
[ERROR]
[ERROR] 1) No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
[ERROR] while locating org.apache.maven.plugin.surefire.SurefirePlugin
[ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with #com.google.inject.name.Named(value=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project TEST_PROJECT: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1'
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1'
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1'
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:488)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
... 20 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Guice provision errors:
1) No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
while locating org.apache.maven.plugin.surefire.SurefirePlugin
at ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
while locating org.apache.maven.plugin.Mojo annotated with #com.google.inject.name.Named(value=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test)
1 error
role: org.apache.maven.plugin.Mojo
roleHint: org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:257)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
... 21 more
Caused by: com.google.inject.ProvisionException: Guice provision errors:
1) No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
while locating org.apache.maven.plugin.surefire.SurefirePlugin
at ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
while locating org.apache.maven.plugin.Mojo annotated with #com.google.inject.name.Named(value=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test)
1 error
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:974)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
... 23 more
You can upgrade your maven version to 3.6.0 latest to solve this issue. This can be compatible from 3.3.9 maven version.
Looking at the comments on upgrading maven version, we updated our maven version and was able to overcome the surefire plugin issue using maven 3.3.9. Didn't get any issues.
I found that my NetBeans was using a very old maven (3.0.5) even though I had a brand new maven installed.
On my Mac, I had to go to the menu "Netbeans/Preferences", select the "Maven" tab, and change from "Bundled", browsed to latest, and this got rid of the error above for me.
I had this problem until I discovered that we were not explicitly specifying the version of the surefire plugin. Once I changed our pom.xml file to set the version, it worked.
You can downgrade the version of maven-surefire-plugin to 2.12.4 using the pluginManagement tag. It worked for me.
If you are facing the issue in netbeans IDE you need to change default mavenhome version.follow the below steps
in menu bar tools->Options->click java tab --> under categories --> Execution --> Maven home drop down select manually installed location of the maven
I agree with SomMS's answer
But as an FYI, I found this thread, immediately dismissed that maven version could be the problem the as I just (last week) built this RHEL VM and it was new and shiny
... 15 minutes later I decided to check the maven version to find it was v3.0.5!
Hopefully the next guy doesn't make the same mistake
And if you are wondering how to get the version of whats installed try
mvn --version
I used #SomMS's suggestion and upgraded Maven in order to fix the issue. It worked.
The problem is that, at the time of this writing, the latest version of Maven available on CentOS 7 is 3.0.5 (default repository), which is really old (Feburary 2013). Most other distros have way newer Maven versions available to them.
My only solution was to do a manual download and add path to its binary in PATH env-variable. Downside here is that now rpm/yum are not aware of its existence.

Resolve workspace artifacts option in Eclipse generates error when one of the resolving projects is opened

I have a maven project A, with 4 submodules. I have another maven project B, without any submodules. One of the 4 submodules of A, references project B.
When I do clean install on project A, I receive an error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project dca-web: Failed to copy file for artifact [be.vlaanderen.dwse:dwse-doc-tools:jar:3.2.2:compile]: /Users/Fabrizio/ontwikkeling/projecten/doc-tools/target/classes (Is a directory)
When enabling debug information: it is clear what is the issue:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project dca-web: Failed to copy file for artifact [be.vlaanderen.dwse:dwse-doc-tools:jar:3.2.2:compile]: /Users/Fabrizio/ontwikkeling/projecten/doc-tools/target/classes (Is a directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project dca-web: Failed to copy file for artifact [be.vlaanderen.dwse:dwse-doc-tools:jar:3.2.2:compile]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy file for artifact [be.vlaanderen.dwse:dwse-doc-tools:jar:3.2.2:compile]
at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:131)
at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleArtifacts(WarProjectPackagingTask.java:190)
at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:109)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:472)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:404)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:215)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:177)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.FileNotFoundException: /Users/Fabrizio/ontwikkeling/projecten/doc-tools/target/classes (Is a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.codehaus.plexus.util.io.FileInputStreamFacade.getInputStream(FileInputStreamFacade.java:36)
at org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1141)
at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:1048)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:293)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask$1.registered(AbstractWarPackagingTask.java:150)
at org.apache.maven.plugin.war.util.WebappStructure.registerFile(WebappStructure.java:211)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:145)
at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:106)
But the folder target/classes is a directory! So there is a bug somewhere in one of the maven plugins I guess...
When I close project B, there is no problem. So opening the referenced project creates an issue...
I need to have project B open, because I use project A as a web application in Tomcat. When I have project B open and i change a file and save it, Eclipse does an incremental publish, and therefore Tomcat doesn't need to redeploy or restart! This saves me for each file change like 30 seconds! So it is very important to keep this project open...
I found the solution. Apparently eclipse luna (or any eclipse luna based ide) is using an embedded version of maven, which in turn uses the maven-war-plugin version 2.2. After adding in my pom the version 2.6, it solved the issue!
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</build>

Jackson dependency version being overridden when doing maven build

I had a perfectly working project. I was able to do a successful build and deployment. Yesterday as a part of development I had to add the following maven dependencies for Jackson jars in my project after which the mvn clean install started to fail.
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.5.3</version>
</dependency>
The error message that I get is
[ERROR] Failed to execute goal on project compass_app: Could not
resolve dependencies for project
com.XXXXX.services:compass_app:jar:1.0-SNAPSHOT: Failed to collect
depe dencies at org.codehaus.jackson:jackson-mapper-asl:jar:1.5.3 ->
org.codehaus.jackson:jackson-core-asl:jar:1.9.13: Failed to read
artifact descriptor for org.codehaus.jackson:jackson-core-asl:j
r:1.9.13: Could not transfer artifact
org.codehaus.jackson:jackson-core-asl:pom:1.9.13 from/to m-all
(http://XXXX/archives/all): Failed to transfer file:
http://XXXX/archives/all/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.pom.
Return code is: 500 , ReasonPhrase:Unable to find managed repository
configuration for id:npanXXXX-1.5.0-maestXXXX-33. -> [Help 1]
My concern is why is the version 1.9.13 attempted for a download when I have not specified it anywhere in my project
I have only one declaration of jackson jars in my pom file.
I have tried doing a mvn -X clean install > install.txt .
Following pieces of trace may be helpful.
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifact default-value="${project.artifact}"/>
<attachedArtifacts default-value="${project.attachedArtifacts}"/>
<createChecksum default-value="false">${createChecksum}</createChecksum>
<localRepository>${localRepository}</localRepository>
<packaging default-value="${project.packaging}"/>
<pomFile default-value="${project.file}"/>
<updateReleaseInfo default-value="false">${updateReleaseInfo}</updateReleaseInfo>
</configuration>
The Exception is.
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project compass_app: Could not resolve dependencies for project com.XXXX.services:compass_app:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.codehaus.jackson:jackson-mapper-asl:jar:1.5.3 -> org.codehaus.jackson:jackson-core-asl:jar:1.9.13
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.XXXX.services:compass_app:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.codehaus.jackson:jackson-mapper-asl:jar:1.5.3 -> org.codehaus.jackson:jackson-core-asl:jar:1.9.13
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:167)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 22 more
Any assistance will be greatly helpful. thanks in advance.
References :- The following links have already been referred.
1. jersey and jackson maven dependency issues?
2. http://maven.apache.org/ref/3.1.1/xref/org/apache/maven/artifact/resolver/DebugResolutionListener.html ( to understand the code and working of maven )
3. http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
My concern is why is the version 1.9.13 attempted for a download when
I have not specified it anywhere in my project
Please use mvn dependency:tree (see: documentation) so that you will be able to track why this version is being loaded.
It is probably kind of transitive dependency.

Custom Maven Plugin doesn't resolve parent POM when used in another clean project

The I am attempting to use my custom Maven plugin in a completely new system. It appears to not resolving the parent POM used by the custom Maven plugin.
I have tried several things but I am at a loss.
Any insight would be greatly appreciated. Thank you.
Update
This is is very strange.... this error only occurs when I clean my local repository (simulating a clean system such as a new developer or integration system). If I run the 'mvn -U install' command immediately again (without changing the command at all) then it builds successfully!
This screams 'transitive dependency' but how do I find such an infraction?
Update
I am thinking that this is a bug in Maven. The reactor doesn't find the parent POM even though it is located in the same project! What do you all think?
Custom Plugin POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.org</groupId>
<artifactId>parent-java-with-foundation</artifactId>
<version>11.1.1.8-SNAPSHOT</version>
<relativePath></relativePath>
</parent>
<groupId>my.org.maven</groupId>
<artifactId>maven-plugin</artifactId>
<version>11.1.1.8-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
</project>
Error Trace:
[ERROR] Plugin my.org.maven:maven-plugin:11.1.1.8-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for my.org.maven:maven-plugin:jar:11.1.1.8-SNAPSHOT: Could not find artifact my.org:parent-java-with-foundation:pom:11.1.1.8-SNAPSHOT -> [Help 1] org.apache.maven.plugin.PluginResolutionException: Plugin my.org.maven:maven-plugin:11.1.1.8-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for my.org.maven:maven-plugin:jar:11.1.1.8-SNAPSHOT
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:122)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:146)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:265)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:190)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:157)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:144)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:121)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:134)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for my.org.maven:maven-plugin:jar:11.1.1.8-SNAPSHOT
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:370)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:288)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:108)
... 25 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact my.org:parent-java-with-foundation:pom:11.1.1.8-SNAPSHOT
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:817)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:669)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:307)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:361)
... 28 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact my.org:parent-java-with-foundation:pom:11.1.1.8-SNAPSHOT
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122)
... 32 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact my.org:parent-java-with-foundation:pom:11.1.1.8-SNAPSHOT
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:449)
... 35 more
There can be several reasons for this. If the parent POM isn't part of the reactor (= the current build) and you deleted your local cache, then Maven has to find it somewhere.
If you have a company wide repository, make sure that this version is available from there. Make especially sure that you can download SNAPSHOT versions (some repos can disable that plus you can configure Maven never to download snapshots from certain repos).
If you don't have a company wide repository, then you need to run mvn install in the parent project, first. Maven doesn't try to find missing pieces anywhere on your hard disk.

maven fails to resolve dependency

I have multi module maven project.When I try to build site, e.g. execute maven site on parent project it fails to resolve dependency to one of modules.
But if I just compile (mvn clean compile on parent project) it or run tests (mvn clean test on parent project) there are no dependency problems.
What could cause such behaviour?
UPD
Maven version
Apache Maven 3.0.2 (r1056850; 2011-01-09 02:58:10+0200)
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: c:\Program Files\Java\jdk1.6.0_26\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
maven-site-plugin version
[DEBUG] Included: org.apache.maven.plugins:maven-site-plugin:jar:2.0.1
Error message
[ERROR] Failed to execute goal on project myproj-client: Could not resolve dependencies for project mycompany.myproj:myproj-client:jar:0.0.1-SNAPSHOT: Could not find artifact mycompany.myproj:myproj-common:jar:0.0.1-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project myproj-client: Could not resolve dependencies for project mycompany.myproj:myproj-client:jar:0.0.1-SNAPSHOT: Could not find artifact mycompany.myproj:myproj-common:jar:0.0.1-SNAPSHOT
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:190)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:104)
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:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 mycompany.myproj:myproj-client:jar:0.0.1-SNAPSHOT: Could not find artifact mycompany.myproj:myproj-common:jar:0.0.1-SNAPSHOT
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:156)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:165)
... 22 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact mycompany.myproj:myproj-common:jar:0.0.1-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:526)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifacts(DefaultRepositorySystem.java:304)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:334)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
... 23 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact mycompany.myproj:myproj-common:jar:0.0.1-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:517)
... 26 more
[ERROR]
[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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :myproj-client
I have the same problem. I didn't dig into Maven's source code too much. But here is my observation.
Supposed that you never mvn install myproj-common in your local repository, neither deployed it onto any remote repositories. When you run mvn clean site on the parent project, things happen like this:
maven determines the order of myproj-common is before
myproj-client according to their dependency relationship
mvn clean site is run on myproj-common. All previous result in myproj-common/target are deleted and myproj-common/target/site is
generated. (Note that after this step, neither compiled classes nor packaged jar exists in myproj-common/target)
mvn clean site is run on myproj-client. Maven first checks the
dependency of this project, and tries to find myproj-common's
artifact (classes or jar) in these places: (a) myproj-common/target (b) local repository (3) remote repositories.
mvn site fails on myproj-client, since it cannot find the artifact of myproj-common
This explains why mvn clean compile site and mvn clean package site works. They both would have prepared myproj-common artifacts in its target directory before mvn site runs on myproj-client.
And mvn install followed by mvn site works also.
A special exception is that if you put something like emma-maven-plugin in reporting, it will automatically compile and instrument classes. In this case, mvn clean site always works.
I am not sure why Maven tries to find myproj-common's jar in step 3, it seems to have nothing to do with mvn site. The exception happens quite early in maven core, before getting into maven-site-plugin. It looks not like a problem of maven-site-plugin but a common behavior of all maven lifecycles (except clean I believe).
i was facing the same but for struts and paypal_base dependecies, i fixed by doing following.
i checked, and found that jar files didn't exists in appropriate folder in maven repository(.m2/reposotory....).
I have installed that jar files via following mvn command
mvn install:install-file -Dfile=C:\Dependencies\paypal_base.jar \
-DgroupId=paypal -DartifactId=paypal_base -Dversion=0.1 \
-Dpackaging=jar
and
mvn install:install-file -Dfile=C:\Dependencies\struts.jar \
-DgroupId=struts -DartifactId=struts -Dversion=0.1 \
-Dpackaging=jar
(-DFile is the location of jar file in you system)
Rebuild the project by Maven.
My Project was successful build.
you must check the jar, and use above instruction is jar not exist.
may be this will helpful.
This might be an issue with the site plugin not having access to the reactor, and thus not seeing that the project artifact is available in your project sources. (This is merely a hypothesis, perhaps supported by MSITE-302.)
Try running first mvn install, which installs your artifacts in the local repository, and then running mvn site.
For more information on the reactor, try:
http://maven.apache.org/guides/mini/guide-multiple-modules.html
What is the "reactor" in Maven?
Heh, for some reason, after I made some changes to module and parent pom files, problem vanished. I don't know exactly what was done, but currently mvn site on parent project is working normally. Unfortunately I have no time to investigate what is the roots of the problem. But it seems that changing site version to 3.0 put me on the right way. Also I could execute site (before it was fixed) in the following way mvn compile site, in this case it could find dependency.
It looks like maven is looking for myproj-common:jar:0.0.1-SNAPSHOT in the repository.
The reason for failure could be:
maven is not able to access the snapshot artifacts in the repository.
To enable snapshot artifacts:
please check you pom.xml for snapshots tag under the repository section.
<repository>
<name>xyz</name>
<id>repoid</id>
<url>http://x.y.z</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

Categories

Resources