From continuum-commits-return-436-apmail-maven-continuum-commits-archive=maven.apache.org@maven.apache.org Thu Jul 07 21:15:26 2005 Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 74621 invoked from network); 7 Jul 2005 21:15:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2005 21:15:26 -0000 Received: (qmail 6970 invoked by uid 500); 7 Jul 2005 21:15:14 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 6928 invoked by uid 500); 7 Jul 2005 21:15:14 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 6883 invoked by uid 99); 7 Jul 2005 21:15:14 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 07 Jul 2005 14:15:02 -0700 Received: (qmail 74438 invoked by uid 65534); 7 Jul 2005 21:15:00 -0000 Message-ID: <20050707211500.74437.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r209648 - in /maven/continuum/trunk/continuum-core/src/main: java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java resources/META-INF/plexus/components.xml Date: Thu, 07 Jul 2005 21:14:59 -0000 To: continuum-commits@maven.apache.org From: trygvis@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: trygvis Date: Thu Jul 7 14:14:57 2005 New Revision: 209648 URL: http://svn.apache.org/viewcvs?rev=209648&view=rev Log: o Making it possible to configure what local repository the internal Maven 2 components will use to read parent and dependency POMs from. Still fall backs to ${plexus.home} if it's not set and/or there was a error building the settings. Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=209648&r1=209647&r2=209648&view=diff ============================================================================== --- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java (original) +++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java Thu Jul 7 14:14:57 2005 @@ -17,6 +17,7 @@ */ import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; @@ -35,9 +36,12 @@ import org.apache.maven.model.Scm; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; +import org.apache.maven.settings.MavenSettingsBuilder; +import org.apache.maven.settings.Settings; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * @author Trygve Laugstøl @@ -58,6 +62,9 @@ /** @plexus.requirement */ private ArtifactRepositoryLayout repositoryLayout; + /** @plexus.requirement */ + private MavenSettingsBuilder mavenSettingsBuilder; + /** @plexus.configuration */ private String localRepository; @@ -83,6 +90,8 @@ if ( StringUtils.isEmpty( continuumProject.getCommandLineArguments() ) ) { continuumProject.setCommandLineArguments( "-N -B" ); + +// continuumProject.setCommandLineArguments( "-N -B -Djline.terminal=jline.UnsupportedTerminal" ); } if ( StringUtils.isEmpty( continuumProject.getGoals() ) ) @@ -238,7 +247,7 @@ throw new MavenBuilderHelperException( "Missing type from notifier." ); } - notifier.setType( projectNotifier.getType() ); + notifier.setType( projectNotifier.getType() ); notifier.setConfiguration( projectNotifier.getConfiguration() ); @@ -259,6 +268,23 @@ private ArtifactRepository getRepository() { + String localRepository = this.localRepository; + + try + { + Settings settings = mavenSettingsBuilder.buildSettings(); + + localRepository = settings.getLocalRepository(); + } + catch ( IOException e ) + { + getLogger().warn( "Error while building Maven settings.", e ); + } + catch ( XmlPullParserException e ) + { + getLogger().warn( "Error while building Maven settings.", e ); + } + Repository repository = new Repository(); return artifactRepositoryFactory.createArtifactRepository( "local", Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=209648&r1=209647&r2=209648&view=diff ============================================================================== --- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original) +++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Thu Jul 7 14:14:57 2005 @@ -215,6 +215,9 @@ org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout default + + org.apache.maven.settings.MavenSettingsBuilder + ${plexus.home}/local-repository