You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/06/25 00:14:05 UTC
cvs commit: maven/src/test/java/org/apache/maven/project ProjectInheritanceTest.java
jvanzyl 2003/06/24 15:14:05
Modified: src/test/java/org/apache/maven/project
ProjectInheritanceTest.java
Log:
o Need to use basedir.
Revision Changes Path
1.30 +8 -6 maven/src/test/java/org/apache/maven/project/ProjectInheritanceTest.java
Index: ProjectInheritanceTest.java
===================================================================
RCS file: /home/cvs/maven/src/test/java/org/apache/maven/project/ProjectInheritanceTest.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ProjectInheritanceTest.java 13 Apr 2003 00:56:02 -0000 1.29
+++ ProjectInheritanceTest.java 24 Jun 2003 22:14:05 -0000 1.30
@@ -68,7 +68,9 @@
{
private String TEST_DOCUMENT = null;
private String TEST_DOCUMENT2 = null;
-
+ private String basedir;
+ private String PS = System.getProperty( "path.separator" );
+
public ProjectInheritanceTest( String testName )
{
super( testName );
@@ -86,7 +88,7 @@
protected void setUp() throws Exception
{
super.setUp();
- String baseDir = System.getProperty( "basedir" );
+ baseDir = System.getProperty( "basedir" );
assertNotNull( "The system property basedir was not defined.", baseDir );
String fs = System.getProperty( "file.separator" );
assertNotNull( "The system property file.separator was not defined.", fs );
@@ -117,17 +119,17 @@
assertEquals( "1.4-dev-8",
( (Dependency) p.getDependencies().get( 1 ) ).getVersion() );
-
+
// Test Source Directories
- assertEquals( "src/java", p.getBuild().getSourceDirectory() );
+ assertEquals( basedir + PS + "src/java", p.getBuild().getSourceDirectory() );
// Unit Test Source Directories
- assertEquals( "src/test/java", p.getBuild().getUnitTestSourceDirectory() );
+ assertEquals( basedir + PS + "src/test/java", p.getBuild().getUnitTestSourceDirectory() );
// Test Aspect Source Directories
//assertEquals("src/aspect", p.getBuild().getAspectSourceDirectory());
// Test Test Source Directories ;-)
- assertEquals( "src/test/java", p.getBuild().getUnitTestSourceDirectory() );
+ assertEquals( basedir + PS + "src/test/java", p.getBuild().getUnitTestSourceDirectory() );
String iuSrc = p.getBuild().getIntegrationUnitTestSourceDirectory();
assertTrue( "Should be empty in maven's project descriptor: [" + iuSrc + "]",
StringUtils.isEmpty( iuSrc ) );
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: cvs commit: maven/src/test/java/org/apache/maven/project ProjectInheritanceTest.java
Posted by Brett Porter <bp...@f2network.com.au>.
Hi Incze,
I'm working to define the need for basedir and resolve any of these
ambiguities. I'll make sure I add that plugin to the list.
Cheers,
Brett
Incze Lajos wrote:
> On Tue, Jun 24, 2003 at 10:14:05PM +0000, jvanzyl@apache.org wrote:
>
>>jvanzyl 2003/06/24 15:14:05
>>
>> Modified: src/test/java/org/apache/maven/project
>> ProjectInheritanceTest.java
>> Log:
>> o Need to use basedir.
>
>
> That's ok for this test case. But there are other points
> where (as we don't have a strict convention) the
> programmer works according to the one (src/java) or the
> other (${basedir}/src/java) convention in her/his mind.
>
> E.g. if you use this style, the checkstyle report will go
> wrong, as it's stylesheet allways preprends with ${basedir}
> what it finds in the sourceDirectory tag.
>
> incze
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
--
Web Developer
f2 network ~ everything essential
02 8596 4437
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: cvs commit: maven/src/test/java/org/apache/maven/project ProjectInheritanceTest.java
Posted by Incze Lajos <in...@mail.matav.hu>.
On Tue, Jun 24, 2003 at 10:14:05PM +0000, jvanzyl@apache.org wrote:
> jvanzyl 2003/06/24 15:14:05
>
> Modified: src/test/java/org/apache/maven/project
> ProjectInheritanceTest.java
> Log:
> o Need to use basedir.
That's ok for this test case. But there are other points
where (as we don't have a strict convention) the
programmer works according to the one (src/java) or the
other (${basedir}/src/java) convention in her/his mind.
E.g. if you use this style, the checkstyle report will go
wrong, as it's stylesheet allways preprends with ${basedir}
what it finds in the sourceDirectory tag.
incze
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org