From commitsbarrettnathan@example.org Fri Oct 01 08:43:03 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 29881 invoked from network); 1 Oct 2010 08:43:02 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 08:43:02 -0000 Received: (qmail 42070 invoked by uid 500); 1 Oct 2010 08:43:02 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 41876 invoked by uid 500); 1 Oct 2010 08:42:59 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 41865 invoked by uid 99); 1 Oct 2010 08:42:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 08:42:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 08:42:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6636623889DE; Fri, 1 Oct 2010 08:42:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003435 - /maven/maven-3/trunk/pom.xml Date: Fri, 01 Oct 2010 08:42:37 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: bentmann Date: Fri Oct 1 08:42:37 2010 New Revision: 1003435 URL: http://svn.apache.org/viewvc?rev=1003435&view=rev Log: o Updated to plexus-component-metadata:1.5.5 Modified: maven/maven-3/trunk/pom.xml Modified: maven/maven-3/trunk/pom.xml URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/pom.xml?rev=1003435&r1=1003434&r2=1003435&view=diff ============================================================================== --- maven/maven-3/trunk/pom.xml (original) +++ maven/maven-3/trunk/pom.xml Fri Oct 1 08:42:37 2010 @@ -41,7 +41,7 @@ <commonsCliVersion>1.2</commonsCliVersion> <easyMockVersion>1.2_Java1.3</easyMockVersion> <junitVersion>3.8.2</junitVersion> - <plexusVersion>1.5.4</plexusVersion> + <plexusVersion>1.5.5</plexusVersion> <plexusInterpolationVersion>1.14</plexusInterpolationVersion> <plexusUtilsVersion>2.0.4</plexusUtilsVersion> <sisuInjectVersion>1.4.2</sisuInjectVersion> From commitsbarrettnathan@example.org Fri Oct 01 10:54:28 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 80217 invoked from network); 1 Oct 2010 10:54:27 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 10:54:27 -0000 Received: (qmail 82610 invoked by uid 500); 1 Oct 2010 10:54:27 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 82407 invoked by uid 500); 1 Oct 2010 10:54:24 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 82400 invoked by uid 99); 1 Oct 2010 10:54:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 10:54:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 10:54:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AA3C1238897D; Fri, 1 Oct 2010 10:54:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003474 - /maven/plugins/trunk/maven-plugins/pom.xml Date: Fri, 01 Oct 2010 10:54:02 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: dennisl Date: Fri Oct 1 10:54:02 2010 New Revision: 1003474 URL: http://svn.apache.org/viewvc?rev=1003474&view=rev Log: o Remove duplicate declaration of maven-javadoc-plugin. Modified: maven/plugins/trunk/maven-plugins/pom.xml Modified: maven/plugins/trunk/maven-plugins/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-plugins/pom.xml?rev=1003474&r1=1003473&r2=1003474&view=diff ============================================================================== --- maven/plugins/trunk/maven-plugins/pom.xml (original) +++ maven/plugins/trunk/maven-plugins/pom.xml Fri Oct 1 10:54:02 2010 @@ -223,17 +223,12 @@ under the License. <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.2</version> - </plugin> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.6</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.7</version> - </plugin> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> From commitsbarrettnathan@example.org Fri Oct 01 12:50:43 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 41549 invoked from network); 1 Oct 2010 12:50:42 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 12:50:42 -0000 Received: (qmail 32283 invoked by uid 500); 1 Oct 2010 12:50:42 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 32000 invoked by uid 500); 1 Oct 2010 12:50:38 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 31989 invoked by uid 99); 1 Oct 2010 12:50:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 12:50:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 12:50:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 13005238897D; Fri, 1 Oct 2010 12:50:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003515 - /maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Date: Fri, 01 Oct 2010 12:50:14 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bentmann Date: Fri Oct 1 12:50:13 2010 New Revision: 1003515 URL: http://svn.apache.org/viewvc?rev=1003515&view=rev Log: o Improved backward-compat Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=1003515&r1=1003514&r2=1003515&view=diff ============================================================================== --- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java (original) +++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Fri Oct 1 12:50:13 2010 @@ -31,6 +31,7 @@ import java.util.concurrent.ThreadFactor import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import java.util.regex.Matcher; import org.apache.maven.RepositoryUtils; import org.apache.maven.artifact.Artifact; @@ -41,6 +42,8 @@ import org.apache.maven.artifact.metadat import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.LegacyLocalRepositoryManager; import org.apache.maven.artifact.repository.RepositoryRequest; +import org.apache.maven.artifact.repository.metadata.Snapshot; +import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.LegacySupport; @@ -240,6 +243,25 @@ public class DefaultArtifactResolver artifact.selectVersion( result.getArtifact().getVersion() ); artifact.setFile( result.getArtifact().getFile() ); artifact.setResolved( true ); + + if ( artifact.isSnapshot() ) + { + Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() ); + if ( matcher.matches() ) + { + Snapshot snapshot = new Snapshot(); + snapshot.setTimestamp( matcher.group( 2 ) ); + try + { + snapshot.setBuildNumber( Integer.parseInt( matcher.group( 3 ) ) ); + artifact.addMetadata( new SnapshotArtifactRepositoryMetadata( artifact, snapshot ) ); + } + catch ( NumberFormatException e ) + { + logger.warn( "Invalid artifact version " + artifact.getVersion() + ": " + e.getMessage() ); + } + } + } } } From commitsbarrettnathan@example.org Fri Oct 01 13:43:03 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 58845 invoked from network); 1 Oct 2010 13:43:02 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 13:43:02 -0000 Received: (qmail 98287 invoked by uid 500); 1 Oct 2010 13:43:01 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 98095 invoked by uid 500); 1 Oct 2010 13:42:58 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 98075 invoked by uid 99); 1 Oct 2010 13:42:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 13:42:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 13:42:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 08EEF2388A02; Fri, 1 Oct 2010 13:42:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003535 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4750/ resources/mng-4750/repo/org/apache/maven/its/mng4750/a/ Date: Fri, 01 Oct 2010 13:42:32 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bentmann Date: Fri Oct 1 13:42:32 2010 New Revision: 1003535 URL: http://svn.apache.org/viewvc?rev=1003535&view=rev Log: [MNG-4845] [regression] MavenProject.getDependencyArtifact() returns artifacts without version for dependency with version range o Extended relevant IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml (with props) Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest.java maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/pom.xml Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest.java?rev=1003535&r1=1003534&r2=1003535&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest.java Fri Oct 1 13:42:32 2010 @@ -26,7 +26,8 @@ import java.io.File; import java.util.Properties; /** - * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4750">MNG-4750</a>. + * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4750">MNG-4750</a> and + * <a href="http://jira.codehaus.org/browse/MNG-4845">MNG-4845</a>. * * @author Benjamin Bentmann */ @@ -36,7 +37,7 @@ public class MavenITmng4750ResolvedMaven public MavenITmng4750ResolvedMavenProjectDependencyArtifactsTest() { - super( "[2.0.3,3.0-alpha-1),[3.0-alpha-3,)" ); + super( "[2.0.3,3.0-alpha-1),[3.0,)" ); } /** @@ -64,6 +65,9 @@ public class MavenITmng4750ResolvedMaven String path = props.getProperty( "project.dependencyArtifacts.0.file" ); assertNotNull( path ); assertTrue( path, new File( path ).isFile() ); + + String version = props.getProperty( "project.dependencyArtifacts.0.version" ); + assertEquals( "0.1", version ); } } Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/pom.xml?rev=1003535&r1=1003534&r2=1003535&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/pom.xml (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/pom.xml Fri Oct 1 13:42:32 2010 @@ -37,7 +37,8 @@ under the License. <dependency> <groupId>org.apache.maven.its.mng4750</groupId> <artifactId>a</artifactId> - <version>0.1</version> + <!-- NOTE: This intentionally uses a version range --> + <version>(,0.1]</version> <scope>compile</scope> </dependency> </dependencies> @@ -71,6 +72,7 @@ under the License. <expressions> <expression>project/dependencyArtifacts/size</expression> <expression>project/dependencyArtifacts/*/file</expression> + <expression>project/dependencyArtifacts/*/version</expression> </expressions> </configuration> <executions> Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml?rev=1003535&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml Fri Oct 1 13:42:32 2010 @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<metadata> + <groupId>org.apache.maven.its.mng4750</groupId> + <artifactId>a</artifactId> + <versioning> + <latest>0.1</latest> + <release>0.1</release> + <versions> + <version>0.1</version> + </versions> + <lastUpdated>20100909120034</lastUpdated> + </versioning> +</metadata> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4750/repo/org/apache/maven/its/mng4750/a/maven-metadata.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision From commitsbarrettnathan@example.org Fri Oct 01 13:43:30 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 59064 invoked from network); 1 Oct 2010 13:43:30 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 13:43:30 -0000 Received: (qmail 99175 invoked by uid 500); 1 Oct 2010 13:43:30 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 99123 invoked by uid 500); 1 Oct 2010 13:43:28 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 99116 invoked by uid 99); 1 Oct 2010 13:43:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 13:43:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 13:43:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8ECB7238897D; Fri, 1 Oct 2010 13:43:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003537 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java Date: Fri, 01 Oct 2010 13:43:07 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: bentmann Date: Fri Oct 1 13:43:07 2010 New Revision: 1003537 URL: http://svn.apache.org/viewvc?rev=1003537&view=rev Log: [MNG-4845] [regression] MavenProject.getDependencyArtifact() returns artifacts without version for dependency with version range Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java?rev=1003537&r1=1003536&r2=1003537&view=diff ============================================================================== --- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java (original) +++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java Fri Oct 1 13:43:07 2010 @@ -109,13 +109,13 @@ public class LifecycleDependencyResolver Map<String, Artifact> map = new HashMap<String, Artifact>(); for ( Artifact artifact : artifacts ) { - map.put( artifact.getId(), artifact ); + map.put( artifact.getDependencyConflictId(), artifact ); } for ( Artifact artifact : project.getDependencyArtifacts() ) { if ( artifact.getFile() == null ) { - Artifact resolved = map.get( artifact.getId() ); + Artifact resolved = map.get( artifact.getDependencyConflictId() ); if ( resolved != null ) { artifact.setFile( resolved.getFile() ); From commitsbarrettnathan@example.org Fri Oct 01 19:02:49 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 81845 invoked from network); 1 Oct 2010 19:02:48 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 19:02:48 -0000 Received: (qmail 55981 invoked by uid 500); 1 Oct 2010 19:02:48 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 55873 invoked by uid 500); 1 Oct 2010 19:02:47 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 55866 invoked by uid 99); 1 Oct 2010 19:02:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:02:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:02:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A9F652388A60; Fri, 1 Oct 2010 19:02:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003618 - in /maven/plugins/trunk/maven-antrun-plugin/src: it/attach-artifact-test/pom.xml it/attach-artifact-test/verify.bsh main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java Date: Fri, 01 Oct 2010 19:02:22 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pgier Date: Fri Oct 1 19:02:22 2010 New Revision: 1003618 URL: http://svn.apache.org/viewvc?rev=1003618&view=rev Log: [MANTRUN-152] Fix for attaching unclassified artifacts. Patch from Petr Kozelka. Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/verify.bsh maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml?rev=1003618&r1=1003617&r2=1003618&view=diff ============================================================================== --- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml (original) +++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml Fri Oct 1 19:02:22 2010 @@ -50,6 +50,7 @@ under the License. includes="*.xml" /> <attachartifact file="junk.zip" classifier="foo" type="zip"/> + <attachartifact file="junk.zip" type="zip"/> </tasks> </configuration> </execution> Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/verify.bsh URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/verify.bsh?rev=1003618&r1=1003617&r2=1003618&view=diff ============================================================================== --- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/verify.bsh (original) +++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/verify.bsh Fri Oct 1 19:02:22 2010 @@ -14,6 +14,15 @@ try System.out.println( "Zip file not installed: " + installedZipFile ); return false; } + + String zipWithouClassifierFilePath = "../../local-repo/antrun-plugin/test/antrun-plugin-attach-artifact-test/1.0-SNAPSHOT/antrun-plugin-attach-artifact-test-1.0-SNAPSHOT.zip"; + File installedZipWithouClassifierFile = new File( basedir, zipWithouClassifierFilePath ); + + if ( ! installedZipWithouClassifierFile.exists() ) + { + System.out.println( "Zip file (without classifier) not installed: " + installedZipWithouClassifierFile ); + return false; + } } catch( Throwable t ) { Modified: maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java?rev=1003618&r1=1003617&r2=1003618&view=diff ============================================================================== --- maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java (original) +++ maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/ant/tasks/AttachArtifactTask.java Fri Oct 1 19:02:22 2010 @@ -82,21 +82,14 @@ public class AttachArtifactTask MavenProject mavenProject = (MavenProject) this.getProject().getReference( mavenProjectRefId ); - if ( classifier == null ) + if ( this.getProject().getReference( mavenProjectHelperRefId ) == null ) { - mavenProject.getArtifact().setFile( file ); - } - else - { - if ( this.getProject().getReference( mavenProjectHelperRefId ) == null ) - { - throw new BuildException( "Maven project helper reference not found: " + mavenProjectHelperRefId ); - } - - log( "Attaching " + file + " as an attached artifact", Project.MSG_VERBOSE ); - MavenProjectHelper projectHelper = (MavenProjectHelper) getProject().getReference( mavenProjectHelperRefId ); - projectHelper.attachArtifact( mavenProject, type, classifier, file ); + throw new BuildException( "Maven project helper reference not found: " + mavenProjectHelperRefId ); } + + log( "Attaching " + file + " as an attached artifact", Project.MSG_VERBOSE ); + MavenProjectHelper projectHelper = (MavenProjectHelper) getProject().getReference( mavenProjectHelperRefId ); + projectHelper.attachArtifact( mavenProject, type, classifier, file ); } public File getFile() From commitsbarrettnathan@example.org Sat Oct 02 10:33:22 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 63704 invoked from network); 2 Oct 2010 10:33:21 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 10:33:21 -0000 Received: (qmail 36836 invoked by uid 500); 2 Oct 2010 10:33:21 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 36642 invoked by uid 500); 2 Oct 2010 10:33:18 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 36635 invoked by uid 99); 2 Oct 2010 10:33:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 10:33:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 10:33:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 13DB12388A02; Sat, 2 Oct 2010 10:32:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003769 - /maven/components/branches/maven-2.0.x/build.xml Date: Sat, 02 Oct 2010 10:32:57 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: bentmann Date: Sat Oct 2 10:32:56 2010 New Revision: 1003769 URL: http://svn.apache.org/viewvc?rev=1003769&view=rev Log: o Fixed bootstrap to use proper local repo when pulling dependencies Modified: maven/components/branches/maven-2.0.x/build.xml Modified: maven/components/branches/maven-2.0.x/build.xml URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/build.xml?rev=1003769&r1=1003768&r2=1003769&view=diff ============================================================================== --- maven/components/branches/maven-2.0.x/build.xml (original) +++ maven/components/branches/maven-2.0.x/build.xml Sat Oct 2 10:32:56 2010 @@ -74,20 +74,15 @@ under the License. </target> <target name="pull" depends="init, read-poms" unless="skip.pull"> - <property name="bootstrap.repository" value="${basedir}/bootstrap-repository"/> <!-- Pull the dependencies that Maven needs to build --> <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset"> - <!-- - <localRepository path="${bootstrap.repository}"/> - --> + <localRepository path="${maven.repo.local}"/> <pom refid="pom"/> </artifact:dependencies> <!-- Pull the dependencies for Modello --> <artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset"> - <!-- - <localRepository path="${bootstrap.repository}"/> - --> + <localRepository path="${maven.repo.local}"/> <dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="1.0-alpha-17"/> </artifact:dependencies> </target> From commitsbarrettnathan@example.org Sat Oct 02 12:00:11 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 77429 invoked from network); 2 Oct 2010 12:00:10 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 12:00:10 -0000 Received: (qmail 77419 invoked by uid 500); 2 Oct 2010 12:00:10 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 77219 invoked by uid 500); 2 Oct 2010 12:00:06 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 77212 invoked by uid 99); 2 Oct 2010 12:00:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 12:00:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 12:00:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ABD5023889BF; Sat, 2 Oct 2010 11:59:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003778 - /maven/plugins/branches/maven-site-plugin-3.x/pom.xml Date: Sat, 02 Oct 2010 11:59:44 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: bentmann Date: Sat Oct 2 11:59:44 2010 New Revision: 1003778 URL: http://svn.apache.org/viewvc?rev=1003778&view=rev Log: o Decoupled from erroneous assumption about wagon providers bundled with core, the set of wagon providers shipped with the core is an implementation detail, not a service contract Modified: maven/plugins/branches/maven-site-plugin-3.x/pom.xml Modified: maven/plugins/branches/maven-site-plugin-3.x/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/pom.xml?rev=1003778&r1=1003777&r2=1003778&view=diff ============================================================================== --- maven/plugins/branches/maven-site-plugin-3.x/pom.xml (original) +++ maven/plugins/branches/maven-site-plugin-3.x/pom.xml Sat Oct 2 11:59:44 2010 @@ -361,7 +361,16 @@ under the License. <artifactId>wagon-provider-api</artifactId> <version>${wagonVersion}</version> </dependency> - <!-- providers not anymore in core --> + <dependency> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-file</artifactId> + <version>${wagonVersion}</version> + </dependency> + <dependency> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-http-lightweight</artifactId> + <version>${wagonVersion}</version> + </dependency> <dependency> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh</artifactId> From commitsbarrettnathan@example.org Sat Oct 02 14:21:29 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 17114 invoked from network); 2 Oct 2010 14:21:28 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 14:21:28 -0000 Received: (qmail 43668 invoked by uid 500); 2 Oct 2010 14:21:28 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 43468 invoked by uid 500); 2 Oct 2010 14:21:24 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 43457 invoked by uid 99); 2 Oct 2010 14:21:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2B1412388993; Sat, 2 Oct 2010 14:20:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003802 - in /maven/release/trunk: maven-release-manager/pom.xml maven-release-plugin/pom.xml pom.xml Date: Sat, 02 Oct 2010 14:20:59 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brett Date: Sat Oct 2 14:20:58 2010 New Revision: 1003802 URL: http://svn.apache.org/viewvc?rev=1003802&view=rev Log: [maven-release-plugin] prepare release maven-release-2.1 Modified: maven/release/trunk/maven-release-manager/pom.xml maven/release/trunk/maven-release-plugin/pom.xml maven/release/trunk/pom.xml Modified: maven/release/trunk/maven-release-manager/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/pom.xml?rev=1003802&r1=1003801&r2=1003802&view=diff ============================================================================== --- maven/release/trunk/maven-release-manager/pom.xml (original) +++ maven/release/trunk/maven-release-manager/pom.xml Sat Oct 2 14:20:58 2010 @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1-SNAPSHOT</version> + <version>2.1</version> </parent> <artifactId>maven-release-manager</artifactId> Modified: maven/release/trunk/maven-release-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/pom.xml?rev=1003802&r1=1003801&r2=1003802&view=diff ============================================================================== --- maven/release/trunk/maven-release-plugin/pom.xml (original) +++ maven/release/trunk/maven-release-plugin/pom.xml Sat Oct 2 14:20:58 2010 @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1-SNAPSHOT</version> + <version>2.1</version> </parent> <groupId>org.apache.maven.plugins</groupId> Modified: maven/release/trunk/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/pom.xml?rev=1003802&r1=1003801&r2=1003802&view=diff ============================================================================== --- maven/release/trunk/pom.xml (original) +++ maven/release/trunk/pom.xml Sat Oct 2 14:20:58 2010 @@ -30,7 +30,7 @@ <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1-SNAPSHOT</version> + <version>2.1</version> <packaging>pom</packaging> <name>Maven Release</name> @@ -114,9 +114,9 @@ </modules> <scm> - <connection>scm:svn:http://svn.apache.org/repos/asf/maven/release/trunk</connection> - <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/release/trunk</developerConnection> - <url>http://svn.apache.org/viewvc/maven/release/trunk</url> + <connection>scm:svn:http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.1</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.1</developerConnection> + <url>http://svn.apache.org/viewvc/maven/release/tags/maven-release-2.1</url> </scm> <issueManagement> <system>jira</system> From commitsbarrettnathan@example.org Sat Oct 02 14:21:33 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 17245 invoked from network); 2 Oct 2010 14:21:33 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 14:21:33 -0000 Received: (qmail 43766 invoked by uid 500); 2 Oct 2010 14:21:32 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 43697 invoked by uid 500); 2 Oct 2010 14:21:31 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 43690 invoked by uid 99); 2 Oct 2010 14:21:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 57BE32388A02; Sat, 2 Oct 2010 14:21:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003803 - /maven/release/tags/maven-release-2.1/ Date: Sat, 02 Oct 2010 14:21:10 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: brett Date: Sat Oct 2 14:21:10 2010 New Revision: 1003803 URL: http://svn.apache.org/viewvc?rev=1003803&view=rev Log: [maven-scm] copy for tag maven-release-2.1 Added: maven/release/tags/maven-release-2.1/ - copied from r1003802, maven/release/trunk/ From commitsbarrettnathan@example.org Sat Oct 02 14:21:47 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 17294 invoked from network); 2 Oct 2010 14:21:47 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 14:21:47 -0000 Received: (qmail 44150 invoked by uid 500); 2 Oct 2010 14:21:47 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 43948 invoked by uid 500); 2 Oct 2010 14:21:45 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 43941 invoked by uid 99); 2 Oct 2010 14:21:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 14:21:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 992C823889EB; Sat, 2 Oct 2010 14:21:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003804 - in /maven/release/trunk: maven-release-manager/pom.xml maven-release-plugin/pom.xml pom.xml Date: Sat, 02 Oct 2010 14:21:21 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brett Date: Sat Oct 2 14:21:21 2010 New Revision: 1003804 URL: http://svn.apache.org/viewvc?rev=1003804&view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: maven/release/trunk/maven-release-manager/pom.xml maven/release/trunk/maven-release-plugin/pom.xml maven/release/trunk/pom.xml Modified: maven/release/trunk/maven-release-manager/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/pom.xml?rev=1003804&r1=1003803&r2=1003804&view=diff ============================================================================== --- maven/release/trunk/maven-release-manager/pom.xml (original) +++ maven/release/trunk/maven-release-manager/pom.xml Sat Oct 2 14:21:21 2010 @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1</version> + <version>2.2-SNAPSHOT</version> </parent> <artifactId>maven-release-manager</artifactId> Modified: maven/release/trunk/maven-release-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/pom.xml?rev=1003804&r1=1003803&r2=1003804&view=diff ============================================================================== --- maven/release/trunk/maven-release-plugin/pom.xml (original) +++ maven/release/trunk/maven-release-plugin/pom.xml Sat Oct 2 14:21:21 2010 @@ -24,7 +24,7 @@ <parent> <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1</version> + <version>2.2-SNAPSHOT</version> </parent> <groupId>org.apache.maven.plugins</groupId> Modified: maven/release/trunk/pom.xml URL: http://svn.apache.org/viewvc/maven/release/trunk/pom.xml?rev=1003804&r1=1003803&r2=1003804&view=diff ============================================================================== --- maven/release/trunk/pom.xml (original) +++ maven/release/trunk/pom.xml Sat Oct 2 14:21:21 2010 @@ -30,7 +30,7 @@ <groupId>org.apache.maven.release</groupId> <artifactId>maven-release</artifactId> - <version>2.1</version> + <version>2.2-SNAPSHOT</version> <packaging>pom</packaging> <name>Maven Release</name> @@ -114,9 +114,9 @@ </modules> <scm> - <connection>scm:svn:http://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.1</connection> - <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/release/tags/maven-release-2.1</developerConnection> - <url>http://svn.apache.org/viewvc/maven/release/tags/maven-release-2.1</url> + <connection>scm:svn:http://svn.apache.org/repos/asf/maven/release/trunk</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/release/trunk</developerConnection> + <url>http://svn.apache.org/viewvc/maven/release/trunk</url> </scm> <issueManagement> <system>jira</system> From commitsbarrettnathan@example.org Sat Oct 02 15:50:51 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 35056 invoked from network); 2 Oct 2010 15:50:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 15:50:51 -0000 Received: (qmail 90664 invoked by uid 500); 2 Oct 2010 15:50:50 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 90468 invoked by uid 500); 2 Oct 2010 15:50:49 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 90461 invoked by uid 99); 2 Oct 2010 15:50:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 15:50:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 15:50:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4D531238890A; Sat, 2 Oct 2010 15:50:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003820 - in /maven/plugins/trunk/maven-eclipse-plugin/src/test: java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java resources/META-INF/ resources/META-INF/plexus/ resources/META-INF/plexus/components.xml Date: Sat, 02 Oct 2010 15:50:27 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: bentmann Date: Sat Oct 2 15:50:26 2010 New Revision: 1003820 URL: http://svn.apache.org/viewvc?rev=1003820&view=rev Log: o Fixed tests to respect maven.repo.local Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java (with props) maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml (with props) Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java?rev=1003820&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java Sat Oct 2 15:50:26 2010 @@ -0,0 +1,61 @@ +package org.apache.maven.plugin.eclipse.it; + +/* + * 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 java.util.List; +import java.util.Properties; + +import org.apache.maven.shared.invoker.InvocationRequest; +import org.apache.maven.shared.test.plugin.BuildTool; +import org.codehaus.plexus.util.StringUtils; + +/** + * A build tool impl that's smart enough to respect maven.repo.local. + * + * @plexus.component role="org.apache.maven.shared.test.plugin.BuildTool" role-hint="default" + */ +public class FixedBuildTool + extends BuildTool +{ + + public InvocationRequest createBasicInvocationRequest( File pom, Properties properties, List goals, + File buildLogFile ) + { + InvocationRequest request = super.createBasicInvocationRequest( pom, properties, goals, buildLogFile ); + + request.setLocalRepositoryDirectory( findLocalRepo() ); + + return request; + } + + private File findLocalRepo() + { + String basedir = System.getProperty( "maven.repo.local" ); + + if ( StringUtils.isNotEmpty( basedir ) ) + { + return new File( basedir ); + } + + return null; + } + +} Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/FixedBuildTool.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml?rev=1003820&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml Sat Oct 2 15:50:26 2010 @@ -0,0 +1,31 @@ +<!-- +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. +--> + +<component-set> + <components> + <component> + <role>org.apache.maven.shared.test.plugin.BuildTool</role> + <role-hint>default</role-hint> + <implementation>org.apache.maven.plugin.eclipse.it.FixedBuildTool</implementation> + <instantiation-strategy>per-lookup</instantiation-strategy> + <description>BuildTool impl that obeys maven.repo.local</description> + <isolated-realm>false</isolated-realm> + </component> + </components> +</component-set> Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision From commitsbarrettnathan@example.org Sat Oct 02 16:03:08 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 37426 invoked from network); 2 Oct 2010 16:03:05 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 16:03:05 -0000 Received: (qmail 95860 invoked by uid 500); 2 Oct 2010 16:03:04 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 95797 invoked by uid 500); 2 Oct 2010 16:03:04 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 95790 invoked by uid 99); 2 Oct 2010 16:03:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:03:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:03:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6E60A2388A02; Sat, 2 Oct 2010 16:02:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003823 - /maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Date: Sat, 02 Oct 2010 16:02:40 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olamy Date: Sat Oct 2 16:02:39 2010 New Revision: 1003823 URL: http://svn.apache.org/viewvc?rev=1003823&view=rev Log: [MSITE-508] attach-descriptor goals leaks file handlers, causing sporadic build failures when gpg tries to sign descriptor during release. Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java?rev=1003823&r1=1003822&r2=1003823&view=diff ============================================================================== --- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java (original) +++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Sat Oct 2 16:02:39 2010 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import org.apache.commons.io.IOUtils; import org.apache.maven.doxia.site.decoration.DecorationModel; import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader; import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Writer; @@ -38,6 +39,7 @@ import org.apache.maven.project.MavenPro import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.WriterFactory; +import org.codehaus.plexus.util.xml.XmlStreamReader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** @@ -86,9 +88,11 @@ public class SiteDescriptorAttachMojo props.put( "modules", "<menu ref=\"modules\"/>" ); DecorationModel decoration; + XmlStreamReader reader = null; try { - String siteDescriptorContent = IOUtil.toString( ReaderFactory.newXmlReader( descriptorFile ) ); + reader = ReaderFactory.newXmlReader( descriptorFile ); + String siteDescriptorContent = IOUtil.toString( reader ); siteDescriptorContent = siteTool.getInterpolatedSiteDescriptorContent( props, project, siteDescriptorContent, @@ -108,6 +112,10 @@ public class SiteDescriptorAttachMojo { throw new MojoExecutionException( "Error when interpolating site descriptor", e ); } + finally + { + IOUtils.closeQuietly( reader ); + } MavenProject parentProject = siteTool.getParentProject( project, reactorProjects, localRepository ); if ( parentProject != null && project.getUrl() != null && parentProject.getUrl() != null ) @@ -140,10 +148,11 @@ public class SiteDescriptorAttachMojo File interpolatedDescriptorFile = new File( project.getBuild().getDirectory(), filename ); interpolatedDescriptorFile.getParentFile().mkdirs(); + Writer writer = null; try { // Write the interpolated site descriptor to a file - Writer writer = WriterFactory.newXmlWriter( interpolatedDescriptorFile ); + writer = WriterFactory.newXmlWriter( interpolatedDescriptorFile ); new DecorationXpp3Writer().write( writer, decoration ); // Attach the interpolated site descriptor getLog().debug( "Attaching the site descriptor '" + interpolatedDescriptorFile.getAbsolutePath() @@ -154,6 +163,10 @@ public class SiteDescriptorAttachMojo { throw new MojoExecutionException( "Unable to store interpolated site descriptor", e ); } + finally + { + IOUtils.closeQuietly( writer ); + } } } } From commitsbarrettnathan@example.org Sat Oct 02 16:08:16 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 44412 invoked from network); 2 Oct 2010 16:08:16 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 16:08:16 -0000 Received: (qmail 99971 invoked by uid 500); 2 Oct 2010 16:08:15 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 99924 invoked by uid 500); 2 Oct 2010 16:08:15 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 99917 invoked by uid 99); 2 Oct 2010 16:08:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:08:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:08:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 05F4123889BB; Sat, 2 Oct 2010 16:07:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003826 - in /maven/plugins/trunk/maven-site-plugin: ./ src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Date: Sat, 02 Oct 2010 16:07:54 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: olamy Date: Sat Oct 2 16:07:54 2010 New Revision: 1003826 URL: http://svn.apache.org/viewvc?rev=1003826&view=rev Log: [MSITE-508] attach-descriptor goals leaks file handlers, causing sporadic build failures when gpg tries to sign descriptor during release. $ svn merge -r 1003822:1003823 https://svn.apache.org/repos/asf/maven/plugins/branches/maven-site-plugin-3.x Modified: maven/plugins/trunk/maven-site-plugin/ (props changed) maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Propchange: maven/plugins/trunk/maven-site-plugin/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Oct 2 16:07:54 2010 @@ -1 +1 @@ -/maven/plugins/branches/maven-site-plugin-3.x:940318,942876,956257 +/maven/plugins/branches/maven-site-plugin-3.x:940318,942876,956257,1003823 Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java?rev=1003826&r1=1003825&r2=1003826&view=diff ============================================================================== --- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java (original) +++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Sat Oct 2 16:07:54 2010 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import org.apache.commons.io.IOUtils; import org.apache.maven.doxia.site.decoration.DecorationModel; import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader; import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Writer; @@ -38,6 +39,7 @@ import org.apache.maven.project.MavenPro import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.WriterFactory; +import org.codehaus.plexus.util.xml.XmlStreamReader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** @@ -86,9 +88,11 @@ public class SiteDescriptorAttachMojo props.put( "modules", "<menu ref=\"modules\"/>" ); DecorationModel decoration; + XmlStreamReader reader = null; try { - String siteDescriptorContent = IOUtil.toString( ReaderFactory.newXmlReader( descriptorFile ) ); + reader = ReaderFactory.newXmlReader( descriptorFile ); + String siteDescriptorContent = IOUtil.toString( reader ); siteDescriptorContent = siteTool.getInterpolatedSiteDescriptorContent( props, project, siteDescriptorContent, @@ -108,6 +112,10 @@ public class SiteDescriptorAttachMojo { throw new MojoExecutionException( "Error when interpolating site descriptor", e ); } + finally + { + IOUtils.closeQuietly( reader ); + } MavenProject parentProject = siteTool.getParentProject( project, reactorProjects, localRepository ); if ( parentProject != null && project.getUrl() != null && parentProject.getUrl() != null ) @@ -140,10 +148,11 @@ public class SiteDescriptorAttachMojo File interpolatedDescriptorFile = new File( project.getBuild().getDirectory(), filename ); interpolatedDescriptorFile.getParentFile().mkdirs(); + Writer writer = null; try { // Write the interpolated site descriptor to a file - Writer writer = WriterFactory.newXmlWriter( interpolatedDescriptorFile ); + writer = WriterFactory.newXmlWriter( interpolatedDescriptorFile ); new DecorationXpp3Writer().write( writer, decoration ); // Attach the interpolated site descriptor getLog().debug( "Attaching the site descriptor '" + interpolatedDescriptorFile.getAbsolutePath() @@ -154,6 +163,10 @@ public class SiteDescriptorAttachMojo { throw new MojoExecutionException( "Unable to store interpolated site descriptor", e ); } + finally + { + IOUtils.closeQuietly( writer ); + } } } } From commitsbarrettnathan@example.org Sat Oct 02 16:24:32 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 49925 invoked from network); 2 Oct 2010 16:24:31 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 16:24:31 -0000 Received: (qmail 10563 invoked by uid 500); 2 Oct 2010 16:24:31 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 10471 invoked by uid 500); 2 Oct 2010 16:24:31 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 10462 invoked by uid 99); 2 Oct 2010 16:24:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:24:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 16:24:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C817A23889B9; Sat, 2 Oct 2010 16:24:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003827 - /maven/plugins/trunk/maven-assembly-plugin/pom.xml Date: Sat, 02 Oct 2010 16:24:07 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bentmann Date: Sat Oct 2 16:24:07 2010 New Revision: 1003827 URL: http://svn.apache.org/viewvc?rev=1003827&view=rev Log: o Stabilized tests Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/pom.xml?rev=1003827&r1=1003826&r2=1003827&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-assembly-plugin/pom.xml Sat Oct 2 16:24:07 2010 @@ -312,7 +312,8 @@ under the License. </excludes> <redirectTestOutputToFile>${testOutputToFile}</redirectTestOutputToFile> <systemPropertyVariables> - <java.io.tmpdir>${basedir}/target/tmpdir</java.io.tmpdir> + <!-- NOTE: Ensure the tmp dir configured for Surefire exists or some JREs (e.g. 1.5) will fail to create temp files --> + <java.io.tmpdir>${project.build.testOutputDirectory}</java.io.tmpdir> </systemPropertyVariables> </configuration> </plugin> From commitsbarrettnathan@example.org Sun Oct 03 09:47:55 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 13006 invoked from network); 3 Oct 2010 09:47:54 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 Oct 2010 09:47:54 -0000 Received: (qmail 51013 invoked by uid 500); 3 Oct 2010 09:47:54 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 50816 invoked by uid 500); 3 Oct 2010 09:47:51 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 50809 invoked by uid 99); 3 Oct 2010 09:47:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 09:47:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 09:47:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 90B91238890B; Sun, 3 Oct 2010 09:47:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003942 - /maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java Date: Sun, 03 Oct 2010 09:47:29 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> Author: hboutemy Date: Sun Oct 3 09:47:29 2010 New Revision: 1003942 URL: http://svn.apache.org/viewvc?rev=1003942&view=rev Log: [ARCHETYPE-327] improved error reporting for diagnosis Submitted by: Jesse Glick Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java?rev=1003942&r1=1003941&r2=1003942&view=diff ============================================================================== --- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java (original) +++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java Sun Oct 3 09:47:29 2010 @@ -201,7 +201,7 @@ public class CreateProjectFromArchetypeM } catch ( Exception ex ) { - throw new MojoFailureException( ex.getMessage() ); + throw (MojoFailureException) new MojoFailureException( ex.getMessage() ).initCause( ex ); } String artifactId = request.getArtifactId(); From commitsbarrettnathan@example.org Sun Oct 03 14:15:19 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 73265 invoked from network); 3 Oct 2010 14:15:19 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 Oct 2010 14:15:19 -0000 Received: (qmail 56809 invoked by uid 500); 3 Oct 2010 14:15:19 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 56590 invoked by uid 500); 3 Oct 2010 14:15:16 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 56582 invoked by uid 99); 3 Oct 2010 14:15:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 14:15:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 14:15:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 62F5C238890A; Sun, 3 Oct 2010 14:14:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003967 - in /maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui: ArchetypeSelectionQueryer.java ArchetypeSelector.java Date: Sun, 03 Oct 2010 14:14:51 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Sun Oct 3 14:14:51 2010 New Revision: 1003967 URL: http://svn.apache.org/viewvc?rev=1003967&view=rev Log: code cleanup Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelector.java Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java?rev=1003967&r1=1003966&r2=1003967&view=diff ============================================================================== --- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java (original) +++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java Sun Oct 3 14:14:51 2010 @@ -26,7 +26,7 @@ import java.util.List; import java.util.Map; /** - * @todo this interface is bound to it's implementation through the prompter exception + * @todo this interface is bound to its implementation through the prompter exception */ public interface ArchetypeSelectionQueryer { @@ -38,22 +38,6 @@ public interface ArchetypeSelectionQuery boolean confirmSelection( ArchetypeDefinition archetypeDefinition ) throws PrompterException; -// Archetype selectArchetype( List list ) -// throws -// PrompterException; - -// Archetype selectArtifact( List list ) -// throws -// PrompterException; -// -// String selectGroup( List list ) -// throws -// PrompterException; -// -// String selectVersion( List list ) -// throws -// PrompterException; - /** * Select an archetype from the given map. * Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelector.java URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelector.java?rev=1003967&r1=1003966&r2=1003967&view=diff ============================================================================== --- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelector.java (original) +++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelector.java Sun Oct 3 14:14:51 2010 @@ -30,22 +30,11 @@ import java.io.IOException; //TODO: We should need any remote repositories here, we should simply be doing selection, any remote catalogs // should be validating correctness, and if it so happens we get a crap entry then the generation mechanism - // should take care of reporting the error. The selector should not be downloading anything. public interface ArchetypeSelector { String ROLE = ArchetypeSelector.class.getName(); -// void selectArchetype( ArchetypeGenerationRequest request, -// Boolean interactiveMode ) -// throws -// ArchetypeNotDefined, -// UnknownArchetype, -// UnknownGroup, -// IOException, -// PrompterException, -// ArchetypeSelectionFailure; - void selectArchetype( ArchetypeGenerationRequest request, Boolean interactiveMode, String catalogs ) throws ArchetypeNotDefined, UnknownArchetype, UnknownGroup, IOException, PrompterException, ArchetypeSelectionFailure; From commitsbarrettnathan@example.org Sun Oct 03 17:36:51 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 14136 invoked from network); 3 Oct 2010 17:36:50 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 Oct 2010 17:36:50 -0000 Received: (qmail 43256 invoked by uid 500); 3 Oct 2010 17:36:50 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 43059 invoked by uid 500); 3 Oct 2010 17:36:49 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 43052 invoked by uid 99); 3 Oct 2010 17:36:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 17:36:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 17:36:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C519923888FE; Sun, 3 Oct 2010 17:36:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004009 - /maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java Date: Sun, 03 Oct 2010 17:36:25 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Sun Oct 3 17:36:25 2010 New Revision: 1004009 URL: http://svn.apache.org/viewvc?rev=1004009&view=rev Log: o code simplification and cleanup o javadoc improvement o avoid stream leaks when reading files Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java?rev=1004009&r1=1004008&r2=1004009&view=diff ============================================================================== --- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java (original) +++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java Sun Oct 3 17:36:25 2010 @@ -29,18 +29,28 @@ import org.apache.maven.plugin.MojoExecu import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.io.StringWriter; import java.util.List; import java.util.Properties; /** - * Execute the archetype integration tests. + * Execute the archetype integration tests, consisting of a creation of a project from the current archetype with + * defined properties and optional comparison with reference copy. An IT consists of a directory in + * <code>src/test/resources/projects</code> containing: + * <ul> + * <li><code>goal.txt</code> (content actually not used, but future version should interpret it as a goal to run against + * the generated project: see <a href="http://http://jira.codehaus.org/browse/ARCHETYPE-334/">ARCHETYPE-334</a>),</li> + * <li><code>archetype.properties</code> with properties for project generation,</li> + * <li>optional <code>reference/</code> directory containing a reference copy of the expected project created from the IT.</li> + * </ul> * * @author rafale * @requiresProject true @@ -72,46 +82,50 @@ public class IntegrationTestMojo public void execute() throws MojoExecutionException, MojoFailureException { - if ( !skip ) + if ( skip ) { - try - { - File projectsDirectory = new File( project.getBasedir(), "target/test-classes/projects" ); + return; + } - if ( projectsDirectory.exists() ) - { - File archetypeFile = project.getArtifact().getFile(); + File projectsDirectory = new File( project.getBasedir(), "target/test-classes/projects" ); - List<File> projectsGoalFiles = FileUtils.getFiles( projectsDirectory, "*/goal.txt", "" ); + if ( !projectsDirectory.exists() ) + { + return; + } - StringWriter errorWriter = new StringWriter(); - for ( File goalFile : projectsGoalFiles ) - { - try - { - processIntegrationTest( goalFile, archetypeFile ); - } - catch ( IntegrationTestFailure ex ) - { - errorWriter.write( "Test " + goalFile.getParentFile().getName() + " failed\n" ); - errorWriter.write( ex.getStackTrace() + "\n" ); - errorWriter.write( ex.getMessage() + "\n" ); - errorWriter.write( "\n" ); - } - } + try + { + List<File> projectsGoalFiles = FileUtils.getFiles( projectsDirectory, "*/goal.txt", "" ); - String errors = errorWriter.toString(); - if ( !StringUtils.isEmpty( errors ) ) - { - throw new MojoExecutionException( errors ); - } + File archetypeFile = project.getArtifact().getFile(); + + StringWriter errorWriter = new StringWriter(); + for ( File goalFile : projectsGoalFiles ) + { + try + { + processIntegrationTest( goalFile, archetypeFile ); + } + catch ( IntegrationTestFailure ex ) + { + errorWriter.write( "Test " + goalFile.getParentFile().getName() + " failed\n" ); + errorWriter.write( ex.getStackTrace() + "\n" ); + errorWriter.write( ex.getMessage() + "\n" ); + errorWriter.write( "\n" ); } } - catch ( IOException ex ) + + String errors = errorWriter.toString(); + if ( !StringUtils.isEmpty( errors ) ) { - throw new MojoFailureException( ex, ex.getMessage(), ex.getMessage() ); + throw new MojoExecutionException( errors ); } } + catch ( IOException ex ) + { + throw new MojoFailureException( ex, ex.getMessage(), ex.getMessage() ); + } } private void assertTest( File reference, File basedir ) @@ -173,7 +187,17 @@ public class IntegrationTestMojo { Properties properties = new Properties(); - properties.load( new FileInputStream( propertiesFile ) ); + InputStream in = null; + try + { + in = new FileInputStream( propertiesFile ); + + properties.load( in ); + } + finally + { + IOUtil.close( in ); + } return properties; } @@ -189,8 +213,6 @@ public class IntegrationTestMojo { try { - Properties testProperties = getTestProperties( goalFile ); - Properties properties = getProperties( goalFile ); String basedir = goalFile.getParentFile().getPath() + "/project"; @@ -214,6 +236,11 @@ public class IntegrationTestMojo archetypeGenerator.generateArchetype( request, archetypeFile, result ); + if ( result.getCause() != null ) + { + throw new IntegrationTestFailure( result.getCause() ); + } + File reference = new File( goalFile.getParentFile(), "reference" ); if ( reference.exists() ) @@ -221,11 +248,6 @@ public class IntegrationTestMojo // compare generated project with reference assertTest( reference, new File( basedir, request.getArtifactId() ) ); } - - if ( result.getCause() != null ) - { - throw new IntegrationTestFailure( result.getCause() ); - } } catch ( IOException ioe ) { @@ -237,17 +259,10 @@ public class IntegrationTestMojo throws IOException { File propertiesFile = new File( goalFile.getParentFile(), "archetype.properties" ); - System.out.println( propertiesFile ); return loadProperties( propertiesFile ); } - private Properties getTestProperties( File goalFile ) - throws IOException - { - return loadProperties( goalFile ); - } - class IntegrationTestFailure extends Exception { From commitsbarrettnathan@example.org Sun Oct 03 22:31:28 2010 Return-Path: <commitsbarrettnathan@example.org> Delivered-To: barrettnathan@example.org Received: (qmail 26057 invoked from network); 3 Oct 2010 22:31:28 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 Oct 2010 22:31:28 -0000 Received: (qmail 49568 invoked by uid 500); 3 Oct 2010 22:31:28 -0000 Delivered-To: barrettnathan@example.org Received: (qmail 49472 invoked by uid 500); 3 Oct 2010 22:31:27 -0000 Mailing-List: contact barrettnathan@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:barrettnathan@example.org> List-Unsubscribe: <mailto:barrettnathan@example.org> List-Post: <mailto:barrettnathan@example.org> List-Id: <commits.maven.apache.org> Reply-To: barrettnathan@example.org Delivered-To: mailing list barrettnathan@example.org Received: (qmail 49465 invoked by uid 99); 3 Oct 2010 22:31:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 22:31:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Oct 2010 22:31:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CE0952388A02; Sun, 3 Oct 2010 22:31:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004061 - /maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java Date: Sun, 03 Oct 2010 22:31:02 -0000 To: barrettnathan@example.org From: barrettnathan@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <barrettnathan@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Sun Oct 3 22:31:02 2010 New Revision: 1004061 URL: http://svn.apache.org/viewvc?rev=1004061&view=rev Log: [ARCHETYPE-282] simplified code to check archetype, with proper debug messages when getting exceptions Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java?rev=1004061&r1=1004060&r2=1004061&view=diff ============================================================================== --- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java (original) +++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java Sun Oct 3 22:31:02 2010 @@ -32,7 +32,6 @@ import org.apache.maven.model.Model; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; -import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.File; @@ -126,6 +125,7 @@ public class DefaultArchetypeArtifactMan { String pomFileName = null; zipFile = getArchetypeZipFile( jar ); + Enumeration<? extends ZipEntry> enumeration = zipFile.entries(); while ( enumeration.hasMoreElements() ) { @@ -143,11 +143,8 @@ public class DefaultArchetypeArtifactMan return null; } - ZipEntry pom = zipFile.getEntry( StringUtils.replace( pomFileName, File.separator, "/" ) ); - if ( pom == null ) - { - pom = zipFile.getEntry( StringUtils.replace( pomFileName, "/", File.separator ) ); - } + ZipEntry pom = zipFile.getEntry( pomFileName ); + if ( pom == null ) { return null; @@ -188,16 +185,14 @@ public class DefaultArchetypeArtifactMan return isFileSetArchetype( zipFile ); } - catch ( XmlPullParserException e ) - { - return false; - } catch ( IOException e ) { + getLogger().debug( e.toString() ); return false; } catch ( UnknownArchetype e ) { + getLogger().debug( e.toString() ); return false; } finally @@ -219,6 +214,7 @@ public class DefaultArchetypeArtifactMan } catch ( UnknownArchetype e ) { + getLogger().debug( e.toString() ); return false; } } @@ -234,16 +230,14 @@ public class DefaultArchetypeArtifactMan return isOldArchetype( zipFile ); } - catch ( XmlPullParserException e ) - { - return false; - } catch ( IOException e ) { + getLogger().debug( e.toString() ); return false; } catch ( UnknownArchetype e ) { + getLogger().debug( e.toString() ); return false; } finally @@ -265,6 +259,7 @@ public class DefaultArchetypeArtifactMan } catch ( UnknownArchetype e ) { + getLogger().debug( e.toString() ); return false; } } @@ -433,40 +428,59 @@ public class DefaultArchetypeArtifactMan } private boolean isFileSetArchetype( ZipFile zipFile ) - throws IOException, XmlPullParserException + throws IOException { - org.apache.maven.archetype.metadata.ArchetypeDescriptor descriptor = loadFileSetArchetypeDescriptor( zipFile ); + Reader reader = null; + try + { + reader = getArchetypeDescriptorReader( zipFile ); - return descriptor.getName() != null; + return ( reader != null ); + } + finally + { + IOUtil.close( reader ); + } } private boolean isOldArchetype( ZipFile zipFile ) - throws IOException, XmlPullParserException + throws IOException { - org.apache.maven.archetype.old.descriptor.ArchetypeDescriptor descriptor = loadOldArchetypeDescriptor( zipFile ); + Reader reader = null; + try + { + reader = getOldArchetypeDescriptorReader( zipFile ); - return descriptor.getId() != null; + return ( reader != null ); + } + finally + { + IOUtil.close( reader ); + } } private org.apache.maven.archetype.metadata.ArchetypeDescriptor loadFileSetArchetypeDescriptor( ZipFile zipFile ) throws IOException, XmlPullParserException { - Reader reader = getArchetypeDescriptorReader( zipFile ); - - ArchetypeDescriptorXpp3Reader archetypeReader = new ArchetypeDescriptorXpp3Reader(); - + Reader reader = null; try { + reader = getArchetypeDescriptorReader( zipFile ); + + if ( reader == null ) + { + return null; + } + + ArchetypeDescriptorXpp3Reader archetypeReader = new ArchetypeDescriptorXpp3Reader(); return archetypeReader.read( reader, false ); } catch ( IOException e ) { - getLogger().debug( "Cannot read archetype descriptor", e ); throw e; } catch ( XmlPullParserException e ) { - getLogger().error( "Cannot parse archetype descriptor", e ); throw e; } finally @@ -478,45 +492,31 @@ public class DefaultArchetypeArtifactMan private org.apache.maven.archetype.old.descriptor.ArchetypeDescriptor loadOldArchetypeDescriptor( ZipFile zipFile ) throws IOException, XmlPullParserException { - ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder(); - - org.apache.maven.archetype.old.descriptor.ArchetypeDescriptor descriptor = null; - Reader reader = null; try { reader = getOldArchetypeDescriptorReader( zipFile ); - descriptor = builder.build( reader ); + if ( reader == null ) + { + return null; + } + + ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder(); + return builder.build( reader ); } catch ( IOException ex ) { - getLogger().debug( "Cannot load old archetype", ex ); + throw ex; } catch ( XmlPullParserException ex ) { - getLogger().error( "Cannot parse old archetype", ex ); + throw ex; } finally { IOUtil.close( reader ); } - - if ( descriptor == null ) - { - try - { - reader = getOlderArchetypeDescriptorReader( zipFile ); - - descriptor = builder.build( reader ); - } - finally - { - IOUtil.close( reader ); - } - } - - return descriptor; } private Reader getArchetypeDescriptorReader( ZipFile zipFile ) @@ -528,30 +528,24 @@ public class DefaultArchetypeArtifactMan private Reader getOldArchetypeDescriptorReader( ZipFile zipFile ) throws IOException { - return getDescriptorReader( zipFile, Constants.OLD_ARCHETYPE_DESCRIPTOR ); - } + Reader reader = getDescriptorReader( zipFile, Constants.OLD_ARCHETYPE_DESCRIPTOR ); - private Reader getOlderArchetypeDescriptorReader( ZipFile zipFile ) - throws IOException - { - return getDescriptorReader( zipFile, Constants.OLDER_ARCHETYPE_DESCRIPTOR ); + if ( reader == null ) + { + reader = getDescriptorReader( zipFile, Constants.OLDER_ARCHETYPE_DESCRIPTOR ); + } + + return reader; } private Reader getDescriptorReader( ZipFile zipFile, String descriptor ) throws IOException { - ZipEntry entry = searchEntry( zipFile, StringUtils.replace( descriptor, File.separator, "/" ) ); - - if ( entry == null ) - { - getLogger().debug( "No found " + descriptor + " retrying with windows path separator." ); - - entry = searchEntry( zipFile, StringUtils.replace( descriptor, "/", File.separator ) ); - } + ZipEntry entry = searchEntry( zipFile, descriptor ); if ( entry == null ) { - throw new IOException( "The " + descriptor + " descriptor cannot be found in " + zipFile.getName() + "." ); + return null; } InputStream is = zipFile.getInputStream( entry ); @@ -591,7 +585,7 @@ public class DefaultArchetypeArtifactMan } catch ( Exception e ) { - getLogger().error( "Failed to close zipFile" ); + getLogger().error( "Failed to close " + zipFile.getName() + " zipFile." ); } } } From commitsbarrettnathan@example.org Mon Oct 04 09:49:38 2010 Return-Path:
{'source': 'Apache Software Foundation Public Mail Archives'}