Re: Activate two profiles at default
Cannot be classifiers, as he needs different dependencies. May also want to use tool chains rather than hard coding Jdk paths On Monday, 23 July 2012, Ron Wheeler wrote: > It sounds like you have 2 artifacts at the end. > > One that is compiled and built with 1.5 and will run under 1.5 JVM and > probably under 1.6 JVM > One that is compiled and built with 1.6 and will not run under 1.5 JVM. > > It seems that these are 2 different artifacts and should have different > ArtifactIDs (or at least classifiers). > > Can you isolate the code that does not cause any problem and compiles > under both? > Make that a jar on its own and then make two projects with the VM > dependent code. > > At some point you will probably drop support for 1.5 and your 1.6 code > will start to look a lot different as you take advantage of the rest of the > features of 1.6. > > Alternatively you could just build and compile under 1.5 until you are > ready to drop support for 1.5 in the same way that you no longer support > 1.4. > > Ron > > On 23/07/2012 11:26 AM, Andreas Riedel wrote: > >> Hello users, >> >> I have the following problem: >>- One system must be compiled with two different JDK. >>- I have two test suites, one for smoke test, one for all. >> >> Base scenario: >>- Two profiles, 'SmokeTest' activate by default, 'All' activate by >> switch -P. >>- One additional profile with dependencies only required for build by >> JDK 1.5. At JDK 1.6 these dependencies are part of the JDK itself. >> >> In the POM this is realize as follow: >> >> >>smokeTest >> >> true >> >> >> >> >> org.apache.maven.**plugins >> maven-surefire-**plugin >> >> >> src/test/misc/**smoke.testng.xml> suiteXmlFile> >> >> >> >> >> >> >> >>jdk__1_5 >> >> 1.5 >> >> >> ... >> >> >> >>broadsideTest >> >> >> >> org.apache.maven.**plugins >> maven-surefire-**plugin >> >> >> .. >> .. >> .. >> .. >> .. >> .. >> .. >> .. >> >> >> >> >> >> >> >> >> >> >> >> What I need: >>- Default test to run should always be the smoketest. >>- Under JDK 1.5 the dependencies should be included, but the smoke >> test should also run. >> >> And this is the problem: >>- Under jdk 1.6 it works correct. >>- With JDK 1.5 the profile for JDK 1.5 is taken. I understand the >> logic, but for this scenario it is wrong. >> It should be taken the dependencies from JDK 1.5 profiles and >> additionally the smoketest should run. >>- This means, the default behaviour should be something like: >> >>> >> mvn help:active-profiles -P smokeTest >> The following profiles are active: >> - smokeTest (source: pom) >> - jdk__1_5 (source: pom) >> <<< >> >> Any idea what would be the best way to realize this? >> >> TIA >>Andraes >> >> --**--**- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> >> > > -- > Ron Wheeler > President > Artifact Software Inc > email: rwhee...@artifact-software.com > skype: ronaldmwheeler > phone: 866-970-2435, ext 102 > > > --**--**- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Activate two profiles at default
It sounds like you have 2 artifacts at the end. One that is compiled and built with 1.5 and will run under 1.5 JVM and probably under 1.6 JVM One that is compiled and built with 1.6 and will not run under 1.5 JVM. It seems that these are 2 different artifacts and should have different ArtifactIDs (or at least classifiers). Can you isolate the code that does not cause any problem and compiles under both? Make that a jar on its own and then make two projects with the VM dependent code. At some point you will probably drop support for 1.5 and your 1.6 code will start to look a lot different as you take advantage of the rest of the features of 1.6. Alternatively you could just build and compile under 1.5 until you are ready to drop support for 1.5 in the same way that you no longer support 1.4. Ron On 23/07/2012 11:26 AM, Andreas Riedel wrote: Hello users, I have the following problem: - One system must be compiled with two different JDK. - I have two test suites, one for smoke test, one for all. Base scenario: - Two profiles, 'SmokeTest' activate by default, 'All' activate by switch -P. - One additional profile with dependencies only required for build by JDK 1.5. At JDK 1.6 these dependencies are part of the JDK itself. In the POM this is realize as follow: smokeTest true org.apache.maven.plugins maven-surefire-plugin src/test/misc/smoke.testng.xml jdk__1_5 1.5 ... broadsideTest org.apache.maven.plugins maven-surefire-plugin .. .. .. .. .. .. .. .. What I need: - Default test to run should always be the smoketest. - Under JDK 1.5 the dependencies should be included, but the smoke test should also run. And this is the problem: - Under jdk 1.6 it works correct. - With JDK 1.5 the profile for JDK 1.5 is taken. I understand the logic, but for this scenario it is wrong. It should be taken the dependencies from JDK 1.5 profiles and additionally the smoketest should run. - This means, the default behaviour should be something like: >>> mvn help:active-profiles -P smokeTest The following profiles are active: - smokeTest (source: pom) - jdk__1_5 (source: pom) <<< Any idea what would be the best way to realize this? TIA Andraes - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Activate two profiles at default
> Any idea what would be the best way to realize this? Find a way to simplify things. You're doing too much stuff in one module. Break it into 2 and maybe more. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Activate two profiles at default
If those tests should always run, why have them in a profile?? On 23.07.2012 17:26, Andreas Riedel wrote: > Hello users, > > I have the following problem: >- One system must be compiled with two different JDK. >- I have two test suites, one for smoke test, one for all. > > Base scenario: >- Two profiles, 'SmokeTest' activate by default, 'All' activate by > switch -P. >- One additional profile with dependencies only required for build by > JDK 1.5. At JDK 1.6 these dependencies are part of the JDK itself. > > In the POM this is realize as follow: > > > >smokeTest > > true > > > > > org.apache.maven.plugins > maven-surefire-plugin > > > src/test/misc/smoke.testng.xml > > > > > > > >jdk__1_5 > > 1.5 > > > ... > > > >broadsideTest > > > > org.apache.maven.plugins > maven-surefire-plugin > > > .. > .. > .. > .. > .. > .. > .. > .. > > > > > > > > > > > > What I need: >- Default test to run should always be the smoketest. >- Under JDK 1.5 the dependencies should be included, but the smoke > test should also run. > > And this is the problem: >- Under jdk 1.6 it works correct. >- With JDK 1.5 the profile for JDK 1.5 is taken. I understand the > logic, but for this scenario it is wrong. > It should be taken the dependencies from JDK 1.5 profiles and > additionally the smoketest should run. >- This means, the default behaviour should be something like: > >>> > mvn help:active-profiles -P smokeTest > > The following profiles are active: > - smokeTest (source: pom) > - jdk__1_5 (source: pom) > <<< > > > > Any idea what would be the best way to realize this? > > TIA >Andraes > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Activate two profiles at default
Hello users, I have the following problem: - One system must be compiled with two different JDK. - I have two test suites, one for smoke test, one for all. Base scenario: - Two profiles, 'SmokeTest' activate by default, 'All' activate by switch -P. - One additional profile with dependencies only required for build by JDK 1.5. At JDK 1.6 these dependencies are part of the JDK itself. In the POM this is realize as follow: smokeTest true org.apache.maven.plugins maven-surefire-plugin src/test/misc/smoke.testng.xml jdk__1_5 1.5 ... broadsideTest org.apache.maven.plugins maven-surefire-plugin .. .. .. .. .. .. .. .. What I need: - Default test to run should always be the smoketest. - Under JDK 1.5 the dependencies should be included, but the smoke test should also run. And this is the problem: - Under jdk 1.6 it works correct. - With JDK 1.5 the profile for JDK 1.5 is taken. I understand the logic, but for this scenario it is wrong. It should be taken the dependencies from JDK 1.5 profiles and additionally the smoketest should run. - This means, the default behaviour should be something like: >>> mvn help:active-profiles -P smokeTest The following profiles are active: - smokeTest (source: pom) - jdk__1_5 (source: pom) <<< Any idea what would be the best way to realize this? TIA Andraes - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org