You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/07/05 13:45:56 UTC
svn commit: r674182 - in /maven/components/trunk/maven-project/src:
main/java/org/apache/maven/project/interpolation/
test/java/org/apache/maven/project/ test/java/org/apache/maven/project/path/
Author: olamy
Date: Sat Jul 5 04:45:56 2008
New Revision: 674182
URL: http://svn.apache.org/viewvc?rev=674182&view=rev
Log:
merge from branch rev 672402 672407
- fix junits on windauze
- add missing license headers
Modified:
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingValueSource.java
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java?rev=674182&r1=674181&r2=674182&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java Sat Jul 5 04:45:56 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
package org.apache.maven.project.interpolation;
import org.codehaus.plexus.interpolation.ValueSource;
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingValueSource.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingValueSource.java?rev=674182&r1=674181&r2=674182&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingValueSource.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/PathTranslatingValueSource.java Sat Jul 5 04:45:56 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
package org.apache.maven.project.interpolation;
import org.apache.maven.project.path.PathTranslator;
Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java?rev=674182&r1=674181&r2=674182&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java Sat Jul 5 04:45:56 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
package org.apache.maven.project;
import org.apache.maven.model.Build;
@@ -123,15 +142,15 @@
assertEquals( "Concrete source directory should be absolute.",
new File( baseDir, "/src/main/java" ).getAbsolutePath(),
- build.getSourceDirectory() );
+ new File( build.getSourceDirectory() ).getAbsolutePath() );
assertEquals( "Concrete test-source directory should be absolute.",
new File( baseDir, "/src/test/java" ).getAbsolutePath(),
- build.getTestSourceDirectory() );
+ new File( build.getTestSourceDirectory() ).getAbsolutePath() );
assertEquals( "Concrete script-source directory should be absolute.",
new File( baseDir, "/src/main/scripts" ).getAbsolutePath(),
- build.getScriptSourceDirectory() );
+ new File( build.getScriptSourceDirectory() ).getAbsolutePath() );
List compileSourceRoots = project.getCompileSourceRoots();
@@ -143,7 +162,7 @@
assertEquals( "Concrete compile-source roots should contain interpolated source-directory value.",
new File( baseDir, "/src/main/java" ).getAbsolutePath(),
- compileSourceRoots.get( 0 ) );
+ new File( (String) compileSourceRoots.get( 0 ) ).getAbsolutePath() );
List testCompileSourceRoots = project.getTestCompileSourceRoots();
@@ -156,7 +175,7 @@
assertEquals( "Concrete test-compile-source roots should contain interpolated test-source-directory value.",
new File( baseDir, "/src/test/java" ).getAbsolutePath(),
- testCompileSourceRoots.get( 0 ) );
+ new File( (String) testCompileSourceRoots.get( 0 ) ).getAbsolutePath() );
List scriptSourceRoots = project.getScriptSourceRoots();
@@ -168,7 +187,7 @@
assertEquals( "Concrete script-source roots should contain interpolated script-source-directory value.",
new File( baseDir, "/src/main/scripts" ).getAbsolutePath(),
- scriptSourceRoots.get( 0 ) );
+ new File( (String) scriptSourceRoots.get( 0 ) ).getAbsolutePath() );
List resources = build.getResources();
@@ -178,7 +197,7 @@
assertEquals( "Concrete resource should contain absolute path.",
new File( buildDir, "generated-resources/plexus" ).getAbsolutePath(),
- ( (Resource) resources.get( 0 ) ).getDirectory() );
+ new File( ( (Resource) resources.get( 0 ) ).getDirectory() ).getAbsolutePath() );
List filters = build.getFilters();
@@ -188,19 +207,19 @@
assertEquals( "Concrete filter entry should contain absolute path.",
new File( buildDir, "/generated-filters.properties" ).getAbsolutePath(),
- filters.get( 0 ) );
+ new File( (String) filters.get( 0 ) ).getAbsolutePath() );
assertEquals( "Concrete output-directory should be absolute.",
new File( buildDir, "/classes" ).getAbsolutePath(),
- build.getOutputDirectory() );
+ new File( build.getOutputDirectory() ).getAbsolutePath() );
assertEquals( "Concrete test-output-directory should be absolute.",
new File( buildDir, "/test-classes" ).getAbsolutePath(),
- build.getTestOutputDirectory() );
+ new File( build.getTestOutputDirectory() ).getAbsolutePath() );
assertEquals( "Concrete build directory should be absolute.",
new File( baseDir, "target" ).getAbsolutePath(),
- build.getDirectory() );
+ new File( build.getDirectory() ).getAbsolutePath() );
// --------------------------------------------------------------------
// NOW, RESTORE THE DYNAMIC STATE FOR THE BUILD SECTION AND
@@ -384,7 +403,7 @@
build.getDirectory() );
assertEquals( "First concrete build output-directory should be absolute and point to target/classes dir.",
new File( project.getBasedir(), "target/classes" ).getAbsolutePath(),
- build.getOutputDirectory() );
+ new File( build.getOutputDirectory() ) .getAbsolutePath() );
build.setDirectory( "target2" );
@@ -393,7 +412,7 @@
build.getDirectory() );
assertEquals( "AFTER CHANGING BUILD DIRECTORY, build output-directory should be absolute and still point to target/classes dir.",
new File( project.getBasedir(), "target/classes" ).getAbsolutePath(),
- build.getOutputDirectory() );
+ new File( build.getOutputDirectory() ).getAbsolutePath() );
projectBuilder.restoreDynamicState( project, config );
projectBuilder.calculateConcreteState( project, config );
@@ -405,7 +424,7 @@
build.getDirectory() );
assertEquals( "Second concrete build output-directory should be absolute and point to target2/classes dir.",
new File( project.getBasedir(), "target2/classes" ).getAbsolutePath(),
- build.getOutputDirectory() );
+ new File( build.getOutputDirectory() ).getAbsolutePath() );
}
public void testShouldPreserveInitialValuesForPropertiesReferencingBuildPaths()
@@ -506,7 +525,7 @@
for ( Iterator it = resources.iterator(); it.hasNext(); )
{
Resource resource = (Resource) it.next();
- if ( directory.equals( resource.getDirectory() ) )
+ if ( new File( directory ).getAbsolutePath().equals( new File( resource.getDirectory() ).getAbsolutePath() ) )
{
found = true;
break;
@@ -531,7 +550,7 @@
for ( Iterator it = filters.iterator(); it.hasNext(); )
{
String filterPath = (String) it.next();
- if ( path.equals( filterPath ) )
+ if ( new File( path ).getAbsolutePath().equals( new File( filterPath ).getAbsolutePath() ) )
{
found = true;
break;
Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java?rev=674182&r1=674181&r2=674182&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/path/DefaultPathTranslatorTest.java Sat Jul 5 04:45:56 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
package org.apache.maven.project.path;
import java.io.File;