svn commit: r1154662 - /maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java
Author: struberg Date: Sun Aug 7 06:28:09 2011 New Revision: 1154662 URL: http://svn.apache.org/viewvc?rev=1154662view=rev Log: MSANDBOX-51 Expand TCK finished Modified: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java Modified: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java?rev=1154662r1=1154661r2=1154662view=diff == --- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java (original) +++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java Sun Aug 7 06:28:09 2011 @@ -202,7 +202,7 @@ public class ExpandTest extends Assert expand.execute(); -verifyExpandedFileAndContent( targetDir, TEST_UNZIPPED_CONTENT ); +verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); } finally { @@ -210,6 +210,105 @@ public class ExpandTest extends Assert } } +@Test +public void testExecute_Overwrite() throws Exception +{ +File targetDir = getTestTargetDir(); +File expandedFile = null; + +{ +// part1: expand + +Expand expand = new Expand(); + +File source = getSourceFile(); +expand.setSrc( source ); + +expand.setDest( targetDir ); + +expand.execute(); + +expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); +} + +// turn the clock back 10 seconds +long time = System.currentTimeMillis() - 1L; + +// round down to 1s; +time = time - time % 1000L; + +expandedFile.setLastModified( time ); +assertEquals( time, expandedFile.lastModified() ); + +{ +// part2: expand in non-overwrite mode + +Expand expand = new Expand(); + +File source = getSourceFile(); +expand.setSrc( source ); +expand.setDest( targetDir ); + +expand.setOverwrite( false ); + +expand.execute(); + +expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); + +assertEquals( file must still have the old lastModified timestamp +, time, expandedFile.lastModified() ); + +} + +{ +// part3: expand in overwrite mode but local file is still newer than the one in the archive + +Expand expand = new Expand(); + +File source = getSourceFile(); +expand.setSrc( source ); +expand.setDest( targetDir ); + +expand.setOverwrite( true ); + +expand.execute(); + +expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); + +// obviously the file will be overwritten anyway +assertTrue( file must now have newer lastModified timestamp, but was: time= + time ++ expandedFile.lastModified()= + expandedFile.lastModified() +, time expandedFile.lastModified() ); +} + +// turn the clock back a lng time! +time = 1L; + +expandedFile.setLastModified(time); +assertEquals(time, expandedFile.lastModified()); + +{ +// part3: expand in overwrite mode but local file is now older than the one in the archive + +Expand expand = new Expand(); + +File source = getSourceFile(); +expand.setSrc( source ); +expand.setDest( targetDir ); + +expand.setOverwrite( true ); + +expand.execute(); + +expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); + +assertTrue( file must now have newer lastModified timestamp, but was: time= + time ++ expandedFile.lastModified()= + expandedFile.lastModified() +, time expandedFile.lastModified() ); + +} +} + private File verifyExpandedFile( File targetDir ) {
svn commit: r1154664 - /maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java
Author: struberg Date: Sun Aug 7 06:53:04 2011 New Revision: 1154664 URL: http://svn.apache.org/viewvc?rev=1154664view=rev Log: MSANDBOX-51 don't read file content, otherwise tests will fail on filesystems with atime Modified: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java Modified: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java?rev=1154664r1=1154663r2=1154664view=diff == --- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java (original) +++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java Sun Aug 7 06:53:04 2011 @@ -228,7 +228,7 @@ public class ExpandTest extends Assert expand.execute(); -expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); +expandedFile = verifyExpandedFile( targetDir ); } // turn the clock back 10 seconds @@ -253,7 +253,7 @@ public class ExpandTest extends Assert expand.execute(); -expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); +expandedFile = verifyExpandedFile( targetDir ); assertEquals( file must still have the old lastModified timestamp , time, expandedFile.lastModified() ); @@ -273,7 +273,7 @@ public class ExpandTest extends Assert expand.execute(); -expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); +expandedFile = verifyExpandedFile( targetDir ); // obviously the file will be overwritten anyway assertTrue( file must now have newer lastModified timestamp, but was: time= + time @@ -300,7 +300,7 @@ public class ExpandTest extends Assert expand.execute(); -expandedFile = verifyExpandedFileAndContent(targetDir, TEST_UNZIPPED_CONTENT); +expandedFile = verifyExpandedFile( targetDir ); assertTrue( file must now have newer lastModified timestamp, but was: time= + time + expandedFile.lastModified()= + expandedFile.lastModified()
svn commit: r1154678 - /maven/pom/trunk/maven/src/site/site.xml
Author: hboutemy Date: Sun Aug 7 09:22:30 2011 New Revision: 1154678 URL: http://svn.apache.org/viewvc?rev=1154678view=rev Log: put back the links to Maven sub projects before ASF links since they are more important Modified: maven/pom/trunk/maven/src/site/site.xml Modified: maven/pom/trunk/maven/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/pom/trunk/maven/src/site/site.xml?rev=1154678r1=1154677r2=1154678view=diff == --- maven/pom/trunk/maven/src/site/site.xml (original) +++ maven/pom/trunk/maven/src/site/site.xml Sun Aug 7 09:22:30 2011 @@ -61,12 +61,6 @@ under the License. !-- Menus that every project will inherit -- menu ref=reports inherit=bottom / -menu name=ASF inherit=bottom - item name=How Apache Works href=http://www.apache.org/foundation/how-it-works.html/ - item name=Foundation href=http://www.apache.org/foundation// - item name=Sponsoring Apache href=http://www.apache.org/foundation/sponsorship.html/ - item name=Thanks href=http://www.apache.org/foundation/thanks.html/ -/menu menu name=Maven Projects inherit=bottom item name=Ant Tasks href=http://maven.apache.org/ant-tasks/index.html; / item name=Archetype href=http://maven.apache.org/archetype/index.html; / @@ -80,6 +74,12 @@ under the License. item name=Surefire href=http://maven.apache.org/surefire/index.html; / item name=Wagon href=http://maven.apache.org/wagon/index.html; / /menu +menu name=ASF inherit=bottom + item name=How Apache Works href=http://www.apache.org/foundation/how-it-works.html/ + item name=Foundation href=http://www.apache.org/foundation// + item name=Sponsoring Apache href=http://www.apache.org/foundation/sponsorship.html/ + item name=Thanks href=http://www.apache.org/foundation/thanks.html/ +/menu /body /project
svn commit: r1154686 - /maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java
Author: rfscholte Date: Sun Aug 7 10:33:48 2011 New Revision: 1154686 URL: http://svn.apache.org/viewvc?rev=1154686view=rev Log: Use canonicalPath for localRepo in test to please Jenkins on ubuntu Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java?rev=1154686r1=1154685r2=1154686view=diff == --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipseWorkspaceIT.java Sun Aug 7 10:33:48 2011 @@ -92,7 +92,7 @@ public class EclipseWorkspaceIT assertNotNull( Test M2_REPO has a value, M2_REPO ); -String localRepo = PlexusTestCase.getBasedir() + /target/test-classes/m2repo; +String localRepo = new File( PlexusTestCase.getBasedir(), target/test-classes/m2repo ).getCanonicalPath(); // comparing repo's all in lower case because windows is case insensitive and settings.xml may have // a repository specified with different case
svn commit: r1154754 - in /maven/plugins/trunk/maven-eclipse-plugin/src: it/MECLIPSE-676/ it/MECLIPSE-676/invoker.properties it/MECLIPSE-676/pom.xml it/MECLIPSE-676/verify.bsh main/java/org/apache/mav
Author: rfscholte Date: Sun Aug 7 19:49:56 2011 New Revision: 1154754 URL: http://svn.apache.org/viewvc?rev=1154754view=rev Log: Fix MECLIPSE-676: linkedResources: location vs locationURI Added: maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/ maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/invoker.properties maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/pom.xml maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/verify.bsh Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/LinkedResource.java Added: maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/invoker.properties URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/invoker.properties?rev=1154754view=auto == --- maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/invoker.properties (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/invoker.properties Sun Aug 7 19:49:56 2011 @@ -0,0 +1 @@ +invoker.goals = eclipse:clean eclipse:eclipse \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/pom.xml?rev=1154754view=auto == --- maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/pom.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/pom.xml Sun Aug 7 19:49:56 2011 @@ -0,0 +1,29 @@ +?xml version=1.0 encoding=UTF-8? +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; + modelVersion4.0.0/modelVersion + + groupIdorg.apache.maven.plugins.it/groupId + artifactIdmeclipse-676/artifactId + version0.1-SNAPSHOT/version + namemeclipse676/name + + build +plugins + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-eclipse-plugin/artifactId +version@project.version@/version +configuration + linkedResources +linkedResource + namesrc/main/webapp/docroot/myfolder/name + type2/type + locationURIFOLDER_VAR/otherfolder/myfolder/locationURI +/linkedResource + /linkedResources +/configuration + /plugin +/plugins + /build +/project \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/verify.bsh URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/verify.bsh?rev=1154754view=auto == --- maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/verify.bsh (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/it/MECLIPSE-676/verify.bsh Sun Aug 7 19:49:56 2011 @@ -0,0 +1,56 @@ + +/* + * 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.*; +import java.util.*; +import java.util.jar.*; +import org.codehaus.plexus.util.*; + +boolean result = true; + +try +{ + File dotProject = new File( basedir, .project); + if( !dotProject.exists() ) + { +System.err.println( Expected .project, but file doesn't exist ); +return false; + } + + String dotProjectContent = FileUtils.fileRead( dotProject, UTF-8 ); + if ( dotProjectContent.indexOf( locationURIFOLDER_VAR/otherfolder/myfolder/locationURI ) 0 ) + { +System.err.println( Expected .project to contain 'locationURIFOLDER_VAR/otherfolder/myfolder/locationURI', but it didn't ); +return false; + } + + if ( dotProjectContent.indexOf( location ) = 0 ) + { +System.err.println( Expected .project to not contain 'location', but it did ); +return false; + } + +} +catch ( Exception e) +{ +e.printStackTrace(); +result = false; +} +return result; \ No newline at end of file Modified:
svn commit: r1154761 - /maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
Author: rfscholte Date: Sun Aug 7 20:36:41 2011 New Revision: 1154761 URL: http://svn.apache.org/viewvc?rev=1154761view=rev Log: Fix MECLIPSE-499: Improve eclipse:eclipse excludes option documentation Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=1154761r1=1154760r2=1154761view=diff == --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Sun Aug 7 20:36:41 2011 @@ -174,9 +174,10 @@ public class EclipsePlugin private List projectnatures; /** - * List of artifact to exclude from eclipse classpath, beeing provided by some eclipse classPathContainer - * [MECLIPSE-79] - * + * List of artifacts, represented as codegroupId:artifactId/code, to exclude from the eclipse classpath, + * being provided by some eclipse classPathContainer. + * + * @see http://jira.codehaus.org/browse/MECLIPSE-79 * @since 2.5 * @parameter */
svn commit: r1154774 - /maven/sandbox/trunk/doxia/doxia-ide/eclipse/
Author: hboutemy Date: Sun Aug 7 21:45:37 2011 New Revision: 1154774 URL: http://svn.apache.org/viewvc?rev=1154774view=rev Log: restored doxia-ide/eclipse since it has been deleted from m2e Added: maven/sandbox/trunk/doxia/doxia-ide/eclipse/ - copied from r679985, maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/
svn commit: r1154776 - /maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml
Author: hboutemy Date: Sun Aug 7 21:55:56 2011 New Revision: 1154776 URL: http://svn.apache.org/viewvc?rev=1154776view=rev Log: updated pom to better match current place Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml?rev=1154776r1=1154775r2=1154776view=diff == --- maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml (original) +++ maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml Sun Aug 7 21:55:56 2011 @@ -19,27 +19,27 @@ specific language governing permissions under the License. -- -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion parent groupIdorg.apache.maven.doxia/groupId -artifactIddoxia-tools/artifactId -version1.0-SNAPSHOT/version -relativePath../pom.xml/relativePath +artifactIddoxia/artifactId +version1.2/version /parent groupIdorg.apache.maven.doxia.ide/groupId artifactIdeclipse/artifactId version1.0-SNAPSHOT/version packagingpom/packaging + nameDoxia Tools :: Eclipse IDE - Parent POM/name descriptionParent POM for the defacto IDE for Doxia development/description scm - connectionscm:svn:http://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse//connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse//developerConnection - urlhttp://svn.apache.org/viewcvs.cgi/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/url + connectionscm:svn:http://svn.apache.org/repos/asf/maven/sandbox/trunk/doxia/doxia-ide/eclipse//connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/maven/sandbox/trunk/doxia/doxia-ide/eclipse//developerConnection + urlhttp://svn.apache.org/viewcvs.cgi/maven/sandbox/trunk/doxia/doxia-ide/eclipse/url /scm prerequisites
svn commit: r1154778 - /maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml
Author: hboutemy Date: Sun Aug 7 21:59:36 2011 New Revision: 1154778 URL: http://svn.apache.org/viewvc?rev=1154778view=rev Log: updated doxia-converter to last release: 1.2 Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml Modified: maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml?rev=1154778r1=1154777r2=1154778view=diff == --- maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml (original) +++ maven/sandbox/trunk/doxia/doxia-ide/eclipse/pom.xml Sun Aug 7 21:59:36 2011 @@ -57,7 +57,7 @@ under the License. dependency groupIdorg.apache.maven.doxia/groupId artifactIddoxia-converter/artifactId -version1.0-SNAPSHOT/version +version1.2/version classifierjar-with-dependencies/classifier /dependency