You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/08/25 23:11:25 UTC
svn commit: r688884 [6/6] - in /maven/components/branches/maven-2.0.x: ./
apache-maven/ apache-maven/src/bin/ apache-maven/src/conf/
apache-maven/src/site/ apache-maven/src/site/apt/
apache-maven/src/site/apt/scripting-support/ bootstrap/ bootstrap/boo...
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java Mon Aug 25 14:11:19 2008
@@ -22,32 +22,20 @@
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
-import org.apache.maven.project.DefaultProjectBuilderConfiguration;
-import org.apache.maven.project.ProjectBuilderConfiguration;
-import org.apache.maven.project.path.PathTranslator;
-import org.codehaus.plexus.interpolation.InterpolationException;
-import org.codehaus.plexus.interpolation.MapBasedValueSource;
-import org.codehaus.plexus.interpolation.ObjectBasedValueSource;
-import org.codehaus.plexus.interpolation.PrefixAwareRecursionInterceptor;
-import org.codehaus.plexus.interpolation.PrefixedObjectValueSource;
-import org.codehaus.plexus.interpolation.PrefixedValueSourceWrapper;
-import org.codehaus.plexus.interpolation.RecursionInterceptor;
-import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
-import org.codehaus.plexus.interpolation.ValueSource;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* Use a regular expression search to find and resolve expressions within the POM.
@@ -60,49 +48,19 @@
extends AbstractLogEnabled
implements ModelInterpolator
{
- private static final List PROJECT_PREFIXES = Arrays.asList( new String[]{ "pom.", "project." } );
+ private static final Pattern EXPRESSION_PATTERN = Pattern.compile( "\\$\\{(pom\\.|project\\.|env\\.)?([^}]+)\\}" );
- private static final List TRANSLATED_PATH_EXPRESSIONS;
-
- static
- {
- List translatedPrefixes = new ArrayList();
-
- // MNG-1927, MNG-2124, MNG-3355:
- // If the build section is present and the project directory is non-null, we should make
- // sure interpolation of the directories below uses translated paths.
- // Afterward, we'll double back and translate any paths that weren't covered during interpolation via the
- // code below...
- translatedPrefixes.add( "build.directory" );
- translatedPrefixes.add( "build.outputDirectory" );
- translatedPrefixes.add( "build.testOutputDirectory" );
- translatedPrefixes.add( "build.sourceDirectory" );
- translatedPrefixes.add( "build.testSourceDirectory" );
- translatedPrefixes.add( "build.scriptSourceDirectory" );
- translatedPrefixes.add( "reporting.outputDirectory" );
-
- TRANSLATED_PATH_EXPRESSIONS = translatedPrefixes;
- }
-
- private PathTranslator pathTranslator;
+ private Properties envars;
public RegexBasedModelInterpolator( Properties envars )
{
- }
-
- // for testing.
- protected RegexBasedModelInterpolator( PathTranslator pathTranslator )
- {
- this.pathTranslator = pathTranslator;
+ this.envars = envars;
}
- /**
- * @todo: Remove the throws clause.
- * @throws IOException This exception is not thrown any more, and needs to be removed.
- */
public RegexBasedModelInterpolator()
throws IOException
{
+ envars = CommandLineUtils.getSystemEnvVars();
}
public Model interpolate( Model model, Map context )
@@ -120,27 +78,10 @@
* @param model The inbound Model instance, to serialize and reference for expression resolution
* @param context The other context map to be used during resolution
* @return The resolved instance of the inbound Model. This is a different instance!
- *
- * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
*/
public Model interpolate( Model model, Map context, boolean strict )
throws ModelInterpolationException
{
- Properties props = new Properties();
- props.putAll( context );
-
- return interpolate( model,
- null,
- new DefaultProjectBuilderConfiguration().setExecutionProperties( props ),
- true );
- }
-
- public Model interpolate( Model model,
- File projectDir,
- ProjectBuilderConfiguration config,
- boolean debugEnabled )
- throws ModelInterpolationException
- {
StringWriter sWriter = new StringWriter();
MavenXpp3Writer writer = new MavenXpp3Writer();
@@ -154,7 +95,7 @@
}
String serializedModel = sWriter.toString();
- serializedModel = interpolate( serializedModel, model, projectDir, config, debugEnabled );
+ serializedModel = interpolateInternal( serializedModel, model, context );
StringReader sReader = new StringReader( serializedModel );
@@ -177,123 +118,79 @@
return model;
}
- /**
- * Interpolates all expressions in the src parameter.
- * <p>
- * The algorithm used for each expression is:
- * <ul>
- * <li>If it starts with either "pom." or "project.", the expression is evaluated against the model.</li>
- * <li>If the value is null, get the value from the context.</li>
- * <li>If the value is null, but the context contains the expression, don't replace the expression string
- * with the value, and continue to find other expressions.</li>
- * <li>If the value is null, get it from the model properties.</li>
- * <li>
- * @param overrideContext
- * @param outputDebugMessages
- */
- public String interpolate( String src,
- Model model,
- final File projectDir,
- ProjectBuilderConfiguration config,
- boolean debug )
+ private String interpolateInternal( String src, Model model, Map context )
throws ModelInterpolationException
{
- Logger logger = getLogger();
-
- String timestampFormat = DEFAULT_BUILD_TIMESTAMP_FORMAT;
-
- Properties modelProperties = model.getProperties();
- if ( modelProperties != null )
+ String result = src;
+ Matcher matcher = EXPRESSION_PATTERN.matcher( result );
+ while ( matcher.find() )
{
- timestampFormat = modelProperties.getProperty( BUILD_TIMESTAMP_FORMAT_PROPERTY, timestampFormat );
- }
+ String wholeExpr = matcher.group( 0 );
+ String realExpr = matcher.group( 2 );
- ValueSource modelValueSource1 = new PrefixedObjectValueSource( PROJECT_PREFIXES, model, false );
- ValueSource modelValueSource2 = new ObjectBasedValueSource( model );
+ Object value = context.get( realExpr );
- ValueSource basedirValueSource = new PrefixedValueSourceWrapper( new ValueSource(){
- public Object getValue( String expression )
+ if ( value == null )
{
- if ( projectDir != null && "basedir".equals( expression ) )
+ // This may look out of place, but its here for the MNG-2124/MNG-1927 fix described in the project builder
+ if ( context.containsKey( realExpr ) )
{
- return projectDir.getAbsolutePath();
+ // It existed, but was null. Leave it alone.
+ continue;
}
- return null;
+ value = model.getProperties().getProperty( realExpr );
}
- },
- PROJECT_PREFIXES, true );
-
- RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
-
- // NOTE: Order counts here!
- interpolator.addValueSource( basedirValueSource );
- interpolator.addValueSource( new BuildTimestampValueSource( config.getBuildStartTime(), timestampFormat ) );
- interpolator.addValueSource( new MapBasedValueSource( config.getExecutionProperties() ) );
- interpolator.addValueSource( modelValueSource1 );
- interpolator.addValueSource( new PrefixedValueSourceWrapper( new MapBasedValueSource( modelProperties ), PROJECT_PREFIXES, true ) );
- interpolator.addValueSource( modelValueSource2 );
- interpolator.addValueSource( new MapBasedValueSource( config.getUserProperties() ) );
-
- PathTranslatingPostProcessor pathTranslatingPostProcessor =
- new PathTranslatingPostProcessor( TRANSLATED_PATH_EXPRESSIONS, projectDir, pathTranslator );
-
- interpolator.addPostProcessor( pathTranslatingPostProcessor );
-
- RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
-
- String result = src;
- try
- {
- result = interpolator.interpolate( result, "", recursionInterceptor );
- }
- catch( InterpolationException e )
- {
- throw new ModelInterpolationException( e.getMessage(), e );
- }
- if ( debug )
- {
- List feedback = interpolator.getFeedback();
- if ( feedback != null && !feedback.isEmpty() )
+ if ( value == null )
{
- logger.debug( "Maven encountered the following problems during initial POM interpolation:" );
-
- Object last = null;
- for ( Iterator it = feedback.iterator(); it.hasNext(); )
+ try
{
- Object next = it.next();
-
- if ( next instanceof Throwable )
- {
- if ( last == null )
- {
- logger.debug( "", ( (Throwable) next ) );
- }
- else
- {
- logger.debug( String.valueOf( last ), ( (Throwable) next ) );
- }
- }
- else
+ // NOTE: We've already trimmed off any leading expression parts like 'project.'
+ // or 'pom.', and now we have to ensure that the ReflectionValueExtractor
+ // doesn't try to do it again.
+ value = ReflectionValueExtractor.evaluate( realExpr, model, false );
+ }
+ catch ( Exception e )
+ {
+ Logger logger = getLogger();
+ if ( logger != null )
{
- if ( last != null )
- {
- logger.debug( String.valueOf( last ) );
- }
-
- last = next;
+ logger.debug( "POM interpolation cannot proceed with expression: " + wholeExpr + ". Skipping...", e );
}
}
+ }
- if ( last != null )
- {
- logger.debug( String.valueOf( last ) );
- }
+ if ( value == null )
+ {
+ value = envars.getProperty( realExpr );
+ }
+
+ // if the expression refers to itself, skip it.
+ if ( String.valueOf( value ).indexOf( wholeExpr ) > -1 )
+ {
+ throw new ModelInterpolationException( wholeExpr, "Expression value '" + value + "' references itself in '" + model.getId() + "'." );
}
- }
- interpolator.clearFeedback();
+ if ( value != null )
+ {
+ result = StringUtils.replace( result, wholeExpr, String.valueOf( value ) );
+ // could use:
+ // result = matcher.replaceFirst( stringValue );
+ // but this could result in multiple lookups of stringValue, and replaceAll is not correct behaviour
+ matcher.reset( result );
+ }
+/*
+ // This is the desired behaviour, however there are too many crappy poms in the repo and an issue with the
+ // timing of executing the interpolation
+
+ else
+ {
+ throw new ModelInterpolationException(
+ "Expression '" + wholeExpr + "' did not evaluate to anything in the model" );
+ }
+*/
+ }
return result;
}
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java Mon Aug 25 14:11:19 2008
@@ -21,7 +21,6 @@
import org.apache.maven.model.Build;
import org.apache.maven.model.Model;
-import org.apache.maven.model.Reporting;
import org.apache.maven.model.Resource;
import java.io.File;
@@ -29,27 +28,13 @@
import java.util.Iterator;
import java.util.List;
-/**
- * Default implementation of {@link PathTranslator}.
- */
public class DefaultPathTranslator
implements PathTranslator
{
- private static final String[] BASEDIR_EXPRESSIONS = {
- "${basedir}",
- "${pom.basedir}",
- "${project.basedir}"
- };
-
- private static final String FILE_SEPARATOR = File.separator;
+ private String FILE_SEPARATOR = "/";
public void alignToBaseDirectory( Model model, File basedir )
{
- if ( basedir == null )
- {
- return;
- }
-
Build build = model.getBuild();
if ( build != null )
@@ -60,8 +45,6 @@
build.setTestSourceDirectory( alignToBaseDirectory( build.getTestSourceDirectory(), basedir ) );
- build.setScriptSourceDirectory( alignToBaseDirectory( build.getScriptSourceDirectory(), basedir ) );
-
for ( Iterator i = build.getResources().iterator(); i.hasNext(); )
{
Resource resource = (Resource) i.next();
@@ -91,67 +74,35 @@
build.setOutputDirectory( alignToBaseDirectory( build.getOutputDirectory(), basedir ) );
build.setTestOutputDirectory( alignToBaseDirectory( build.getTestOutputDirectory(), basedir ) );
-
- Reporting reporting = model.getReporting();
- if ( reporting != null )
- {
- reporting.setOutputDirectory( alignToBaseDirectory( reporting.getOutputDirectory(), basedir ) );
- }
}
}
- /**
- * {@inheritDoc}
- */
public String alignToBaseDirectory( String path, File basedir )
{
- if ( basedir == null )
- {
- return path;
- }
-
- if ( path == null )
- {
- return null;
- }
-
String s = stripBasedirToken( path );
if ( requiresBaseDirectoryAlignment( s ) )
{
s = new File( new File( basedir, s ).toURI().normalize() ).getAbsolutePath();
}
-
- s = s.replace( '/', File.separatorChar );
- s = s.replace( '\\', File.separatorChar );
return s;
}
private String stripBasedirToken( String s )
{
+ String basedirExpr = "${basedir}";
+
if ( s != null )
{
- String basedirExpr = null;
- for ( int i = 0; i < BASEDIR_EXPRESSIONS.length; i++ )
- {
- basedirExpr = BASEDIR_EXPRESSIONS[i];
- if ( s.startsWith( basedirExpr ) )
- {
- break;
- }
- else
- {
- basedirExpr = null;
- }
- }
+ s = s.trim();
- if ( basedirExpr != null )
+ if ( s.startsWith( basedirExpr ) )
{
if ( s.length() > basedirExpr.length() )
{
- // Take out basedir expression and the leading slash
- s = chopLeadingFileSeparator( s.substring( basedirExpr.length() ) );
+ // Take out ${basedir} and the leading slash
+ s = s.substring( basedirExpr.length() + 1 );
}
else
{
@@ -163,25 +114,6 @@
return s;
}
- /**
- * Removes the leading directory separator from the specified filesystem path (if any). For platform-independent
- * behavior, this method accepts both the forward slash and the backward slash as separator.
- *
- * @param path The filesystem path, may be <code>null</code>.
- * @return The altered filesystem path or <code>null</code> if the input path was <code>null</code>.
- */
- private String chopLeadingFileSeparator( String path )
- {
- if ( path != null )
- {
- if ( path.startsWith( "/" ) || path.startsWith( "\\" ) )
- {
- path = path.substring( 1 );
- }
- }
- return path;
- }
-
private boolean requiresBaseDirectoryAlignment( String s )
{
if ( s != null )
@@ -201,16 +133,8 @@
return false;
}
- /**
- * {@inheritDoc}
- */
public void unalignFromBaseDirectory( Model model, File basedir )
{
- if ( basedir == null )
- {
- return;
- }
-
Build build = model.getBuild();
if ( build != null )
@@ -221,8 +145,6 @@
build.setTestSourceDirectory( unalignFromBaseDirectory( build.getTestSourceDirectory(), basedir ) );
- build.setScriptSourceDirectory( unalignFromBaseDirectory( build.getScriptSourceDirectory(), basedir ) );
-
for ( Iterator i = build.getResources().iterator(); i.hasNext(); )
{
Resource resource = (Resource) i.next();
@@ -252,44 +174,17 @@
build.setOutputDirectory( unalignFromBaseDirectory( build.getOutputDirectory(), basedir ) );
build.setTestOutputDirectory( unalignFromBaseDirectory( build.getTestOutputDirectory(), basedir ) );
-
- Reporting reporting = model.getReporting();
- if ( reporting != null )
- {
- reporting.setOutputDirectory( unalignFromBaseDirectory( reporting.getOutputDirectory(), basedir ) );
- }
}
}
- /**
- * {@inheritDoc}
- */
- public String unalignFromBaseDirectory( String path, File basedir )
+ public String unalignFromBaseDirectory( String directory, File basedir )
{
- if ( basedir == null )
+ String path = basedir.getPath();
+ if ( directory.startsWith( path ) )
{
- return path;
+ directory = directory.substring( path.length() + 1 ).replace( '\\', '/' );
}
-
- if ( path == null )
- {
- return null;
- }
-
- path = path.trim();
-
- String base = basedir.getAbsolutePath();
- if ( path.startsWith( base ) )
- {
- path = chopLeadingFileSeparator( path.substring( base.length() ) );
- }
-
- if ( !new File( path ).isAbsolute() )
- {
- path = path.replace( '\\', '/' );
- }
-
- return path;
+ return directory;
}
}
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/resources/META-INF/plexus/components.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/resources/META-INF/plexus/components.xml Mon Aug 25 14:11:19 2008
@@ -41,11 +41,6 @@
<component>
<role>org.apache.maven.project.interpolation.ModelInterpolator</role>
<implementation>org.apache.maven.project.interpolation.RegexBasedModelInterpolator</implementation>
- <requirements>
- <requirement>
- <role>org.apache.maven.project.path.PathTranslator</role>
- </requirement>
- </requirements>
</component>
<!--
|
@@ -188,6 +183,17 @@
</component>
<component>
+ <role>org.apache.maven.project.ModelResolver</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.maven.project.ModelResolver</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
<role-hint>maven</role-hint>
<implementation>org.apache.maven.project.artifact.MavenMetadataSource</implementation>
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml Mon Aug 25 14:11:19 2008
@@ -50,21 +50,21 @@
</pluginRepositories>
<build>
- <directory>${project.basedir}/target</directory>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ <directory>target</directory>
+ <outputDirectory>target/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
- <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
- <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
- <scriptSourceDirectory>${project.basedir}/src/main/scripts</scriptSourceDirectory>
- <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
+ <testOutputDirectory>target/test-classes</testOutputDirectory>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
+ <testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
- <directory>${project.basedir}/src/main/resources</directory>
+ <directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
- <directory>${project.basedir}/src/test/resources</directory>
+ <directory>src/test/resources</directory>
</testResource>
</testResources>
<pluginManagement>
@@ -115,7 +115,7 @@
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
- <version>2.4.2</version>
+ <version>2.4.1</version>
</plugin>
<plugin>
<artifactId>maven-rar-plugin</artifactId>
@@ -131,7 +131,7 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
- <version>2.0-beta-7</version>
+ <version>2.0-beta-6</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
@@ -139,7 +139,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
+ <version>2.4.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
@@ -150,7 +150,7 @@
</build>
<reporting>
- <outputDirectory>${project.build.directory}/site</outputDirectory>
+ <outputDirectory>target/site</outputDirectory>
</reporting>
<profiles>
<profile>
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java Mon Aug 25 14:11:19 2008
@@ -180,7 +180,6 @@
File pom = getTestFile( "src/test/resources/projects/build-path-expression-pom.xml" );
MavenProject project = getProject( pom );
- projectBuilder.calculateConcreteState( project, new DefaultProjectBuilderConfiguration() );
Build build = project.getBuild();
assertNotNull( "Project should have a build section containing the test resource.", build );
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ProjectBaseDirectoryAlignmentTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ProjectBaseDirectoryAlignmentTest.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ProjectBaseDirectoryAlignmentTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ProjectBaseDirectoryAlignmentTest.java Mon Aug 25 14:11:19 2008
@@ -35,7 +35,6 @@
File f = getTestFile( dir + "project-which-needs-directory-alignment.xml" );
MavenProject project = getProject( f );
- projectBuilder.calculateConcreteState( project, new DefaultProjectBuilderConfiguration() );
assertNotNull( "Test project can't be null!", project );
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/TestArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/TestArtifactResolver.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/TestArtifactResolver.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/TestArtifactResolver.java Mon Aug 25 14:11:19 2008
@@ -178,14 +178,6 @@
return projectArtifacts;
}
-
- public Artifact retrieveRelocatedArtifact( Artifact artifact,
- ArtifactRepository localRepository,
- List remoteRepositories )
- throws ArtifactMetadataRetrievalException
- {
- return artifact;
- }
}
public Source source()
@@ -223,7 +215,7 @@
public void contextualize( Context context )
throws ContextException
{
- container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+ this.container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
}
\ No newline at end of file
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/injection/DefaultProfileInjectorTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/injection/DefaultProfileInjectorTest.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/injection/DefaultProfileInjectorTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/injection/DefaultProfileInjectorTest.java Mon Aug 25 14:11:19 2008
@@ -28,7 +28,6 @@
import org.apache.maven.model.Build;
import org.apache.maven.model.BuildBase;
-import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginContainer;
@@ -36,6 +35,9 @@
import org.apache.maven.model.Profile;
import org.apache.maven.model.Repository;
import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.apache.maven.model.Dependency;
+
+import junit.framework.TestCase;
public class DefaultProfileInjectorTest
extends TestCase
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java Mon Aug 25 14:11:19 2008
@@ -26,14 +26,9 @@
import org.apache.maven.model.Repository;
import org.apache.maven.model.Resource;
import org.apache.maven.model.Scm;
-import org.apache.maven.project.DefaultProjectBuilderConfiguration;
-import org.apache.maven.project.path.DefaultPathTranslator;
-import org.apache.maven.project.path.PathTranslator;
-import java.io.File;
import java.io.IOException;
import java.util.Collections;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -215,9 +210,9 @@
public void testEnvars()
throws Exception
{
- Map context = new HashMap();
+ Properties envars = new Properties();
- context.put( "env.HOME", "/path/to/home" );
+ envars.setProperty( "HOME", "/path/to/home" );
Model model = new Model();
@@ -227,7 +222,7 @@
model.setProperties( modelProperties );
- Model out = new RegexBasedModelInterpolator().interpolate( model, context );
+ Model out = new RegexBasedModelInterpolator( envars ).interpolate( model, context );
assertEquals( out.getProperties().getProperty( "outputDirectory" ), "/path/to/home" );
}
@@ -301,50 +296,6 @@
assertEquals( build.getSourceDirectory(), ( (Resource) resIt.next() ).getDirectory() );
}
- public void testShouldInterpolateUnprefixedBasedirExpression()
- throws ModelInterpolationException, IOException
- {
- File basedir = new File( "/test/path" );
- Model model = new Model();
- Dependency dep = new Dependency();
- dep.setSystemPath( "${basedir}/artifact.jar" );
-
- model.addDependency( dep );
-
- Model result = new RegexBasedModelInterpolator().interpolate( model, basedir, new DefaultProjectBuilderConfiguration(), true );
-
- List rDeps = result.getDependencies();
- assertNotNull( rDeps );
- assertEquals( 1, rDeps.size() );
- assertEquals( new File( basedir, "artifact.jar" ).getAbsolutePath(), new File( ( (Dependency) rDeps.get( 0 ) )
- .getSystemPath() ).getAbsolutePath() );
- }
-
- public void testTwoLevelRecursiveBasedirAlignedExpression()
- throws Exception
- {
- Model model = new Model();
- Build build = new Build();
-
- model.setBuild( build );
-
- build.setDirectory( "${project.basedir}/target" );
- build.setOutputDirectory( "${project.build.directory}/classes" );
-
- PathTranslator translator = new DefaultPathTranslator();
- RegexBasedModelInterpolator interpolator = new RegexBasedModelInterpolator( translator );
-
- File basedir = new File( System.getProperty( "java.io.tmpdir" ), "base" );
-
- String value = interpolator.interpolate( "${project.build.outputDirectory}/foo", model, basedir, new DefaultProjectBuilderConfiguration(), true );
- value = value.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
-
- String check = new File( basedir, "target/classes/foo" ).getAbsolutePath();
- check = check.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
-
- assertEquals( check, value );
- }
-
// public void testPOMExpressionDoesNotUseSystemProperty()
// throws Exception
// {
Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java Mon Aug 25 14:11:19 2008
@@ -1,24 +1,5 @@
package org.apache.maven.project.path;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
import java.io.File;
import junit.framework.TestCase;
Propchange: maven/components/branches/maven-2.0.x/maven-reporting/maven-reporting-api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 25 14:11:19 2008
@@ -8,4 +8,3 @@
cobertura.ser
.settings
target-eclipse
-bin
Modified: maven/components/branches/maven-2.0.x/maven-reporting/maven-reporting-api/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-reporting/maven-reporting-api/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-reporting/maven-reporting-api/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-reporting/maven-reporting-api/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven-reporting</artifactId>
<groupId>org.apache.maven.reporting</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-reporting-api</artifactId>
@@ -43,6 +43,7 @@
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
+ <version>1.0-alpha-10</version>
</dependency>
</dependencies>
</project>
Modified: maven/components/branches/maven-2.0.x/maven-reporting/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-reporting/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-reporting/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-reporting/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.reporting</groupId>
Propchange: maven/components/branches/maven-2.0.x/maven-repository-metadata/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 25 14:11:19 2008
@@ -8,4 +8,3 @@
cobertura.ser
.settings
target-eclipse
-bin
Modified: maven/components/branches/maven-2.0.x/maven-repository-metadata/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-repository-metadata/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-repository-metadata/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-repository-metadata/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-repository-metadata</artifactId>
@@ -34,6 +34,7 @@
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
+ <version>1.0-alpha-8</version>
<configuration>
<version>1.0.0</version>
<model>src/main/mdo/metadata.mdo</model>
Modified: maven/components/branches/maven-2.0.x/maven-repository-metadata/src/main/mdo/metadata.mdo
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-repository-metadata/src/main/mdo/metadata.mdo?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-repository-metadata/src/main/mdo/metadata.mdo (original)
+++ maven/components/branches/maven-2.0.x/maven-repository-metadata/src/main/mdo/metadata.mdo Mon Aug 25 14:11:19 2008
@@ -36,19 +36,19 @@
<name>groupId</name>
<version>1.0.0</version>
<type>String</type>
- <description>The groupId that this directory represents, if any.</description>
+ <description>The groupId that is directory represents, if any.</description>
</field>
<field>
<name>artifactId</name>
<version>1.0.0</version>
<type>String</type>
- <description>The artifactId that this directory represents, if any.</description>
+ <description>The artifactId that is directory represents, if any.</description>
</field>
<field>
<name>version</name>
<version>1.0.0</version>
<type>String</type>
- <description>The version that this directory represents, if any.</description>
+ <description>The version that is directory represents, if any.</description>
</field>
<field>
<name>versioning</name>
@@ -61,7 +61,7 @@
<field>
<name>plugins</name>
<version>1.0.0</version>
- <description>The set of plugin mappings for the group.</description>
+ <description>The set of plugin mappings for the group</description>
<association>
<type>Plugin</type>
<multiplicity>*</multiplicity>
@@ -201,19 +201,19 @@
<class>
<name>Versioning</name>
<version>1.0.0</version>
- <description>Versioning information for an artifact.</description>
+ <description>Versioning information for an artifact</description>
<fields>
<field>
<name>latest</name>
<version>1.0.0</version>
<type>String</type>
- <description>What the latest version in the directory is, including snapshots.</description>
+ <description>What the latest version in the directory is, including snapshots</description>
</field>
<field>
<name>release</name>
<version>1.0.0</version>
<type>String</type>
- <description>What the latest version in the directory is, of the releases.</description>
+ <description>What the latest version in the directory is, of the releases</description>
</field>
<field>
<name>snapshot</name>
@@ -221,12 +221,12 @@
<association>
<type>Snapshot</type>
</association>
- <description>The current snapshot data in use for this version.</description>
+ <description>The current snapshot data in use for this version</description>
</field>
<field>
<name>versions</name>
<version>1.0.0</version>
- <description>Versions available for the artifact.</description>
+ <description>Versions available for the artifact</description>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
@@ -236,25 +236,25 @@
<name>lastUpdated</name>
<version>1.0.0</version>
<type>String</type>
- <description>When the metadata was last updated.</description>
+ <description>When the metadata was last updated</description>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code>
- public void updateTimestamp()
- {
- setLastUpdatedTimestamp( new java.util.Date() );
- }
+ public void updateTimestamp()
+ {
+ setLastUpdatedTimestamp( new java.util.Date() );
+ }
- public void setLastUpdatedTimestamp( java.util.Date date )
- {
- java.util.TimeZone timezone = java.util.TimeZone.getTimeZone( "UTC" );
- java.text.DateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" );
- fmt.setTimeZone( timezone );
- setLastUpdated( fmt.format( date ) );
- }
+ public void setLastUpdatedTimestamp( java.util.Date date )
+ {
+ java.util.TimeZone timezone = java.util.TimeZone.getTimeZone( "UTC" );
+ java.text.DateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" );
+ fmt.setTimeZone( timezone );
+ setLastUpdated( fmt.format( date ) );
+ }
</code>
</codeSegment>
</codeSegments>
@@ -262,24 +262,24 @@
<class>
<name>Snapshot</name>
<version>1.0.0</version>
- <description>Snapshot data for the current version.</description>
+ <description>Snapshot data for the current version</description>
<fields>
<field>
<name>timestamp</name>
<version>1.0.0</version>
- <description>The time it was deployed.</description>
+ <description>The time it was deployed</description>
<type>String</type>
</field>
<field>
<name>buildNumber</name>
<version>1.0.0</version>
- <description>The incremental build number.</description>
+ <description>The incremental build number</description>
<type>int</type>
</field>
<field>
<name>localCopy</name>
<version>1.0.0</version>
- <description>Whether to use a local copy instead (with filename that includes the base version).</description>
+ <description>Whether to use a local copy instead (with filename that includes the base version)</description>
<type>boolean</type>
<defaultValue>false</defaultValue>
</field>
@@ -288,7 +288,7 @@
<class>
<name>Plugin</name>
<version>1.0.0</version>
- <description>Mapping information for a single plugin within this group.</description>
+ <description>Mapping information for a single plugin within this group</description>
<comment>NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm.</comment>
<fields>
<field>
@@ -303,14 +303,14 @@
<type>String</type>
<required>true</required>
<version>1.0.0</version>
- <description>The plugin invocation prefix (i.e. eclipse for eclipse:eclipse).</description>
+ <description>The plugin invocation prefix (i.e. eclipse for eclipse:eclipse)</description>
</field>
<field>
<name>artifactId</name>
<type>String</type>
<required>true</required>
<version>1.0.0</version>
- <description>The plugin artifactId.</description>
+ <description>The plugin artifactId</description>
</field>
</fields>
</class>
Propchange: maven/components/branches/maven-2.0.x/maven-script/maven-script-ant/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 25 14:11:19 2008
@@ -7,4 +7,3 @@
.project
.settings
target-eclipse
-bin
Modified: maven/components/branches/maven-2.0.x/maven-script/maven-script-ant/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-script/maven-script-ant/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-script/maven-script-ant/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-script/maven-script-ant/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,23 +23,13 @@
<parent>
<artifactId>maven-script</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-script-ant</artifactId>
<name>Maven Ant Mojo Support</name>
<dependencies>
<dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-launcher</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
@@ -47,19 +37,6 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-ant-factory</artifactId>
<version>1.0-alpha-2</version>
- <!-- We need to exclude this artifact's dependency on Ant, -->
- <!-- because it has a different groupId that the version of Ant -->
- <!-- we want to use now. -->
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant-launcher</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
Propchange: maven/components/branches/maven-2.0.x/maven-script/maven-script-beanshell/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 25 14:11:19 2008
@@ -10,4 +10,3 @@
cobertura.ser
.settings
target-eclipse
-bin
Modified: maven/components/branches/maven-2.0.x/maven-script/maven-script-beanshell/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-script/maven-script-beanshell/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-script/maven-script-beanshell/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-script/maven-script-beanshell/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven-script</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-script-beanshell</artifactId>
Modified: maven/components/branches/maven-2.0.x/maven-script/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-script/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-script/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-script/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
Modified: maven/components/branches/maven-2.0.x/maven-settings/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-settings/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-settings/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-settings/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-settings</artifactId>
@@ -47,10 +47,6 @@
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-interpolation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
Modified: maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java (original)
+++ maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java Mon Aug 25 14:11:19 2008
@@ -20,13 +20,13 @@
*/
import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
-import org.codehaus.plexus.interpolation.EnvarBasedValueSource;
-import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.interpolation.EnvarBasedValueSource;
+import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import java.io.File;
Modified: maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java (original)
+++ maven/components/branches/maven-2.0.x/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java Mon Aug 25 14:11:19 2008
@@ -279,33 +279,4 @@
policy.setChecksumPolicy( settingsPolicy.getChecksumPolicy() );
return policy;
}
-
- /**
- * @param settings could be null
- * @return a new instance of settings or null if settings was null.
- */
- public static Settings copySettings( Settings settings )
- {
- if ( settings == null )
- {
- return null;
- }
-
- Settings clone = new Settings();
- clone.setActiveProfiles( settings.getActiveProfiles() );
- clone.setInteractiveMode( settings.isInteractiveMode() );
- clone.setLocalRepository( settings.getLocalRepository() );
- clone.setMirrors( settings.getMirrors() );
- clone.setModelEncoding( settings.getModelEncoding() );
- clone.setOffline( settings.isOffline() );
- clone.setPluginGroups( settings.getPluginGroups() );
- clone.setProfiles( settings.getProfiles() );
- clone.setProxies( settings.getProxies() );
- clone.setRuntimeInfo( settings.getRuntimeInfo() );
- clone.setServers( settings.getServers() );
- clone.setSourceLevel( settings.getSourceLevel() );
- clone.setUsePluginRegistry( settings.isUsePluginRegistry() );
-
- return clone;
- }
}
Propchange: maven/components/branches/maven-2.0.x/maven-toolchain/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 25 14:11:19 2008
@@ -9,4 +9,3 @@
.settings
nbproject
target-eclipse
-bin
Modified: maven/components/branches/maven-2.0.x/maven-toolchain/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-toolchain/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-toolchain/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-toolchain/pom.xml Mon Aug 25 14:11:19 2008
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven</artifactId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-toolchain</artifactId>
@@ -38,10 +38,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
+ <version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
+ <version>2.0.9</version>
</dependency>
</dependencies>
<build>
Modified: maven/components/branches/maven-2.0.x/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/pom.xml?rev=688884&r1=688883&r2=688884&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/pom.xml Mon Aug 25 14:11:19 2008
@@ -24,12 +24,12 @@
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
- <version>9-SNAPSHOT</version>
+ <version>8</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
<artifactId>maven</artifactId>
- <version>2.0.11-SNAPSHOT</version>
+ <version>2.0.9</version>
<packaging>pom</packaging>
<name>Maven</name>
@@ -117,25 +117,12 @@
</mailingLists>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x</developerConnection>
- <url>http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9</developerConnection>
+ <url>https://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9</url>
</scm>
<build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>clirr-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
<pluginManagement>
<plugins>
<plugin>
@@ -149,6 +136,10 @@
<version>2.0.2</version>
</plugin>
<plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
</plugin>
@@ -195,7 +186,7 @@
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
- <version>1.0-alpha-20</version>
+ <version>1.0-alpha-13</version>
<executions>
<execution>
<id>site-docs</id>
@@ -215,27 +206,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>clirr-maven-plugin</artifactId>
- <version>2.2.1</version>
- <configuration>
- <!-- needed for release: default value "(,${project.version})" for 2.0.10 is 2.0.10-SNAPSHOT -->
- <comparisonVersion>2.0.9</comparisonVersion>
- <excludes>
- <!-- TODO: These represent method ADDITIONS from 2.0.9, and should be removed after
- 2.0.10 is released. -->
- <exclude>org/apache/maven/lifecycle/LifecycleExecutor*</exclude>
- <exclude>org/apache/maven/artifact/metadata/ArtifactMetadataSource*</exclude>
- <exclude>org/apache/maven/project/MavenProjectBuilder*</exclude>
- <exclude>org/apache/maven/project/ProjectBuilderConfiguration*</exclude>
- <exclude>org/apache/maven/project/interpolation/ModelInterpolator*</exclude>
- <exclude>org/apache/maven/project/inheritance/ModelInheritanceAssembler*</exclude>
- <exclude>org/apache/maven/execution/MavenExecutionRequest*</exclude>
- <exclude>org/apache/maven/plugin/DefaultPluginManager*</exclude>
- </excludes>
- </configuration>
- </plugin>
</plugins>
</pluginManagement>
</build>
@@ -262,12 +232,6 @@
<module>apache-maven</module>
</modules>
- <properties>
- <mavenVersion>2.0.11-SNAPSHOT</mavenVersion>
- <wagonVersion>1.0-beta-4-SNAPSHOT</wagonVersion>
- </properties>
-
- <!--start-->
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -277,11 +241,14 @@
</dependency>
</dependencies>
+ <properties>
+ <mavenVersion>2.0.9</mavenVersion>
+ <!-- Can't use. bootstrap-mini isn't smart enough: <wagonVersion>1.0-beta-2</wagonVersion> -->
+ </properties>
+
<dependencyManagement>
- <!--end-->
<dependencies>
<!-- Maven -->
- <!--start-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-descriptor</artifactId>
@@ -342,6 +309,7 @@
<artifactId>maven-toolchain</artifactId>
<version>${mavenVersion}</version>
</dependency>
+
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-parameter-documenter</artifactId>
@@ -372,52 +340,36 @@
<artifactId>maven-toolchain</artifactId>
<version>${mavenVersion}</version>
</dependency>
- <!--end-->
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
- <version>1.0-beta-1-SNAPSHOT</version>
- </dependency>
<!-- Plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-interpolation</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9-stable-1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>1.5.5</version>
+ <version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
- <version>${wagonVersion}</version>
+ <version>1.0-beta-2</version> <!-- Can't use. bootstrap-mini isn't smart enough: <version>${wagonVersion}</version> -->
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
- <version>${wagonVersion}</version>
+ <version>1.0-beta-2</version> <!-- Can't use. bootstrap-mini isn't smart enough: <version>${wagonVersion}</version> -->
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
- <version>${wagonVersion}</version>
+ <version>1.0-beta-2</version> <!-- Can't use. bootstrap-mini isn't smart enough: <version>${wagonVersion}</version> -->
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
- <version>${wagonVersion}</version>
+ <version>1.0-beta-2</version> <!-- Can't use. bootstrap-mini isn't smart enough: <version>${wagonVersion}</version> -->
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
@@ -427,7 +379,7 @@
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
- <version>${wagonVersion}</version>
+ <version>1.0-beta-2</version> <!-- Can't use. bootstrap-mini isn't smart enough: <version>${wagonVersion}</version> -->
</dependency>
<dependency>
<groupId>easymock</groupId>
@@ -441,9 +393,7 @@
<version>1.1</version>
</dependency>
</dependencies>
- <!--start-->
</dependencyManagement>
- <!--end-->
<distributionManagement>
<site>
@@ -488,37 +438,13 @@
</profile>
<profile>
- <id>reporting</id>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>clirr-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
- </profile>
-
- <profile>
+ <!-- To generate aggregate reports, calling twice mvn site -Preporting, mvn site -Preporting-aggregate -->
<id>reporting-aggregate</id>
- <!-- To generate aggregate reports -->
- <!-- To deploy both aggregate reports for top-level project and standalone reports for modules, call
- mvn site -Preporting
- mvn site:deploy
- mvn site -Preporting-aggregate
- mvn -N site:deploy
- -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.0.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
@@ -526,7 +452,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.4</version>
<configuration>
<links>
<link>http://java.sun.com/j2se/1.4.2/docs/api</link>