You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by franz see <fr...@gmail.com> on 2007/01/02 01:55:35 UTC

Re: mvn -- still runs delete test?

Good day to you, Mark, 

> On 12/30/06, mxc <ma...@jumpingbean.co.za> wrote:
> 
> > 1) I have some hbm.xml files I have placed in the resources folder under
> > /src/java/main. However when running test these resources cannot be
> accessed
> > by the class being tested. If I package the jar the files are copied
> over to
> > the jar. Why does getResource not work as expected?
> 
> I'd need to see the pom and the directory structure.  A 'resource
> folder under /src/java/main' sounds decidedly non-standard.

You may want to look at [1] for an introduction to maven's standard
directory layout.

> > 2) I deleted the test that failed as a result of the above so it could
> pass
> > its tests and install itself. However running mvn install still results
> in
> > the test being run! This is weird as the test class has been deleted! I
> feel
> > like I am going insane.
> 
> My guess is that you deleted the .java file and did not run 'mvn
> clean'.  The .class file would still be there under target.

Aside from deleting your test java and class files, you can simply add
-Dmaven.test.skip=true to your mvn command to skip the tests ( i.e. mvn
install -Dmaven.test.skip=true ). See [2] for more info about skipping
tests.

Cheers,
Franz

[1]
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
[2]
http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html
-- 
View this message in context: http://www.nabble.com/mvn----still-runs-delete-test--tf2898827s177.html#a8118794
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: mvn -- still runs delete test?

Posted by mxc <ma...@jumpingbean.co.za>.


>You may want to look at [1] for an introduction to maven's standard
directory layout.
Yeah sorry I meant /src/main/resources -- sorry for the typo.

> >My guess is that you deleted the .java file and did not run 'mvn
>> clean'.  The .class file would still be there under target.

>Aside from deleting your test java and class files, you can simply add
-Dmaven.test.skip=true to your >mvn command to skip the tests ( i.e. mvn
install -Dmaven.test.skip=true ). See [2] for more info >about skipping
tests.

Thanks for the tip. I fixed the weird deleted test issue by running mvn
clean.  I fixed the resource issue not being found by creating a resources
file under /src/test/resources. As you probably know this is where the tests
search for their resources under /src/main/
-- 
View this message in context: http://www.nabble.com/mvn----still-runs-delete-test--tf2898827s177.html#a8149566
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org