Hello Wendy,
I've used the upload form (upload.action page). I've specified toto as
groupId, B as artifactId and 1.1-SNAPSHOT as version. I've tried two
ways:
1) tell Archiva to generate the POM
2) give Archiva a POM already written
To test it, I've got a local repository with Archiva as a mirror of *.
I'm sure this configuration works as I've managed to download from
remote repository an artifact.
So I have a pom.xml with this piece of XML:
<dependency>
<groupId>myproject</groupId>
<artifactId>B</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
I launch Maven2 in a cmd window and I launch the "mvn clean install"
command. I got this message:
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Downloader POM
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) myproject:B:jar:1.1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=myproject -DartifactId=B
-Dversion
=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=myproject -DartifactId=B
-Dversion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[i
d]
Path to dependency:
1) blabla:A:jar:1.0-SNAPSHOT
2) myproject:B:jar:1.1-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
blabla:A:jar:1.0-SNAPSHOT
from the specified remote repositories:
archiva.default (http://myarchiva/repository/internal)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Feb 02 14:43:21 CET 2009
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
More details with the -e switch (the error sounds quite strange, I do
not understand it):
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:575)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:324)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:288)
at
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
ncies(DefaultPluginManager.java:1415)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:405)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
... 16 more
I'm using 1.1.3 version of Archiva.
David
-----Original Message-----
From: Wendy Smoak [mailto:[email protected]]
Sent: Monday, February 02, 2009 2:35 PM
To: [email protected]
Subject: Re: Archiva & Snapshots
On Mon, Feb 2, 2009 at 6:22 AM, DEGARDIN David (CAMPUS)
<[email protected]> wrote:
> I've uploaded my artefact B in version 1.1-SNAPHOST with Archiva. When
> I look in the folder where the artefact should be deployed, I see that
> a folder 1.1-SNAPSHOT has been created (so far, it is OK). In this
> folder, the artifact is named myproject-1.1-20090130xxxxx (the
> qualifier and build number). Same thing for its pom.
How did you upload the jar and pom to Archiva?
> <dependency>
> <groupId>toto</groupId>
> <artifactId>B</artifactId>
> <version>1.1-SNAPSHOT</version>
> </dependency>
This should work (as should the one with the full timestamped version
number, if you wanted to lock down to a particular snapshot.)
Can you paste the command you're running and the exact error you're
seeing? Also let us know, what version of Archiva.
--
Wendy