You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2004/06/12 01:43:45 UTC
cvs commit: maven/xdocs/misc tasks.xml
brett 2004/06/11 16:43:45
Modified: . maven.xml project.properties project.xml
src/bin maven.bat
src/conf defaults.properties driver.jelly
src/java/org/apache/maven MavenSession.java
src/java/org/apache/maven/cli CLIManager.java
src/java/org/apache/maven/jelly JellyPropsHandler.java
JellyUtils.java
src/java/org/apache/maven/plugin
GoalToJellyScriptHousingMapper.java
JellyScriptHousing.java PluginCacheManager.java
PluginManager.java PluginScriptParser.java
src/java/org/apache/maven/project Build.java Project.java
UnitTest.java
src/test/java/org/apache/maven/plugin
PluginCacheManagerTest.java
src/test/touchstone-build maven.xml
src/test/touchstone-build/src/reactor-build/default
project.xml
xdocs changes.xml faq.fml navigation-pdf.xml
navigation.xml repository-upload.xml
xdocs/misc tasks.xml
Added: src/test/touchstone-build/src/reactor-build/entity-test
maven.xml project.xml
src/test/touchstone-build/src/reactor-build/entity-test/entity
entity.xml
src/test/touchstone-build/src/reactor-build/entity-test/subproject
project.xml
Log:
merge changes between MAVEN-1_0-BRANCH-merge-3 and MAVEN_1_0_RC3
Revision Changes Path
1.103 +3 -3 maven/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/maven/maven.xml,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- maven.xml 5 May 2004 13:05:51 -0000 1.102
+++ maven.xml 11 Jun 2004 23:43:43 -0000 1.103
@@ -344,7 +344,7 @@
<j:whitespace>@ECHO OFF
if "%1"=="" goto usage
set REPO_DIR=%1
-if not exist %REPO_DIR% mkdir %REPO_DIR%
+if not exist %REPO_DIR%\nul mkdir %REPO_DIR%
if "%MAVEN_HOME%"=="" goto MHusage
</j:whitespace>
<j:forEach var="lib" items="${pom.artifacts}">
@@ -354,8 +354,8 @@
<j:set var="libdir" value="lib\endorsed" />
</j:if>
<j:if test="${dep.type=='jar'}">
-<j:whitespace>if not exist %REPO_DIR%\${dep.groupId} mkdir %REPO_DIR%\${dep.groupId}
-if not exist %REPO_DIR%\${dep.groupId}\jars mkdir %REPO_DIR%\${dep.groupId}\jars
+<j:whitespace>if not exist %REPO_DIR%\${dep.groupId}\nul mkdir %REPO_DIR%\${dep.groupId}
+if not exist %REPO_DIR%\${dep.groupId}\jars\nul mkdir %REPO_DIR%\${dep.groupId}\jars
if not exist "%REPO_DIR%\${dep.groupId}\jars\${dep.artifactId}-${dep.version}.jar" copy "%MAVEN_HOME%\${libdir}\${dep.artifactId}-${dep.version}.jar" "%REPO_DIR%\${dep.groupId}\jars"
</j:whitespace>
</j:if>
1.62 +5 -0 maven/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/maven/project.properties,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- project.properties 5 May 2004 13:05:51 -0000 1.61
+++ project.properties 11 Jun 2004 23:43:43 -0000 1.62
@@ -128,3 +128,8 @@
# jdk1.3 compat
maven.junit.fork=yes
maven.junit.sysproperties=maven.home
+
+# Distribution location
+maven.repo.central = www.apache.org
+maven.repo.central.directory = /www/www.apache.org/dist/java-repository/
+
1.332 +7 -7 maven/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven/project.xml,v
retrieving revision 1.331
retrieving revision 1.332
diff -u -r1.331 -r1.332
--- project.xml 5 May 2004 13:05:51 -0000 1.331
+++ project.xml 11 Jun 2004 23:43:43 -0000 1.332
@@ -50,7 +50,7 @@
<siteAddress>maven.apache.org</siteAddress>
<siteDirectory>/www/maven.apache.org/</siteDirectory>
<distributionSite>maven.apache.org</distributionSite>
- <distributionDirectory>/www/maven.apache.org/builds/</distributionDirectory>
+ <distributionDirectory>/www/www.apache.org/dist/java-repository/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven</connection>
<developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:maven</developerConnection>
@@ -113,15 +113,15 @@
<tag>MAVEN_1_0_RC1</tag>
</version>
<version>
- <id>rc2-SNAPSHOT</id>
- <name>1.0-rc2-SNAPSHOT</name>
- <tag>HEAD</tag>
- </version>
- <version>
<id>1.0-rc2</id>
<name>1.0-rc2</name>
<tag>MAVEN_1_0_RC2</tag>
</version>
+ <version>
+ <id>1.0-rc3</id>
+ <name>1.0-rc3</name>
+ <tag>MAVEN_1_0_RC3</tag>
+ </version>
</versions>
<branches/>
<mailingLists>
@@ -734,7 +734,7 @@
<dependency>
<groupId>maven</groupId>
<artifactId>maven-jelly-tags</artifactId>
- <version>20040429.235300</version>
+ <version>1.0</version>
</dependency>
</dependencies>
<build>
1.41 +1 -1 maven/src/bin/maven.bat
Index: maven.bat
===================================================================
RCS file: /home/cvs/maven/src/bin/maven.bat,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- maven.bat 23 Mar 2004 02:18:17 -0000 1.40
+++ maven.bat 11 Jun 2004 23:43:43 -0000 1.41
@@ -53,7 +53,7 @@
goto end
:OkJHome
-if exist %JAVA_HOME%\nul goto chkMHome
+if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
echo.
echo ERROR: JAVA_HOME is set to an invalid directory.
1.11 +1 -0 maven/src/conf/defaults.properties
Index: defaults.properties
===================================================================
RCS file: /home/cvs/maven/src/conf/defaults.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- defaults.properties 5 May 2004 13:05:52 -0000 1.10
+++ defaults.properties 11 Jun 2004 23:43:43 -0000 1.11
@@ -79,3 +79,4 @@
maven.username=USERNAME_NOT_SET
maven.remote.group=maven
+maven.property.inheritance=true
1.30 +4 -4 maven/src/conf/driver.jelly
Index: driver.jelly
===================================================================
RCS file: /home/cvs/maven/src/conf/driver.jelly,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- driver.jelly 23 Mar 2004 02:18:18 -0000 1.29
+++ driver.jelly 11 Jun 2004 23:43:43 -0000 1.30
@@ -49,15 +49,15 @@
<ant:fileset dir="${maven.home}/lib"/>
</ant:path>
- <j:if test="${sourcesPresent == 'true'}">
+ <ant:path id="maven.compile.src.set">
+ <j:if test="${sourcesPresent == 'true'}">
<!--
| FIXME: It would be nice for other plugins to have the source available
| as a fileset
|-->
- <ant:path id="maven.compile.src.set">
<ant:pathelement location="${pom.build.sourceDirectory}"/>
- </ant:path>
- </j:if>
+ </j:if>
+ </ant:path>
<j:if test="${unitTestSourcesPresent == 'true'}">
<ant:path id="maven.test.compile.src.set">
1.23 +1 -1 maven/src/java/org/apache/maven/MavenSession.java
Index: MavenSession.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenSession.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
1.16 +6 -6 maven/src/java/org/apache/maven/cli/CLIManager.java
Index: CLIManager.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/CLIManager.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- CLIManager.java 5 May 2004 13:05:52 -0000 1.15
+++ CLIManager.java 11 Jun 2004 23:43:44 -0000 1.16
@@ -100,12 +100,6 @@
.create( 'g' ) );
options.addOption( OptionBuilder
- .withLongOpt( "plugin-help" )
- .withDescription( "Display help on using a given plugin" )
- .hasOptionalArg()
- .create( 'P' ) );
-
- options.addOption( OptionBuilder
.withLongOpt( "usage" )
.withDescription( "Display help on using the current project" )
.create( 'u' ) );
@@ -145,6 +139,12 @@
.withLongOpt( "debug" )
.withDescription( "Produce execution debug output" )
.create( 'X' ) );
+
+ options.addOption( OptionBuilder
+ .withLongOpt( "plugin-help" )
+ .withDescription( "Display help on using a given plugin" )
+ .hasOptionalArg()
+ .create( 'P' ) );
}
/** Parse a string-array of command-line arguments.
1.11 +13 -5 maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java
Index: JellyPropsHandler.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JellyPropsHandler.java 5 May 2004 13:05:52 -0000 1.10
+++ JellyPropsHandler.java 11 Jun 2004 23:43:44 -0000 1.11
@@ -19,6 +19,7 @@
import org.apache.commons.grant.DefaultPropsHandler;
import org.apache.commons.jelly.JellyContext;
+import org.apache.commons.jelly.expression.Expression;
import java.util.Hashtable;
import java.util.Iterator;
@@ -78,7 +79,14 @@
}
else
{
- return value.toString();
+ if ( value instanceof Expression )
+ {
+ return ( ( Expression ) value ).evaluateAsString( context );
+ }
+ else
+ {
+ return value.toString();
+ }
}
}
@@ -92,11 +100,11 @@
Hashtable h = new Hashtable();
for ( Iterator i = this.context.getVariableNames(); i.hasNext();)
{
- String name = (String) i.next();
- Object value = this.context.getVariable( name );
- if ( value != null && value.toString() != null )
+ String name = ( String ) i.next();
+ String value = getProperty( name );
+ if ( value != null )
{
- h.put( name, value.toString() );
+ h.put( name, value );
}
}
return h;
1.20 +62 -9 maven/src/java/org/apache/maven/jelly/JellyUtils.java
Index: JellyUtils.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyUtils.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- JellyUtils.java 5 May 2004 13:05:52 -0000 1.19
+++ JellyUtils.java 11 Jun 2004 23:43:44 -0000 1.20
@@ -25,6 +25,7 @@
import org.apache.commons.jelly.expression.ExpressionFactory;
import org.apache.commons.jelly.parser.XMLParser;
import org.xml.sax.XMLReader;
+import org.xml.sax.InputSource;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;
@@ -64,6 +65,27 @@
XMLOutput output )
throws Exception
{
+ runScript( scriptInputStream, null, rootUrl, context, output );
+ }
+
+ /**
+ * Run a jelly script.
+ *
+ * @param scriptInputStream Script input stream.
+ * @param systemId the system identifier to help resolve relative URLs
+ * @param rootUrl Root explicit context of the script.
+ * @param context Jelly context.
+ * @param output Output sink.
+ * @throws Exception If an error occurs while locating, compiling or
+ * executing the script.
+ */
+ public static void runScript( InputStream scriptInputStream,
+ String systemId,
+ URL rootUrl,
+ JellyContext context,
+ XMLOutput output )
+ throws Exception
+ {
URL oldRoot = context.getRootURL();
URL oldCurrent = context.getCurrentURL();
@@ -73,7 +95,7 @@
context.setCurrentURL( rootUrl );
}
- Script script = compileScript( scriptInputStream, context );
+ Script script = compileScript( scriptInputStream, systemId, context );
script.run( context, output );
context.setRootURL( oldRoot );
@@ -102,6 +124,7 @@
}
runScript( new FileInputStream( scriptFile ),
+ scriptFile.getAbsolutePath(),
rootUrl,
context,
output );
@@ -120,7 +143,7 @@
JellyContext context )
throws Exception
{
- return compileScript( new FileInputStream(scriptFile), context );
+ return compileScript( new FileInputStream( scriptFile ), scriptFile.getAbsolutePath(), context );
}
/**
@@ -136,13 +159,32 @@
JellyContext context )
throws Exception
{
- return compileScript( scriptInputStream, context, null );
+ return compileScript( scriptInputStream, null, context, null );
}
/**
* Compile a jelly script.
*
* @param scriptInputStream Script input stream.
+ * @param systemId the system identifier to help resolve relative URLs
+ * @param context Jelly context.
+ * @throws Exception If an error occurs while locating or compiling the
+ * script.
+ * @return The compiled script.
+ */
+ public static Script compileScript( InputStream scriptInputStream,
+ String systemId,
+ JellyContext context )
+ throws Exception
+ {
+ return compileScript( scriptInputStream, systemId, context, null );
+ }
+
+ /**
+ * Compile a jelly script.
+ *
+ * @param scriptInputStream Script input stream.
+ * @param systemId the system identifier to help resolve relative URLs
* @param context Jelly context.
* @param encoding To use when reading XML.
* @throws Exception If an error occurs while locating or compiling the
@@ -150,7 +192,10 @@
* @return The compiled script.
* @todo throw something else
*/
- public static Script compileScript( InputStream scriptInputStream, JellyContext context, String encoding )
+ public static Script compileScript( InputStream scriptInputStream,
+ String systemId,
+ JellyContext context,
+ String encoding )
throws Exception
{
// FIXME: This should all be done by Jelly.
@@ -163,15 +208,19 @@
Script script = null;
+ InputSource source = null;
if ( encoding != null )
{
- script = parser.parse( new InputStreamReader( scriptInputStream, encoding ) );
+ source = new InputSource( new InputStreamReader( scriptInputStream, encoding ) ) ;
}
else
{
- script = parser.parse( scriptInputStream );
+ source = new InputSource( scriptInputStream );
}
+ source.setSystemId( systemId );
+ script = parser.parse( source );
+
script = script.compile();
return script;
@@ -237,7 +286,7 @@
}
/**
- * Populate a context with variables, including parent variables if inheritence is enabled.
+ * Populate a context with variables, including parent variables if inheritance is enabled.
*
* @param destContext the destination context
* @param srcContext the source context
@@ -246,7 +295,11 @@
{
if ( sourceContext != null )
{
- populateVariables( destContext, sourceContext.isInherit() ? sourceContext.getParent() : null );
+ if ( !"false".equals( sourceContext.getVariable( "maven.property.inheritance" ) ) &&
+ ( !"false".equals( destContext.getVariable( "maven.property.inheritance" ) ) ) )
+ {
+ populateVariables( destContext, sourceContext.isInherit() ? sourceContext.getParent() : null );
+ }
destContext.getVariables().putAll( sourceContext.getVariables() );
}
destContext.setVariable( "context", destContext );
1.8 +18 -0 maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java
Index: GoalToJellyScriptHousingMapper.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- GoalToJellyScriptHousingMapper.java 5 May 2004 13:05:53 -0000 1.7
+++ GoalToJellyScriptHousingMapper.java 11 Jun 2004 23:43:44 -0000 1.8
@@ -17,6 +17,7 @@
* ====================================================================
*/
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -241,9 +242,12 @@
*/
Set resolveJellyScriptHousings( String goal ) throws NoSuchGoalException
{
+ log.debug( "preparing goal: " + goal );
+
Set pluginSet = new InsertionOrderedSet();
Goal[] chain = getExecutionChain( goal, goalProject );
+ log.debug( "execution chain: " + Arrays.asList( chain ).toString() );
for ( int i = 0; i < chain.length; i++ )
{
@@ -255,13 +259,25 @@
}
pluginSet.add( plugin );
Collection decorators = getPostGoalDecorators( g.getName() );
+ if ( log.isDebugEnabled() && !decorators.isEmpty() )
+ {
+ log.debug( "goal " + g.getName() + " has postGoal decorators " + decorators );
+ }
pluginSet.addAll( decorators );
decorators = getPreGoalDecorators( g.getName() );
+ if ( log.isDebugEnabled() && !decorators.isEmpty() )
+ {
+ log.debug( "goal " + g.getName() + " has preGoal decorators " + decorators );
+ }
pluginSet.addAll( decorators );
}
// Done like this as the dynatag plugin dependencies must be first in the list
InsertionOrderedSet newPluginSet = resolveDynaTagPlugins( pluginSet );
+ if ( log.isDebugEnabled() && !newPluginSet.isEmpty() )
+ {
+ log.debug( "dynatag dependencies: " + newPluginSet );
+ }
newPluginSet.addAll( pluginSet );
pluginSet = newPluginSet;
@@ -270,6 +286,8 @@
// TODO: skip the remove step - don't add if it is already loaded
pluginSet.removeAll( resolvedPlugins );
resolvedPlugins.addAll( pluginSet );
+
+ log.debug( "final list of plugins to prepare: " + pluginSet );
return pluginSet;
}
1.8 +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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JellyScriptHousing.java 5 May 2004 13:05:53 -0000 1.7
+++ JellyScriptHousing.java 11 Jun 2004 23:43:44 -0000 1.8
@@ -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.21 +45 -13 maven/src/java/org/apache/maven/plugin/PluginCacheManager.java
Index: PluginCacheManager.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginCacheManager.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- PluginCacheManager.java 5 May 2004 13:05:53 -0000 1.20
+++ PluginCacheManager.java 11 Jun 2004 23:43:44 -0000 1.21
@@ -22,9 +22,11 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
@@ -45,7 +47,7 @@
/** Log. */
private static final Log log = LogFactory.getLog( PluginCacheManager.class );
/** Maven session log */
- private static final Log sessionLog = LogFactory.getLog(MavenSession.class);
+ private static final Log sessionLog = LogFactory.getLog( MavenSession.class );
/** Plug-in cache lock. */
public static final String LOCK_CACHE = "lock.cache";
@@ -485,6 +487,10 @@
clearCache();
return false;
}
+ //if ( log.isDebugEnabled() )
+ //{
+ //log.debug( "cached dynatag dep by " + pluginName + " for taglibs " + pluginDynaTagDepsCache.get( pluginName ) );
+ //}
}
for ( Iterator i = pluginCache.keySet().iterator(); i.hasNext(); )
{
@@ -496,6 +502,10 @@
clearCache();
return false;
}
+ //if ( log.isDebugEnabled() )
+ //{
+ //log.debug( "cached goal " + goalName + " in plugin " + pluginName );
+ //}
}
for ( Iterator i = artifactIdCache.keySet().iterator(); i.hasNext(); )
{
@@ -520,20 +530,22 @@
: callbackName.substring( 0, callbackName.length() - 5 );
String pluginNames = callbackCache.getProperty( callbackName );
StringTokenizer tok = new StringTokenizer( pluginNames, "," );
+ List housings = new ArrayList();
+ if ( isPreGoal )
+ {
+ preGoals.put( goalName, housings );
+ }
+ else
+ {
+ postGoals.put( goalName, housings );
+ }
while ( tok.hasMoreTokens() )
{
String pluginName = tok.nextToken();
JellyScriptHousing housing = loadHousing( pluginName, manager, pluginDirs, "callbacks" );
if ( housing != null )
{
- if ( isPreGoal )
- {
- preGoals.put( goalName, housing );
- }
- else
- {
- postGoals.put( goalName, housing );
- }
+ housings.add( housing );
}
else
{
@@ -553,20 +565,40 @@
clearCache();
return false;
}
+ //if ( log.isDebugEnabled() )
+ //{
+ //log.debug( "cached dynataglib " + uri + " in plugin " + pluginName );
+ //}
}
// Now map the clean set of plugins
for ( Iterator i = preGoals.keySet().iterator(); i.hasNext(); )
{
String goalName = ( String ) i.next();
- JellyScriptHousing housing = ( JellyScriptHousing ) preGoals.get( goalName );
- mapper.addPreGoal( goalName, housing );
+ List housings = ( List ) preGoals.get( goalName );
+ for ( Iterator j = housings.iterator(); j.hasNext(); )
+ {
+ JellyScriptHousing housing = ( JellyScriptHousing ) j.next();
+ mapper.addPreGoal( goalName, housing );
+ //if ( log.isDebugEnabled() )
+ //{
+ //log.debug( "cached preGoal on " + goalName + " in plugin " + housing.getName() );
+ //}
+ }
}
for ( Iterator i = postGoals.keySet().iterator(); i.hasNext(); )
{
String goalName = ( String ) i.next();
- JellyScriptHousing housing = ( JellyScriptHousing ) postGoals.get( goalName );
- mapper.addPostGoal( goalName, housing );
+ List housings = ( List ) postGoals.get( goalName );
+ for ( Iterator j = housings.iterator(); j.hasNext(); )
+ {
+ JellyScriptHousing housing = ( JellyScriptHousing ) j.next();
+ mapper.addPostGoal( goalName, housing );
+ //if ( log.isDebugEnabled() )
+ //{
+ //log.debug( "cached postGoal on " + goalName + " in plugin " + housing.getName() );
+ //}
+ }
}
for ( Iterator i = pluginDynaTagDepsCache.keySet().iterator(); i.hasNext(); )
1.75 +12 -3 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.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- PluginManager.java 5 May 2004 13:05:53 -0000 1.74
+++ PluginManager.java 11 Jun 2004 23:43:44 -0000 1.75
@@ -19,6 +19,7 @@
import com.werken.forehead.Forehead;
import com.werken.forehead.ForeheadClassLoader;
+import com.werken.werkz.NoSuchGoalException;
import com.werken.werkz.Session;
import com.werken.werkz.WerkzProject;
import com.werken.werkz.jelly.JellySession;
@@ -33,6 +34,7 @@
import org.apache.maven.MavenException;
import org.apache.maven.MavenSession;
import org.apache.maven.MavenUtils;
+import org.apache.maven.UnknownGoalException;
import org.apache.maven.jelly.JellyUtils;
import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.project.Dependency;
@@ -519,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 );
@@ -603,7 +605,14 @@
{
String goalName = ( String ) i.next();
log.debug( "attaining goal " + goalName );
- werkzProject.attainGoal( goalName, session );
+ try
+ {
+ werkzProject.attainGoal( goalName, session );
+ }
+ catch ( NoSuchGoalException e )
+ {
+ throw new UnknownGoalException( goalName );
+ }
}
}
finally
1.6 +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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PluginScriptParser.java 5 May 2004 13:05:53 -0000 1.5
+++ PluginScriptParser.java 11 Jun 2004 23:43:44 -0000 1.6
@@ -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 )
{
1.29 +2 -2 maven/src/java/org/apache/maven/project/Build.java
Index: Build.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Build.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Build.java 5 May 2004 13:05:53 -0000 1.28
+++ Build.java 11 Jun 2004 23:43:44 -0000 1.29
@@ -315,7 +315,7 @@
}
/**
- * Setup inheritence from a parent project build element.
+ * Setup inheritance from a parent project build element.
* @param parent the parent build element
*/
void mergeParent(Build parent)
1.98 +2 -2 maven/src/java/org/apache/maven/project/Project.java
Index: Project.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Project.java,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- Project.java 5 May 2004 13:05:53 -0000 1.97
+++ Project.java 11 Jun 2004 23:43:44 -0000 1.98
@@ -1508,7 +1508,7 @@
}
/**
- * Setup inheritence from a parent project.
+ * Setup inheritance from a parent project.
*
* @param parent the parent project
*/
1.15 +1 -1 maven/src/java/org/apache/maven/project/UnitTest.java
Index: UnitTest.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/UnitTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- UnitTest.java 23 Mar 2004 02:18:21 -0000 1.14
+++ UnitTest.java 11 Jun 2004 23:43:44 -0000 1.15
@@ -113,7 +113,7 @@
}
/**
- * Setup inheritence from a parent test element.
+ * Setup inheritance from a parent test element.
* @param parent the parent test element
*/
void mergeParent(UnitTest parent)
1.10 +1 -1 maven/src/test/java/org/apache/maven/plugin/PluginCacheManagerTest.java
Index: PluginCacheManagerTest.java
===================================================================
RCS file: /home/cvs/maven/src/test/java/org/apache/maven/plugin/PluginCacheManagerTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- PluginCacheManagerTest.java 5 May 2004 13:05:54 -0000 1.9
+++ PluginCacheManagerTest.java 11 Jun 2004 23:43:44 -0000 1.10
@@ -57,7 +57,7 @@
{
PluginCacheManager pgb = new PluginCacheManager();
JellyScriptHousing housing = new JellyScriptHousing( new File( PLUGIN_SCRIPT ).getParentFile(), null );
- housing.parse( pgb, new FileInputStream( new File( PLUGIN_SCRIPT )));
+ housing.parse( pgb, PLUGIN_SCRIPT, new FileInputStream( new File( PLUGIN_SCRIPT )));
assertEquals("Generate docs in APT format>xdoc:generate-from-pom",
pgb.getGoalCache().getProperty("apt:generate"));
1.47 +38 -2 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.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- maven.xml 5 May 2004 13:05:54 -0000 1.46
+++ maven.xml 11 Jun 2004 23:43:44 -0000 1.47
@@ -15,6 +15,7 @@
* limitations under the License.
*/
-->
+
<project
default="jar:jar"
xmlns:j="jelly:core"
@@ -212,8 +213,10 @@
<attainGoal name="test-reactor-run-twice" />
<attainGoal name="test-context-switch" />
<attainGoal name="test-defaults" />
- <attainGoal name="test-inheritence" />
+ <attainGoal name="test-inheritance" />
<attainGoal name="test-non-jar-dependency-path" />
+ <attainGoal name="test-entity-goal" />
+ <attainGoal name="test-plugin-getset" />
<!-- TODO - this is still broken (as in RC1)
<attainGoal name="test-reactor-maven-username" />
@@ -756,7 +759,7 @@
/>
</goal>
- <goal name="test-inheritence">
+ <goal name="test-inheritance">
<ant:echo>Testing 1 level</ant:echo>
<maven:maven
descriptor="${basedir}/src/reactor-build/inheritence/subproject/project.xml"
@@ -802,6 +805,39 @@
<u:replace oldChar="\" newChar="/" var="warRepoPath" value="${maven.repo.local}/touchstone/wars/test-SNAPSHOT.war" />
<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>
+
+ <goal name="test-plugin-getset">
+ <attainGoal name="touchstone-goal-B"/>
+ <echo>test maven:get</echo>
+ <maven:get var="checkValue" plugin="maven-touchstone-plugin" property="touchstone_goal_B_from_plugin"/>
+ <j:if test="${checkValue != 'true'}">
+ <fail message=""> maven:get failed </fail>
+ </j:if>
+ <echo>test maven:pluginVar (deprecated)</echo>
+ <maven:pluginVar var="checkValue" plugin="maven-touchstone-plugin" property="touchstone_goal_B_from_plugin"/>
+ <j:if test="${checkValue != 'true'}">
+ <fail message=""> maven:pluginVar failed </fail>
+ </j:if>
+ <echo>test maven:set</echo>
+ <maven:set plugin="maven-touchstone-plugin" property="touchstone_goal_B_from_plugin" value="blah"/>
+ <maven:get var="checkValue" plugin="maven-touchstone-plugin" property="touchstone_goal_B_from_plugin"/>
+ <j:if test="${checkValue != 'blah'}">
+ <fail message=""> maven:set failed </fail>
</j:if>
</goal>
</project>
1.3 +24 -24 maven/src/test/touchstone-build/src/reactor-build/default/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven/src/test/touchstone-build/src/reactor-build/default/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.xml 23 Mar 2004 02:18:27 -0000 1.2
+++ project.xml 11 Jun 2004 23:43:44 -0000 1.3
@@ -16,27 +16,27 @@
* limitations under the License.
*/
-->
-
-<project>
- <pomVersion>3</pomVersion>
- <currentVersion>1.0</currentVersion>
- <name>root</name>
- <organization/>
- <inceptionYear/>
- <package/>
- <logo/>
- <shortDescription/>
- <url/>
- <siteAddress/>
- <siteDirectory/>
- <distributionSite/>
- <distributionDirectory/>
- <repository/>
- <mailingLists/>
- <developers/>
- <dependencies/>
- <build>
- <sourceDirectory/>
- <unitTestSourceDirectory/>
- </build>
-</project>
+
+<project>
+ <pomVersion>3</pomVersion>
+ <currentVersion>1.0</currentVersion>
+ <name>root</name>
+ <organization/>
+ <inceptionYear/>
+ <package/>
+ <logo/>
+ <shortDescription/>
+ <url/>
+ <siteAddress/>
+ <siteDirectory/>
+ <distributionSite/>
+ <distributionDirectory/>
+ <repository/>
+ <mailingLists/>
+ <developers/>
+ <dependencies/>
+ <build>
+ <sourceDirectory/>
+ <unitTestSourceDirectory/>
+ </build>
+</project>
1.2 +33 -0 maven/src/test/touchstone-build/src/reactor-build/entity-test/maven.xml
1.2 +22 -0 maven/src/test/touchstone-build/src/reactor-build/entity-test/project.xml
1.2 +4 -0 maven/src/test/touchstone-build/src/reactor-build/entity-test/entity/entity.xml
1.2 +23 -0 maven/src/test/touchstone-build/src/reactor-build/entity-test/subproject/project.xml
1.23 +6 -5 maven/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/changes.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- changes.xml 5 May 2004 13:05:54 -0000 1.22
+++ changes.xml 11 Jun 2004 23:43:44 -0000 1.23
@@ -49,18 +49,19 @@
</action>
</release>
- <release version="1.0RC3" date="in CVS">
+ <release version="1.0-rc3" date="2004-05-13">
+ <action dev="brett" type="add" issue="MAVEN-1255">Introduce a backwards compatibility option <code>maven.property.inheritance</code>, which disables the functionality when set to false.</action>
+ <action dev="brett" type="fix" issue="MAVEN-37">Parent project properties are now correctly loaded from extended project.xml files. This was implemented previously, but the properties were not being passed through to the final goal attainment context.</action>
+ <action dev="brett" type="fix" issue="MAVEN-1275" due-to="Henning Schmiedehausen">Evaluate context variables before inserting them into the ant properties</action>
+ <action dev="brett" type="fix" issue="MAVEN-1223" due-to="joseph benavidez">Have system entities with relative paths in maven.xml and plugin scripts resolve relative to the correct location.</action>
<action dev="brett" type="fix" issue="MAVEN-1265">Setup dependency path for non-classpath dependencies</action>
+ <action dev="brett" type="fix" issue="MAVEN-956">Fix install_repo.bat problems on Windows 98</action>
<action dev="brett" type="update" issue="MAVEN-1129" due-to="John Casey">Add a Base64 implementation to replace the sun.* internal version.</action>
<action dev="brett" type="update" issue="MAVEN-1129">Remove tools.jar from startup classpath so it will run on non-Sun JVMs such as Kaffe.</action>
<action dev="brett" type="fix" issue="MAVEN-1219">Allow plugin installation and uninstallation from the plugin manager and the cache so that it can be done on the fly.</action>
- <action dev="brett" type="fix" issue="MAVEN-37">Parent project properties are now correctly loaded from extended project.xml files. This was implemented previously, but the properties were not being passed through to the final goal attainment context.</action>
<action dev="brett" type="update">Move maven jelly tags to maven-jelly-tags subproject</action>
<action dev="brett" type="update">Show extended information with --info: list of installed plugins (including versions), and ~/build.properties</action>
<action dev="brett" type="add">Show help on how to submit a bug report if Maven dies with an unexpected exception</action>
-<!-- Implemented, but needs more testing - not in CVS yet
- <action dev="brett" type="fix" issue="MAVEN-1080">Use temporary file while downloading from repository so local repository artifacts never get corrupted.</action>
--->
<action dev="evenisse" type="fix" issue="MAVEN-1226">Snapshot is now downloaded only if the remote version is more recent than local version.</action>
<action dev="brett" type="add">Add maven.remote.group to defaults.properties</action>
<action dev="brett" type="add">Add sort attribute to reactor tag.</action>
1.7 +40 -1 maven/xdocs/faq.fml
Index: faq.fml
===================================================================
RCS file: /home/cvs/maven/xdocs/faq.fml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- faq.fml 23 Mar 2004 02:18:31 -0000 1.6
+++ faq.fml 11 Jun 2004 23:43:44 -0000 1.7
@@ -247,6 +247,27 @@
</faq>
</part>
+
+ <part id="jelly">
+ <title>Jelly Usage</title>
+ <faq id="plugin-variables">
+ <question>How do I get or set plugin properties from Jelly?</question>
+ <answer>
+ <p>Plugin properties can be used with the following tags:
+ <a href="/reference/maven-jelly-tags/tags.html#maven:get">maven:get</a> and
+ <a href="/reference/maven-jelly-tags/tags.html#maven:set">maven:set</a>.
+ (These replace the deprecated versions of <code>${pom.getPluginContext(...).get/setVariable()}</code>
+ and <code>maven:pluginVar</code>.)</p>
+ <p>Example:</p>
+ <source>
+<maven:get plugin="maven-war-plugin" property="maven.war.src" var="warSourceDir" />
+<echo>The WAR source directory is ${warSourceDir}<echo>
+...
+<maven:set plugin="maven-multiproject-plugin" property="maven.multiproject.includes" value="subprojects/*/project.xml"/>
+ </source>
+ </answer>
+ </faq>
+ </part>
<part id="errors">
<title>Errors</title>
@@ -291,7 +312,25 @@
</part>
<part id="recent-changes">
- <title>Recent Changes</title>
+ <title>Recent Changes (Migrating from older versions of Maven)</title>
+
+ <faq id="property-inheritance">
+ <question>Why are strange property values appearing from other parts of my project?</question>
+ <answer>
+ <p>Early in RC3, the bug that caused project.properties file inheritance to fail was fixed. This means
+ that if you extend another project.xml file, you also inherit the project.properties and build.properties
+ files from the same directory.</p>
+ <p>While this was a highly demanded fix, some builds may have come to depend on it not working (including
+ the Maven build itself!). This is usually due to having a master build project that also serves as a base
+ project extended by a set of subprojects, and wanting the properties to apply to the master, but not to the
+ subprojects.</p>
+ <p>We recommend that you separate these concerns by having both a master build project and a parent project
+ for extension (see the maven-plugins CVS tree for an example).</p>
+ <p>However, should you need to maintain your old structure, and you are encountering these problems, you can
+ add the following property to stop parents from being inherited:</p>
+ <source>maven.property.inheritance=false</source>
+ </answer>
+ </faq>
<faq id="classloader-property">
<question>Why shouldn't I use the dependency classloader override property?</question>
1.4 +1 -1 maven/xdocs/navigation-pdf.xml
Index: navigation-pdf.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/navigation-pdf.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- navigation-pdf.xml 23 Mar 2004 02:18:31 -0000 1.3
+++ navigation-pdf.xml 11 Jun 2004 23:43:44 -0000 1.4
@@ -42,7 +42,7 @@
<item name="User Guide" href="/reference/user-guide.html"/>
<item name="Plugins" href="/reference/plugins/index.html"/>
<item name="FAQ" href="/faq.html"/>
- <item name="Jelly Tags" href="/tags.html"/>
+ <item name="Maven Jelly Tags" href="/reference/maven-jelly-tags/index.html"/>
<item name="Project Layout" href="/reference/dirlayout.html">
<item name="Site Navigation" href="/site.html"/>
</item>
1.41 +1 -1 maven/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/navigation.xml,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- navigation.xml 5 May 2004 13:05:54 -0000 1.40
+++ navigation.xml 11 Jun 2004 23:43:44 -0000 1.41
@@ -25,7 +25,7 @@
<links>
<item name="Jelly" href="http://jakarta.apache.org/commons/jelly/index.html"/>
<item name="Plugins" href="/reference/plugins/index.html"/>
- <item name="PDF Documentation" href="/maven.pdf"/>
+ <item name="PDF Documentation" href="/maven.pdf" img="/images/pdf.gif"/>
</links>
<menu name="Quick Links">
1.13 +33 -15 maven/xdocs/repository-upload.xml
Index: repository-upload.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/repository-upload.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- repository-upload.xml 9 May 2004 23:10:22 -0000 1.12
+++ repository-upload.xml 11 Jun 2004 23:43:44 -0000 1.13
@@ -21,6 +21,7 @@
<properties>
<author email="bwalding@apache.org">Ben Walding</author>
+ <author email="jason@maven.org">Jason van Zyl</author>
<title>Uploading to ibiblio</title>
</properties>
@@ -66,24 +67,41 @@
<section name="Step 2. Posting the request">
<p>
- Post your request to <a href="http://jira.codehaus.org/secure/CreateIssue.jspa?pid=10367&issuetype=3">JIRA</a>.
+ Post your request to <a href="http://jira.codehaus.org/secure/CreateIssue.jspa?pid=10367&issuetype=3">JIRA</a>.
+ The first line of the description should be the URL of the upload bundle, then leave a blank line and place
+ any additional comments you wish in the following paragraph. So the
+ description field might look like:
</p>
-
- <p>
- <ol>
- <li>Provide the URL to the upload bundle created in the previous step.</li>
- </ol>
- </p>
+
+ <source>
+ http://wiggle.sourceforge.net/downloads/wiggle-1.0-bundle.jar
+
+ Wiggle is a fantastic new piece of software for automating the
+ clipping of nose hairs. Please upload! DO IT NOW!
+ </source>
+
</section>
-
- <section name="Step 3. Patience">
+
+ <section name="Explanation">
<p>
- Currently there are a dozen or so Maven developers that have
- accounts on Ibiblio and we realize this is a bottleneck at the
- moment but please be patient. We are working on an application that will allow any
- development group to get artifacts to the repository. We certainly
- don't intend for this to be a manual process for much longer.
- </p>
+ Some folks have asked why do we require the POM and license each
+ time an artifact is deployed so here's a small explanation. The POM
+ being deployed with the artifact is part of the process to make
+ transitive dependencies a reality in Maven. The logic for getting
+ transitive dependencies working is really not that hard, the problem
+ is getting the data. So we have changed the process of uploading
+ artifacts to include the POM in an attempt to get transitive
+ dependencies working as quickly as possible. The other applications
+ that may be possible having all the POMs available for artifacts
+ are vast, so by placing them into the repository as part of the
+ process we open up the doors to new ideas that involve unified
+ access to project POMs. We also ask for a license now because it is
+ possible that your project's license may change in the course of
+ its life time and we are trying create tools to help normal people
+ sort out licensing issues. For example, knowing all the licenses
+ for a particular graph of artifacts we could have some strategies
+ that would identify potential licensing problems.
+ </p>
</section>
</body>
</document>
1.3 +1 -1 maven/xdocs/misc/tasks.xml
Index: tasks.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/misc/tasks.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tasks.xml 23 Mar 2004 02:18:33 -0000 1.2
+++ tasks.xml 11 Jun 2004 23:43:45 -0000 1.3
@@ -181,7 +181,7 @@
of deps and all that jazz.
</li>
<li>
- POM inheritence mechanism. Will wait for the switch to betwixt.
+ POM inheritance mechanism. Will wait for the switch to betwixt.
</li>
<li>
Generation of a standard build.xml file.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org