mirror of https://github.com/apache/maven.git
o right now disabling the setting of the classes directory as this is only done in 2.x in the compiler plugin and causes problems with the integration tests.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@780077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b9854faa4
commit
192be4ec01
|
@ -35,33 +35,34 @@ public class ReactorArtifactRepository
|
|||
|
||||
if ( project != null )
|
||||
{
|
||||
if ( artifact.getType().equals( "jar" ) )
|
||||
File artifactFile = project.getArtifact().getFile();
|
||||
|
||||
if ( artifactFile != null && artifactFile.exists() )
|
||||
{
|
||||
File artifactFile = new File( project.getBuild().getDirectory(), project.getArtifactId() + "-" + project.getVersion() + "."+ artifact.getArtifactHandler().getExtension() );
|
||||
|
||||
File classesDirectory = new File( project.getBuild().getOutputDirectory() );
|
||||
|
||||
//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.
|
||||
|
||||
if ( artifactFile.exists() )
|
||||
{
|
||||
artifact.setFile( artifactFile );
|
||||
|
||||
artifact.setFromAuthoritativeRepository( true );
|
||||
|
||||
artifact.setResolved( true );
|
||||
}
|
||||
else if ( classesDirectory.exists() )
|
||||
/*
|
||||
|
||||
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( classesDirectory );
|
||||
artifact.setFile( new File( project.getBuild().getOutputDirectory() ) );
|
||||
|
||||
artifact.setFromAuthoritativeRepository( true );
|
||||
|
||||
artifact.setResolved( true );
|
||||
}
|
||||
}
|
||||
*/
|
||||
else if ( artifact.getType().equals( "pom" ) )
|
||||
{
|
||||
artifact.setFile( project.getFile() );
|
||||
|
|
Loading…
Reference in New Issue