You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/01/08 00:28:42 UTC
[jira] Updated: (MAVEN-1110) Allow disablement of maven.xml inheritance
The following issue has been updated:
Updater: Brett Porter (mailto:brett@codehaus.org)
Date: Wed, 7 Jan 2004 5:28 PM
Changes:
Fix Version changed to 1.1
---------------------------------------------------------------------
For a full history of the issue, see:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1110&page=history
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1110
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1110
Summary: Allow disablement of maven.xml inheritance
Type: Improvement
Status: Unassigned
Priority: Minor
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Components:
inheritance
Fix Fors:
1.1
Versions:
1.0-rc1
Assignee:
Reporter: Matthieu Riou
Created: Wed, 7 Jan 2004 3:02 AM
Updated: Wed, 7 Jan 2004 5:28 PM
Description:
POM inheritance is a very useful feature but the inheritance of the maven.xml goals and pregoals is sometimes not so nice. My understanding is that it can make the definition of pregoals in the root project tricky if you're calling the reactor inside.
For example something like this won't work :
<preGoal name="xdoc">
<echo>Starting reactor for submodules</echo>
<maven:reactor basedir="." includes="*/project.xml" goals="site:generate"
banner="Generating site for" ignoreFailures="false"/>
<!-- create the parent directory for the docs -->
<mkdir dir="${maven.docs.dest}/module"/>
<!-- copy them all to ${maven.docs.dest}/module/${module.id}/ -->
<ant:fileScanner var="subModules">
<fileset dir="${basedir}">
<include name="*/project.xml"/>
</fileset>
</ant:fileScanner>
<j:forEach items="${subModules.iterator()}" var="module">
<j:set var="moduleName" value="${module.parentFile.name}"/>
<mkdir dir="${maven.docs.dest}/module/${moduleName}/"/>
<copy toDir="${maven.docs.dest}/module/${moduleName}/">
<fileset dir="${moduleName}/target/docs/">
<include name="**"/>
</fileset>
</copy>
</j:forEach>
</preGoal>
This will cause a loop. The reactor will call subprojects site:generate, starting as a prerequisite xdoc. This pregoal being inherited, it will be started again which causes and error.
A nice enhancement would be to be able to turn off maven.xml inheritance, either at a global basis or at a goal by goal (or pregoal by pregoal) basis.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org