You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2009/05/29 22:35:39 UTC
svn commit: r780101 -
/maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java
Author: jvanzyl
Date: Fri May 29 20:35:37 2009
New Revision: 780101
URL: http://svn.apache.org/viewvc?rev=780101&view=rev
Log:
o look for the pom first
Modified:
maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java
Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java?rev=780101&r1=780100&r2=780101&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java Fri May 29 20:35:37 2009
@@ -35,41 +35,44 @@
if ( project != null )
{
- File artifactFile = project.getArtifact().getFile();
-
- if ( artifactFile != null && artifactFile.exists() )
+ if ( artifact.getType().equals( "pom" ) )
{
- //TODO: This is really completely wrong and should probably be based on the phase that is currently being executed.
- // If we are running before the packaging phase there is going to be no archive anyway, but if we are running prior to package
- // we shouldn't even take the archive anyway.
-
- artifact.setFile( artifactFile );
-
- artifact.setFromAuthoritativeRepository( true );
-
- artifact.setResolved( true );
- }
- /*
-
- TODO: This is being left out because Maven 2.x does not set this internally and it is only done by the compiler
- plugin and not done generally. This should be done generally but currently causes problems with MNG-3023
-
- else if ( new File( project.getBuild().getOutputDirectory() ).exists() )
- {
- artifact.setFile( new File( project.getBuild().getOutputDirectory() ) );
+ artifact.setFile( project.getFile() );
artifact.setFromAuthoritativeRepository( true );
artifact.setResolved( true );
}
- */
- else if ( artifact.getType().equals( "pom" ) )
+ else
{
- artifact.setFile( project.getFile() );
+ File artifactFile = project.getArtifact().getFile();
- artifact.setFromAuthoritativeRepository( true );
-
- artifact.setResolved( true );
+ if ( artifactFile != null && artifactFile.exists() )
+ {
+ //TODO: This is really completely wrong and should probably be based on the phase that is currently being executed.
+ // If we are running before the packaging phase there is going to be no archive anyway, but if we are running prior to package
+ // we shouldn't even take the archive anyway.
+
+ artifact.setFile( artifactFile );
+
+ artifact.setFromAuthoritativeRepository( true );
+
+ artifact.setResolved( true );
+ }
+ /*
+
+ TODO: This is being left out because Maven 2.x does not set this internally and it is only done by the compiler
+ plugin and not done generally. This should be done generally but currently causes problems with MNG-3023
+
+ else if ( new File( project.getBuild().getOutputDirectory() ).exists() )
+ {
+ artifact.setFile( new File( project.getBuild().getOutputDirectory() ) );
+
+ artifact.setFromAuthoritativeRepository( true );
+
+ artifact.setResolved( true );
+ }
+ */
}
}