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:
>>>>>>>>>>>>>>>>
  <profiles>
    <profile>
      <id>smokeTest</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <suiteXmlFiles>
                <suiteXmlFile>src/test/misc/smoke.testng.xml</suiteXmlFile>
              </suiteXmlFiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk__1_5</id>
      <activation>
        <jdk>1.5</jdk>
      </activation>
      <dependencies>
        ...........
      </dependencies>
    </profile>
    <profile>
      <id>broadsideTest</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <suiteXmlFiles>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
                <suiteXmlFile>......</suiteXmlFile>
              </suiteXmlFiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

<<<<<<<<<<<<<<<<


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

Reply via email to