Hi, I am preparing an application that is built with ant to be deployed to a maven repository to be used in applications that are built with maven.
We use apache archiva as repository. These are the snippets from the build.xml: ----/---- <target name="mvn-install" > <artifact:mvn> <arg value="install:install-file"/> <arg value="-DgroupId=myGroupId"/> <arg value="-DartifactId=myArtifact"/> <arg value="-Dversion=1.0-SNAPSHOT"/> <arg value="-Dpackaging=jar"/> <arg value="-Dfile=./lib/myArtifact.jar"/> </artifact:mvn> </target> <target name="mvn-deploy" > <artifact:mvn> <arg value="deploy:deploy-file"/> <!--arg value="-DgroupId=myGroupId"/> <arg value="-DartifactId=myArtifact"/> <arg value="-Dversion=1.0-SNAPSHOT"/> <arg value="-Dpackaging=jar"/--> <arg value="-DpomFile=deploy-pom.xml"/> <arg value="-Durl=http://localhost:5501/repository/internal"/> <arg value="-DrepositoryId=archiva.default"/> <arg value="-Dfile=./lib/myArtifact.jar"/> </artifact:mvn> </target> ----/---- This is the content of the ~/.m2/settings.xml: ----/---- <settings> <mirrors> <mirror> <id>archiva.default</id> <url>http://localhost:5501/repository/internal/</url> <mirrorOf>external:*</mirrorOf> </mirror> </mirrors> <servers> <server> <id>archiva.default</id> <username>admin</username> <password>verysecret</password> </server> </servers> </settings> ----/---- And this is the output when calling the ant task "mvn-deploy": ----/---- $ ant mvn-deploy Buildfile: /somewhere/build.xml mvn-deploy: [artifact:mvn] [INFO] Scanning for projects... [artifact:mvn] [INFO] Searching repository for plugin with prefix: 'deploy'. [artifact:mvn] [INFO] ------------------------------------------------------------------------ [artifact:mvn] [INFO] Building Maven Default Project [artifact:mvn] [INFO] task-segment: [deploy:deploy-file] (aggregator-style) [artifact:mvn] [INFO] ------------------------------------------------------------------------ [artifact:mvn] [INFO] [deploy:deploy-file] [artifact:mvn] [INFO] Retrieving previous build number from archiva.default [artifact:mvn] Uploading: http://localhost:5501/repository/internal/myGroupId/myArtifact/1.0-SNAPSHOT/myArtifact-1.0-20151016.074824-3.jar [artifact:mvn] 91K uploaded [artifact:mvn] [INFO] Retrieving previous metadata from archiva.default [artifact:mvn] [INFO] Uploading repository metadata for: 'artifact myGroupId:myArtifact' [artifact:mvn] [INFO] Retrieving previous metadata from archiva.default [artifact:mvn] [INFO] Uploading repository metadata for: 'snapshot myGroupId:myArtifact:1.0-SNAPSHOT' [artifact:mvn] [INFO] Uploading project information for myArtifact 1.0-20151016.074824-3 [artifact:mvn] [INFO] ------------------------------------------------------------------------ [artifact:mvn] [INFO] BUILD SUCCESSFUL [artifact:mvn] [INFO] ------------------------------------------------------------------------ [artifact:mvn] [INFO] Total time: 1 second [artifact:mvn] [INFO] Finished at: Fri Oct 16 09:48:24 CEST 2015 [artifact:mvn] [INFO] Final Memory: 17M/457M [artifact:mvn] [INFO] ------------------------------------------------------------------------ BUILD SUCCESSFUL Total time: 2 seconds ----/---- It seems to have worked well. But the artifact cannot be found in the repo. When building the maven application that depends on myArtifact I get: ----/---- Missing: ---------- 1) myGroupId:myArtifact:jar:1.0-SNAPSHOT [...] 1 required artifact is missing. for artifact: myGroupId:MyMavenArtifact:jar:1.0-SNAPSHOT from the specified remote repositories: archiva.default (http://localhost:5501/repository/internal/) ----/---- Also when browing the repository I get this error message in Apache Archiva: "managed repo is configured for release only" The "mvn-install" target works as expected. I do not understand what is the problem here. Any help is appreciated. Regards Marco --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org