RE: [m1] Test in sub-project depending on tests in another sub-project..
Hi Jeff! Thanks for the clear answer. Given the simplicity of the project (http://objectlabkit.sourceforge.net) I think that I'll stick with this but keep your suggestion in mind. Best regards Benoit Jeff Jensen wrote: > > Hi Benoit! > > It works, but requires the exact relative position between them and pulls > in > the class files vs. a jar depends. If you are happy with that, then you > are > done! If not, I suggest: > - create a "TestFramework" module > - put the base/common test classes from modules A and B in it (in the > src/main dir structure, not src/test) > - jar:install it > - add dependency on TestFramework to module A and B > > > -Original Message- > From: Benoit Xhenseval [mailto:[EMAIL PROTECTED] > Sent: Monday, September 04, 2006 6:51 AM > To: Arnaud HERITIER; Maven Users List > Subject: Re: [m1] Test in sub-project depending on tests in another > sub-project... > > Hi Arnaud, > > Merci pour la reponse. I was thinking about the 2 options you mentioned... > > Since then I think that I have found a solution, in the sub pojects I add > the classes of other sub project as resources: > So for sub-project B: > > > **/*Test.java > > > **/Abstract*.java > > > > > > ../sub-project-A/target/test-classes > false > >**/*.class > > > > > > Seems to work for me... > > Best regards > > Benoit > > > - Original Message ---- > From: Arnaud HERITIER <[EMAIL PROTECTED]> > To: Maven Users List ; Benoit Xhenseval > <[EMAIL PROTECTED]> > Sent: Monday, September 4, 2006 12:39:01 PM > Subject: Re: [m1] Test in sub-project depending on tests in another > sub-project... > > I see two solutions (not really clean :-( ) : > - In the sub-project-A you add your tests in the artifact (you copy the > content of maven.test.dest in maven.build.dest or you set maven.test.dest > = > maven.build.dest). > - You move your tests in another external project (sub-project-A-tests) > but > you have to execute them manually. > > I have no other idea. > > Arnaud > > > > On 9/4/06, Benoit Xhenseval <[EMAIL PROTECTED]> wrote: Hi *, > > I'm struggling on this one... with Maven 1.1-rcx > > sub-project A defines some tests in src/test (as per convention) > sub-project > B defines some tests in src/test (as per convention) > > Problem is that the tests in B extend the AbstractTests in A/src/test > > how could I define a dependency for the unit tests on the tests in A? > At the moment, they do not compile... > > Any suggestion welcome... > > Many thanks > > Benoit > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-m1--Test-in-sub-project-depending-on-tests-in-another-sub-project...-tf2214527.html#a6152593 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m1] Test in sub-project depending on tests in another sub-project...
Hi Benoit! It works, but requires the exact relative position between them and pulls in the class files vs. a jar depends. If you are happy with that, then you are done! If not, I suggest: - create a "TestFramework" module - put the base/common test classes from modules A and B in it (in the src/main dir structure, not src/test) - jar:install it - add dependency on TestFramework to module A and B -Original Message- From: Benoit Xhenseval [mailto:[EMAIL PROTECTED] Sent: Monday, September 04, 2006 6:51 AM To: Arnaud HERITIER; Maven Users List Subject: Re: [m1] Test in sub-project depending on tests in another sub-project... Hi Arnaud, Merci pour la reponse. I was thinking about the 2 options you mentioned... Since then I think that I have found a solution, in the sub pojects I add the classes of other sub project as resources: So for sub-project B: **/*Test.java **/Abstract*.java ../sub-project-A/target/test-classes false **/*.class Seems to work for me... Best regards Benoit - Original Message From: Arnaud HERITIER <[EMAIL PROTECTED]> To: Maven Users List ; Benoit Xhenseval <[EMAIL PROTECTED]> Sent: Monday, September 4, 2006 12:39:01 PM Subject: Re: [m1] Test in sub-project depending on tests in another sub-project... I see two solutions (not really clean :-( ) : - In the sub-project-A you add your tests in the artifact (you copy the content of maven.test.dest in maven.build.dest or you set maven.test.dest = maven.build.dest). - You move your tests in another external project (sub-project-A-tests) but you have to execute them manually. I have no other idea. Arnaud On 9/4/06, Benoit Xhenseval <[EMAIL PROTECTED]> wrote: Hi *, I'm struggling on this one... with Maven 1.1-rcx sub-project A defines some tests in src/test (as per convention) sub-project B defines some tests in src/test (as per convention) Problem is that the tests in B extend the AbstractTests in A/src/test how could I define a dependency for the unit tests on the tests in A? At the moment, they do not compile... Any suggestion welcome... Many thanks Benoit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m1] Test in sub-project depending on tests in another sub-project...
Hi Arnaud, Merci pour la reponse. I was thinking about the 2 options you mentioned... Since then I think that I have found a solution, in the sub pojects I add the classes of other sub project as resources: So for sub-project B: **/*Test.java **/Abstract*.java ../sub-project-A/target/test-classes false **/*.class Seems to work for me... Best regards Benoit - Original Message From: Arnaud HERITIER <[EMAIL PROTECTED]> To: Maven Users List ; Benoit Xhenseval <[EMAIL PROTECTED]> Sent: Monday, September 4, 2006 12:39:01 PM Subject: Re: [m1] Test in sub-project depending on tests in another sub-project... I see two solutions (not really clean :-( ) : - In the sub-project-A you add your tests in the artifact (you copy the content of maven.test.dest in maven.build.dest or you set maven.test.dest = maven.build.dest). - You move your tests in another external project (sub-project-A-tests) but you have to execute them manually. I have no other idea. Arnaud On 9/4/06, Benoit Xhenseval <[EMAIL PROTECTED]> wrote: Hi *, I'm struggling on this one... with Maven 1.1-rcx sub-project A defines some tests in src/test (as per convention) sub-project B defines some tests in src/test (as per convention) Problem is that the tests in B extend the AbstractTests in A/src/test how could I define a dependency for the unit tests on the tests in A? At the moment, they do not compile... Any suggestion welcome... Many thanks Benoit
Re: [m1] Test in sub-project depending on tests in another sub-project...
I see two solutions (not really clean :-( ) : - In the sub-project-A you add your tests in the artifact (you copy the content of maven.test.dest in maven.build.dest or you set maven.test.dest = maven.build.dest). - You move your tests in another external project (sub-project-A-tests) but you have to execute them manually. I have no other idea. Arnaud On 9/4/06, Benoit Xhenseval <[EMAIL PROTECTED]> wrote: Hi *, I'm struggling on this one... with Maven 1.1-rcx sub-project A defines some tests in src/test (as per convention) sub-project B defines some tests in src/test (as per convention) Problem is that the tests in B extend the AbstractTests in A/src/test how could I define a dependency for the unit tests on the tests in A? At the moment, they do not compile... Any suggestion welcome... Many thanks Benoit