You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Samuel Langlois <sa...@fr.ibm.com> on 2010/08/10 15:04:45 UTC
Maven ant tasks: cannot install artifact using in-memory pom
Hello,
I'm trying to install an artifact with the Maven ant tasks. I use version
2.1.1
Since there is a nice way to create an "in-memory" pom instead of actually
creating a pom.xml file on the disk, I wanted to use it
But it is not deployed where I want : it ends up in
org.apache.maven:super-pom:2.0
Here is the trace I get :
mavenDeploy:
[echo] Installing with GAV:
com.ilog.rules.studio:studio-feature:8.0-SNAPSHOT
[artifact:install] [INFO] Installing /data/users/langlois/test/toto.zip to
/tmp/langlois/repository/org/apache/maven/super-pom/2.0/super-pom-2.0.jar
And my stripped-down build.xml :
<project default="mavenDeploy" xmlns:artifact="urn:maven-artifact-ant">
<path id="maven-ant-tasks.classpath" path="maven-ant-tasks.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
<macrodef name="deploy.to.maven">
<attribute name="version" />
<attribute name="artifactId" />
<attribute name="file" />
<sequential>
<artifact:pom id="mypom"
groupId="com.ilog.rules.studio" artifactId="@{artifactId}"
version="@{version}" />
<echo>Installing with GAV:
${mypom.groupId}:${mypom.artifactId}:${mypom.version}</echo>
<artifact:install file="@{file}">
<pom refid="mypom" />
</artifact:install>
</sequential>
</macrodef>
<target name="mavenDeploy">
<touch file="toto.zip"/>
<deploy.to.maven version="8.0-SNAPSHOT"
artifactId="studio-feature" file="toto.zip"/>
</target>
</project>
It works fine with a good-old pom.xml file.
Samuel
--
View this message in context: http://maven-users.828.n2.nabble.com/Maven-ant-tasks-cannot-install-artifact-using-in-memory-pom-tp5392931p5392931.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org