Resolving: MNG-766.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@239464 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-08-23 22:11:07 +00:00
parent 0ef80f1227
commit 252b151052
9 changed files with 90 additions and 25 deletions

View File

@ -159,6 +159,8 @@ it0055: Test that source includes/excludes with in the compiler plugin config.
it0056: Test that multiple executions of the compile goal with different
includes/excludes will succeed.
it0057: Verify that scope == 'provided' dependencies are available to tests.
-------------------------------------------------------------------------------
- generated sources

View File

@ -1,3 +1,4 @@
it0057
it0056
it0055
it0054

View File

@ -0,0 +1,4 @@
target/classes/org/apache/maven/it0001/Person.class
target/test-classes/org/apache/maven/it0001/PersonTest.class
target/maven-core-it0057-1.0.jar
target/maven-core-it0057-1.0.jar!/it0001.properties

View File

@ -0,0 +1 @@
package

View File

@ -0,0 +1,15 @@
<model>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core-it0057</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</model>

View File

@ -0,0 +1,16 @@
package org.apache.maven.it0001;
public class Person
{
private String name;
public void setName( String name )
{
this.name = name;
}
public String getName()
{
return name;
}
}

View File

@ -0,0 +1 @@
name = jason

View File

@ -0,0 +1,16 @@
package org.apache.maven.it0001;
import junit.framework.TestCase;
public class PersonTest
extends TestCase
{
public void testPerson()
{
Person person = new Person();
person.setName( "foo" );
assertEquals( "foo", person.getName() );
}
}

View File

@ -445,9 +445,12 @@ public class MavenProject
if ( isAddedToClasspath( a ) )
{
// TODO: let the scope handler deal with this
if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
{
// NOTE: [jc] scope == 'test' is the widest possible scope, so we don't really need to perform
// this check...
// if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
// Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
// {
// }
File file = a.getFile();
if ( file == null )
{
@ -456,7 +459,6 @@ public class MavenProject
list.add( file.getPath() );
}
}
}
return list;
}
@ -472,13 +474,17 @@ public class MavenProject
if ( isAddedToClasspath( a ) )
{
// TODO: let the scope handler deal with this
if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
{
// NOTE: [jc] scope == 'test' is the widest possible scope, so we don't really need to perform
// this check...
// if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
// Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
// {
// list.add( a );
// }
list.add( a );
}
}
}
return list;
}
@ -498,9 +504,13 @@ public class MavenProject
Artifact a = (Artifact) i.next();
// TODO: let the scope handler deal with this
if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
{
// NOTE: [jc] scope == 'test' is the widest possible scope, so we don't really need to perform
// this check...
// if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
// Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
// {
// }
Dependency dependency = new Dependency();
dependency.setArtifactId( a.getArtifactId() );
@ -512,7 +522,6 @@ public class MavenProject
list.add( dependency );
}
}
return list;
}