Author: jdcasey
Date: Sat Feb 7 04:47:26 2009
New Revision: 741841
URL: http://svn.apache.org/viewvc?rev=741841&view=rev
Log:
[MNG-2720] Remove special handling for jar and test-jar artifacts, and use the
artifact file created in the package step for dependencies in sibling projects
in a multi-module build...in exactly the same way that these artifacts are used
when the sibling project is built in isolation.
Modified:
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Modified:
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=741841&r1=741840&r2=741841&view=diff
==============================================================================
---
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Sat Feb 7 04:47:26 2009
@@ -1787,36 +1787,12 @@
private void addArtifactPath(Artifact a, List list) throws
DependencyResolutionRequiredException
{
- String refId = getProjectReferenceId( a.getGroupId(),
a.getArtifactId(), a.getVersion() );
- MavenProject project = (MavenProject) projectReferences.get( refId );
-
- boolean projectDirFound = false;
- if ( project != null )
+ File file = a.getFile();
+ if ( file == null )
{
- if (a.getType().equals("test-jar"))
- {
- File testOutputDir = new File(
project.getBuild().getTestOutputDirectory() );
- if ( testOutputDir.exists() )
- {
- list.add( testOutputDir.getAbsolutePath() );
- projectDirFound = true;
- }
- }
- else
- {
- list.add( project.getBuild().getOutputDirectory() );
- projectDirFound = true;
- }
- }
- if ( ! projectDirFound )
- {
- File file = a.getFile();
- if ( file == null )
- {
- throw new DependencyResolutionRequiredException( a );
- }
- list.add( file.getPath() );
+ throw new DependencyResolutionRequiredException( a );
}
+ list.add( file.getPath() );
}
/**