Re: [M2] including a test jar in test phase
hi, With m2, you should add a scopetest/scope in your dependency Emmanuel c_inconnu3 wrote: Hi, I want to test some code which uses data in a jar file. So I have created a jar holding data to test against. In M1, I wrote something like that : preGoal name=test:test ja:path id=test.jar pathelement location=${maven.test.dest}/test.jar / /ja:path jm:addPath id=maven.dependency.classpath refid=test.jar / /preGoal Is there any simple solution in M2 ??? Thanks David DIDIER - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] including a test jar in test phase
You can try adding testResources in your pom.xml like so: testResources testResource #class_Resource directory./path/test.jar/directory /testResource /testResources where the directory element can be an absolute path or a relative path to your pom.xml c_inconnu3 wrote: Hi, I want to test some code which uses data in a jar file. So I have created a jar holding data to test against. In M1, I wrote something like that : preGoal name=test:test ja:path id=test.jar pathelement location=${maven.test.dest}/test.jar / /ja:path jm:addPath id=maven.dependency.classpath refid=test.jar / /preGoal Is there any simple solution in M2 ??? Thanks David DIDIER - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] including a test jar in test phase
On Tue, 28 Jun 2005, Edwin Punzalan wrote: As an addendum: if you use the ClassLoader to get the resources, you only need the resources in the classpath, not necessarily in a jar. The resources specified in testResources are copied to target/test-classes which is on the classpath during testing. So if you use the preferred way to access resources it should already work. You can try adding testResources in your pom.xml like so: testResources testResource #class_Resource directory./path/test.jar/directory /testResource /testResources where the directory element can be an absolute path or a relative path to your pom.xml c_inconnu3 wrote: Hi, I want to test some code which uses data in a jar file. So I have created a jar holding data to test against. In M1, I wrote something like that : preGoal name=test:test ja:path id=test.jar pathelement location=${maven.test.dest}/test.jar / /ja:path jm:addPath id=maven.dependency.classpath refid=test.jar / /preGoal Is there any simple solution in M2 ??? Thanks David DIDIER - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]