Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
-
None
Description
maven-antrun-plugin\target\it\attach-artifact-test-with-prefix fails with the build/consumer.
The pom contains this:
<configuration> <customTaskPrefix>mvn</customTaskPrefix> <target> <mvn:attachartifact file="test.txt" classifier="cl" /> </target> </configuration>
And fails during install:install with
org.xml.sax.SAXParseException; lineNumber: 44; columnNumber: 71; The prefix "mvn" for element "mvn:attachartifact" is not bound.
It is fine that Maven complains about invalid XML, but during install is too late.
It should happen not at all, or already while making the buildplan.
If inheritence of such configuration still works, I'd prefer to break the build early.
The proper fix is to make it valid XML, by specifying the namespace like this:
<configuration xmlns:mvn="maven.apache.org/antrun"> <customTaskPrefix>mvn</customTaskPrefix> <target> <mvn:attachartifact file="test.txt" classifier="cl" /> </target> </configuration>
This already works (even with Maven 3.0), and ideally maven-antrun-plugin also provides an XSD, so it can be validated.
Attachments
Issue Links
- blocks
-
MNG-6956 Ensure all Apache Maven sub-projects can handle build/consumer
- Open