maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Zahn <Ralf.Z...@ARS.de>
Subject Dependency to archetype not resolved?
Date Thu, 06 Feb 2014 19:28:25 GMT
Hi,

I have a website project that I build with the maven-site-plugin. Within 
the site, a maven repository is created by using the copy-dependencies 
goal of the maven-dependency-plugin and by defining the artifacts as a 
project dependency. (If anyone has a better idea, plz let me know.)

This works for all kind of artifacts (jar, war, ear, sources, zip, pdf, 
maven-plugin), EXCEPT a maven-archetype.
The declared dependency looks like this:

   <dependency>
      <groupId>de.ars.daojones.maven.archetypes</groupId>
      <artifactId>daojones-java-archetype</artifactId>
      <version>${daojones.version}</version>
      <type>maven-archetype</type>
      <!-- make it non-transitive -->
      <optional>true</optional>
    </dependency>

The artifact is within the local repository. I can find it within the M2E 
dialogs (e.g. to add a dependency within the POM editor). But when running 
"mvn site" on the project, I get this error:

[ERROR] Failed to execute goal on project daojones-site: Could not resolve 
dependencies for project de.ars.daojones:daojones-site:jar:2.0.0-SNAPSHOT: 
Could not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-SNAPSHOT 
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
goal on project daojones-site: Could not resolve dependencies for project 
de.ars.daojones:daojones-site:jar:2.0.0-SNAPSHOT: Could not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-SNAPSHOT
        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: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: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:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        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)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
Caused by: org.apache.maven.project.DependencyResolutionException: Could 
not resolve dependencies for project 
de.ars.daojones:daojones-site:jar:2.0.0-SNAPSHOT: Could not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-SNAPSHOT
        at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(
DefaultProjectDependenciesResolver.java:198)
        at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(
LifecycleDependencyResolver.java:195)
        ... 23 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: 
Could not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-SNAPSHOT
        at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(
DefaultRepositorySystem.java:384)
        at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(
DefaultProjectDependenciesResolver.java:192)
        ... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: 
Could not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-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.DefaultRepositorySystem.resolveDependencies(
DefaultRepositorySystem.java:367)
        ... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could 
not find artifact 
de.ars.daojones.maven.archetypes:daojones-java-archetype:maven-archetype:2.0.0-SNAPSHOT
        at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(
DefaultArtifactResolver.java:449)
        ... 27 more


Is there any exception that maven-archetypes cannot be resolved the same 
way as any other kind of artifact?

Regards,
Ralf Zahn


ARS Computer und Consulting GmbH, http://www.ars.de
Ridlerstrasse 55, 80339 Muenchen, Deutschland

Application Development Services, Business Transformation Services, IT 
Infrastruktur Services
Beratung und Vertrieb zu IBM Software, System x, POWER Systems, Storage
License Management Services, IBM Passport Advantage Lizenzierung

Handelsregister Muenchen, HRB 101829, USt-ID: DE 155 068 909
Geschaeftsfuehrer: Michael Arbesmeier, Kai-Uwe Rommel, Roland Schock, 
Joachim Gucker


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message