[
https://issues.apache.org/jira/browse/MANTRUN-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028660#comment-16028660
]
Hudson commented on MANTRUN-181:
--------------------------------
SUCCESS: Integrated in Jenkins build maven-plugins #8972 (See
[https://builds.apache.org/job/maven-plugins/8972/])
[MANTRUN-181] AttachArtifact task does not work in external Ant build file
Instead of overriding the Ant project and forcing to pass the Ant project
references by reference to sub-projects, it is cleaner to add in the plugin
another reference, containing the Maven project, that cannot be cloned. This
way, a task that wants to change the Maven project can obtain this new
reference (like 'attachartifact'), and old code behaves exactly like before. It
is important that this new reference is not clonable, so that inheritRefs=true
doesn't pass a clone of it to an external Ant build called with the 'ant' task,
but the reference itself. (gboue:
[http://svn.apache.org/viewvc/?view=rev&rev=1796719])
* (edit) maven-antrun-plugin/src/it/attach-artifact-from-ant-task/pom.xml
* (edit)
maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java
* (edit)
maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
* (edit)
maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/MavenAntRunProject.java
> AttachArtifact task does not work in external Ant build file
> ------------------------------------------------------------
>
> Key: MANTRUN-181
> URL: https://issues.apache.org/jira/browse/MANTRUN-181
> Project: Maven Antrun Plugin
> Issue Type: Bug
> Affects Versions: 1.5, 1.6, 1.7
> Reporter: Anton Khitrenovich
> Attachments: MyProject.zip
>
>
> AttachArtifact task fails with an error if used in external Ant build file:
> {code}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.7:run (call-build) on project
> my-test-project: An Ant BuildException has occured: The following error
> occurred while executing this line:
> [ERROR] C:\...\MyProject\build.xml:5: Maven project reference not found:
> maven.project
> [ERROR] around Ant part ...<ant antfile="build.xml" target="mytarget"/>... @
> 4:47 in C:\...\MyProject\target\antrun\build-main.xml
> {code}
> Setting {{inheritRefs="true"}} eliminates the error, but even then the
> artifact is not attached.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)