You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Brett Porter <br...@apache.org> on 2005/02/03 10:12:39 UTC

John - please validate Re: cvs commit: maven-components/maven-core/src/test/java/org/apache/maven/project DefaultProjectDefaultsInjectorTest.java

John,

Can you validate this? The test was failing for me and I didn't see ISE 
thrown in that code.

In fact, I can't find anything validating the values within a POM, only 
the XML format.

- Brett

brett@apache.org wrote:

>brett       2005/02/03 01:10:02
>
>  +//        try
>  +//        {
>  +        new DefaultProjectDefaultsInjector().injectDefaults( project );
>  +        Dependency dependency = (Dependency) project.getDependencies().get( 0 );
>  +        assertNull( "check version is null", dependency.getVersion() );
>  +//            fail("Should fail to validate dependency without a version.");
>  +//        }
>  +//        catch ( IllegalStateException e )
>  +//        {
>  +//            // should throw when it detects a missing version in the test dependency.
>  +//        }
>       }
>   
>   }
>  
>  
>  
>
>
>  
>


Re: John - please validate Re: cvs commit: maven-components/maven-core/src/test/java/org/apache/maven/project DefaultProjectDefaultsInjectorTest.java

Posted by John Casey <jd...@commonjava.org>.
Sorry, I found that late last night as well. I took validation out of 
the defaults injector, since it's supposed to live in the project 
validator...just forgot to commit the changes to the test. Essentially, 
I removed the entire last test method, since it was only meant to test 
the validation I had in the injector.

-j

Brett Porter wrote:
> John,
> 
> Can you validate this? The test was failing for me and I didn't see ISE 
> thrown in that code.
> 
> In fact, I can't find anything validating the values within a POM, only 
> the XML format.
> 
> - Brett
> 
> brett@apache.org wrote:
> 
>> brett       2005/02/03 01:10:02
>>
>>  +//        try
>>  +//        {
>>  +        new DefaultProjectDefaultsInjector().injectDefaults( project );
>>  +        Dependency dependency = (Dependency) 
>> project.getDependencies().get( 0 );
>>  +        assertNull( "check version is null", dependency.getVersion() );
>>  +//            fail("Should fail to validate dependency without a 
>> version.");
>>  +//        }
>>  +//        catch ( IllegalStateException e )
>>  +//        {
>>  +//            // should throw when it detects a missing version in 
>> the test dependency.
>>  +//        }
>>       }
>>     }
>>  
>>  
>>  
>>
>>
>>  
>>
> 
> 
>