brett 2004/05/11 02:48:16 Modified: src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH JellyScriptHousing.java PluginManager.java PluginScriptParser.java src/test/touchstone-build Tag: MAVEN-1_0-BRANCH maven.xml Log: PR: MAVEN-1223 Submitted by: joseph benavidez Reviewed by: Brett Porter Applied with modifications. Have system entities with relative paths in maven.xml and plugin scripts resolve relative to the correct location. Also v1.16.1.10 of JellyUtils.java is included here but has the wrong log message. Revision Changes Path No revision No revision 1.3.4.14 +4 -3 maven/src/java/org/apache/maven/plugin/JellyScriptHousing.java Index: JellyScriptHousing.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/JellyScriptHousing.java,v retrieving revision 1.3.4.13 retrieving revision 1.3.4.14 diff -u -r1.3.4.13 -r1.3.4.14 --- JellyScriptHousing.java 2 Apr 2004 03:42:25 -0000 1.3.4.13 +++ JellyScriptHousing.java 11 May 2004 09:48:16 -0000 1.3.4.14 @@ -145,7 +145,7 @@ return name; } - void parse( PluginDefinitionHandler handler, InputStream inStream ) throws MavenException + void parse( PluginDefinitionHandler handler, String systemId, InputStream inStream ) throws MavenException { try { @@ -153,6 +153,7 @@ factory.setNamespaceAware( true ); SAXParser parser = factory.newSAXParser(); InputSource is = new InputSource( inStream ); + is.setSystemId( systemId ); parser.parse( is, new PluginScriptParser( handler, this ) ); } catch ( ParserConfigurationException e ) @@ -173,7 +174,7 @@ { try { - parse( handler, new FileInputStream( source ) ); + parse( handler, source.getAbsolutePath(), new FileInputStream( source ) ); } catch ( FileNotFoundException e ) { 1.70.4.45 +2 -2 maven/src/java/org/apache/maven/plugin/PluginManager.java Index: PluginManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginManager.java,v retrieving revision 1.70.4.44 retrieving revision 1.70.4.45 diff -u -r1.70.4.44 -r1.70.4.45 --- PluginManager.java 7 May 2004 22:56:08 -0000 1.70.4.44 +++ PluginManager.java 11 May 2004 09:48:16 -0000 1.70.4.45 @@ -521,7 +521,7 @@ // TODO: stop reading all scripts 2 times driver.close(); driver = getClass().getResourceAsStream( "/driver.jelly" ); - driverHousing.parse( transientMapper, driver ); + driverHousing.parse( transientMapper, null, driver ); driver.close(); List projectHousings = readMavenXml( project, transientMapper ); 1.1.4.12 +3 -1 maven/src/java/org/apache/maven/plugin/PluginScriptParser.java Index: PluginScriptParser.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginScriptParser.java,v retrieving revision 1.1.4.11 retrieving revision 1.1.4.12 diff -u -r1.1.4.11 -r1.1.4.12 --- PluginScriptParser.java 1 Apr 2004 01:52:21 -0000 1.1.4.11 +++ PluginScriptParser.java 11 May 2004 09:48:16 -0000 1.1.4.12 @@ -26,6 +26,7 @@ import org.xml.sax.SAXParseException; import org.xml.sax.helpers.DefaultHandler; +import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.HashSet; @@ -117,7 +118,8 @@ log.debug( rawName + " importing from uri " + importUri ); try { - jellyScriptHousing.parse( handler, new FileInputStream( importUri ) ); + File f = new File( importUri ); + jellyScriptHousing.parse( handler, f.getAbsolutePath(), new FileInputStream( f ) ); } catch ( MavenException e ) { No revision No revision 1.43.4.15 +15 -0 maven/src/test/touchstone-build/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/maven/src/test/touchstone-build/maven.xml,v retrieving revision 1.43.4.14 retrieving revision 1.43.4.15 diff -u -r1.43.4.14 -r1.43.4.15 --- maven.xml 5 May 2004 11:04:10 -0000 1.43.4.14 +++ maven.xml 11 May 2004 09:48:16 -0000 1.43.4.15 @@ -15,6 +15,7 @@ * limitations under the License. */ --> + <project default="jar:jar" xmlns:j="jelly:core" @@ -214,6 +215,7 @@ <attainGoal name="test-defaults" /> <attainGoal name="test-inheritence" /> <attainGoal name="test-non-jar-dependency-path" /> + <attainGoal name="test-entity-goal" /> <!-- TODO - this is still broken (as in RC1) <attainGoal name="test-reactor-maven-username" /> @@ -803,6 +805,19 @@ <j:if test="${warPath != warRepoPath}"> <ant:fail>path = ${warPath}, expected ${warRepoPath}</ant:fail> </j:if> + </goal> + + <goal name="test-entity-goal"> + <maven:maven + descriptor="${basedir}/src/reactor-build/entity-test/project.xml" + goals="" + ignoreFailures="false" + /> + <maven:maven + descriptor="${basedir}/src/reactor-build/entity-test/subproject/project.xml" + goals="" + ignoreFailures="false" + /> </goal> </project>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]