On Fri, 13 May 2005 [EMAIL PROTECTED] wrote:
Maven doesn't know what type of artifact your dependency is referring
to, so it needs the POM to find out the packaging. Writing a POM
is always a good idea.
I haven't tried this (don't know if it's supported either) but maybe
you can specify <type>jar</type> in the m2 dependency, so it won't need
the POM, but my guess is that this doesn't work and you still need
the pom.
-- Kenney
>
> Hello.
>
> We've been using Maven 1.0.x for about a year now, and I recently started
> looking at Maven2 as we're going
> to shuffle our build servers around a bit.
>
> I've run into an issue:
> When using Maven 1.0.x we've set up a list of repositories in
> build.properties thus:
>
> axx.repo.vob=${basedir}/../lib/ext/.maven/repository
> maven.repo.remote=file:${axx.repo.vob},http://axitbpc015:8080/jars,http://www.ibiblio.org/maven
>
>
> The source code is under ClearCase control, and so is the ../lib/ext tree
> (don't ask - it's a QA thing).
>
> Now in my Maven2 experiment I've started with our "lowest-level-component"
> and set up the following in
> pom.xml:
>
> <repositories>
> <repository>
> <id>VOB</id>
> <name>VOB</name>
> <url>file:../lib/ext/.maven/repository</url>
> <layout>legacy</layout>
> </repository>
> </repositories>
> <dependencies>
> ...
> <dependency>
> <groupId>VENDOR</groupId>
> <artifactId>COMMERCIAL_COMPONENT</artifactId>
> <version>1.0</version>
> </dependency>
> ...
> </dependencies>
>
> This produces the following when I've enabled debug - is it required to
> write a "mock" pom for such artifacts for Maven2 to see them?
>
> ...
> [DEBUG] Resolving: VENDOR:COMMERCIAL_COMPONENT:pom:1.0 from:
> {localRepository: [local] -> file://d:/stage/MAIN/.maven/repository}
> {remoteRepositories: [[central] -> http://repo1.maven.org/maven2, [VOB] ->
> file:../lib/ext/.maven/repository]}
> Downloading: VENDOR/COMMERCIAL_COMPONENT/1.0/COMMERCIAL_COMPONENT-1.0.pom
> [WARNING] Unable to get resource from repository
> http://repo1.maven.org/maven2
> [ERROR] Nonexistent component: org.apache.maven.wagon.Wagonfile
> [INFO]
> ----------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
>
> [ERROR] Cause:
> org.apache.maven.plugin.PluginExecutionException: Unable to resolve
> required dependencies for goal
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:375)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeMojo(DefaultLifecycleExecutor.java:448)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executePhase(DefaultLifecycleExecutor.java:417)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>
> at
> org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:212)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:136)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:233)
> 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:324)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
> Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException:
> Error transitively resolving artifacts:
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:191)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:723)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:355)
>
> ... 14 more
> Caused by:
> org.apache.maven.artifact.resolver.TransitiveArtifactResolutionException:
> Error retrieving metadata [VENDOR:COMMERCIAL_COMPONENT:jar:1.0] :
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.collect(DefaultArtifactResolver.java:307)
>
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:187)
>
> ... 16 more
> Caused by:
> org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:
> Unable to read the metadata file
> at
> org.apache.maven.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:89)
>
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.collect(DefaultArtifactResolver.java:303)
>
> ... 17 more
> Caused by: org.apache.maven.project.ProjectBuildingException: Unable to
> find artifact: VENDOR:COMMERCIAL_COMPONENT:pom:1.0
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:167)
>
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:149)
>
> at
> org.apache.maven.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:83)
>
> ... 18 more
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri May 13 10:16:43 CEST 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> ----------------------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]