Author: jdcasey Date: Tue Mar 20 14:14:25 2007 New Revision: 520600 URL: http://svn.apache.org/viewvc?view=rev&rev=520600 Log: Merged revId 519740 to this branch, to prepare for merging this branch back to trunk.
Modified: maven/components/branches/2.1-lifecycle-refactor/build.properties maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn.bat maven/components/branches/2.1-lifecycle-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java maven/components/branches/2.1-lifecycle-refactor/pom.xml Modified: maven/components/branches/2.1-lifecycle-refactor/build.properties URL: http://svn.apache.org/viewvc/maven/components/branches/2.1-lifecycle-refactor/build.properties?view=diff&rev=520600&r1=520599&r2=520600 ============================================================================== --- maven/components/branches/2.1-lifecycle-refactor/build.properties (original) +++ maven/components/branches/2.1-lifecycle-refactor/build.properties Tue Mar 20 14:14:25 2007 @@ -17,7 +17,7 @@ classworlds.version=1.2-alpha-7 plexus-active-collections.version=1.0-SNAPSHOT -plexus.version=1.0-alpha-19 +plexus.version=1.0-alpha-20 plexus-archiver.version=1.0-alpha-8 plexus-utils.version=1.4.1 plexus-interactivity-api.version=1.0-alpha-6-SNAPSHOT Modified: maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn URL: http://svn.apache.org/viewvc/maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn?view=diff&rev=520600&r1=520599&r2=520600 ============================================================================== --- maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn (original) +++ maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn Tue Mar 20 14:14:25 2007 @@ -1,18 +1,21 @@ #!/bin/sh # ---------------------------------------------------------------------------- -# Copyright 2001-2004 The Apache Software Foundation. -# -# Licensed 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. +# 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. # ---------------------------------------------------------------------------- # Copyright (c) 2001-2002 The Apache Software Foundation. All rights @@ -161,5 +164,4 @@ "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ "-Dmaven.home=${M2_HOME}" \ ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS - Modified: maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn.bat URL: http://svn.apache.org/viewvc/maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn.bat?view=diff&rev=520600&r1=520599&r2=520600 ============================================================================== --- maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn.bat (original) +++ maven/components/branches/2.1-lifecycle-refactor/maven-embedder/src/bin/mvn.bat Tue Mar 20 14:14:25 2007 @@ -1,19 +1,21 @@ @REM ---------------------------------------------------------------------------- [EMAIL PROTECTED] Copyright 2001-2004 The Apache Software Foundation. [EMAIL PROTECTED] [EMAIL PROTECTED] Licensed under the Apache License, Version 2.0 (the "License"); [EMAIL PROTECTED] you may not use this file except in compliance with the License. [EMAIL PROTECTED] You may obtain a copy of the License at [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.apache.org/licenses/LICENSE-2.0 [EMAIL PROTECTED] [EMAIL PROTECTED] Unless required by applicable law or agreed to in writing, software [EMAIL PROTECTED] distributed under the License is distributed on an "AS IS" BASIS, [EMAIL PROTECTED] WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. [EMAIL PROTECTED] See the License for the specific language governing permissions and [EMAIL PROTECTED] limitations under the License. [EMAIL PROTECTED] Licensed to the Apache Software Foundation (ASF) under one [EMAIL PROTECTED] or more contributor license agreements. See the NOTICE file [EMAIL PROTECTED] distributed with this work for additional information [EMAIL PROTECTED] regarding copyright ownership. The ASF licenses this file [EMAIL PROTECTED] to you under the Apache License, Version 2.0 (the [EMAIL PROTECTED] "License"); you may not use this file except in compliance [EMAIL PROTECTED] with the License. You may obtain a copy of the License at [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.apache.org/licenses/LICENSE-2.0 [EMAIL PROTECTED] [EMAIL PROTECTED] Unless required by applicable law or agreed to in writing, [EMAIL PROTECTED] software distributed under the License is distributed on an [EMAIL PROTECTED] "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY [EMAIL PROTECTED] KIND, either express or implied. See the License for the [EMAIL PROTECTED] specific language governing permissions and limitations [EMAIL PROTECTED] under the License. @REM ---------------------------------------------------------------------------- [EMAIL PROTECTED] @REM ---------------------------------------------------------------------------- @REM Maven2 Start Up Batch script @@ -152,5 +154,4 @@ if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% exit /B %ERROR_CODE% - Modified: maven/components/branches/2.1-lifecycle-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java URL: http://svn.apache.org/viewvc/maven/components/branches/2.1-lifecycle-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?view=diff&rev=520600&r1=520599&r2=520600 ============================================================================== --- maven/components/branches/2.1-lifecycle-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java (original) +++ maven/components/branches/2.1-lifecycle-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java Tue Mar 20 14:14:25 2007 @@ -1596,6 +1596,7 @@ if ( ref.getArtifact().getFile() != null && ref.getArtifact().getFile().exists() ) { pluginArtifact = new ActiveProjectArtifact( ref, pluginArtifact ); + return pluginArtifact; } else { @@ -1603,6 +1604,35 @@ logger.warn( "Artifact found in the reactor has not been built when it's use was " + "attempted - resolving from the repository instead" ); */ + } + } + + Iterator itr = ref.getAttachedArtifacts().iterator(); + while(itr.hasNext()) { + Artifact attached = (Artifact) itr.next(); + if( attached.getDependencyConflictId().equals(pluginArtifact.getDependencyConflictId()) ) { + /* TODO: if I use the original, I get an exception below: + java.lang.UnsupportedOperationException: Cannot change the download information for an attached artifact. It is derived from the main artifact. + at org.apache.maven.project.artifact.AttachedArtifact.setDownloadUrl(AttachedArtifact.java:89) + at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:205) + at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:275) + at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:67) + at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:223) + at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211) + at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:182) + at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1117) + at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:366) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) + at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) + at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) + at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) + */ + return ArtifactUtils.copyArtifact(attached); } } } Modified: maven/components/branches/2.1-lifecycle-refactor/pom.xml URL: http://svn.apache.org/viewvc/maven/components/branches/2.1-lifecycle-refactor/pom.xml?view=diff&rev=520600&r1=520599&r2=520600 ============================================================================== --- maven/components/branches/2.1-lifecycle-refactor/pom.xml (original) +++ maven/components/branches/2.1-lifecycle-refactor/pom.xml Tue Mar 20 14:14:25 2007 @@ -138,7 +138,7 @@ <module>maven-embedder</module> </modules> <properties> - <plexusVersion>1.0-alpha-19</plexusVersion> + <plexusVersion>1.0-alpha-20</plexusVersion> <wagonVersion>1.0-beta-2</wagonVersion> </properties> <dependencies>