I have a use case which I am trying to flesh out, but so far I can 
Only come up with "kludgy" solutions.   Perhaps someone else has a
better idea of how to accomplish this.

For a particular project I wish to build it differently based upon the
jdk version which is used.

Use Case:

Java14:   
  1)  Compile all source in default source folder and output to
targets/classes.  The source and target options should be set to "1.4".

Java15:
  1)  Compile all source in default source folder and output to
targets/classes.  The source and target options should be set to "1.4".
  2)  Compile all source in /java15 source folder and output to
targets/classes15.   The source and target options should be set to
"1.5".

>From my standpoint, two compilations need to take place.  The first
(java14) would take place in the standard fashion, as it always need to
happen.  The second (java15) would be housed with a jdk15 activated
profile.   Experimentation shows that by defining the compiler plugin
(snippet below) within a profile will not kick it off (if compilation
has already occurred.


Are there any ideas on how this might be achieved?


<build>
</build>
<profiles>
      <profile>
         <id>jdk15</id>
         <!-- this profile should be activated when jdk15 is being used
-->
         <activation>
            <jdk>1.5</jdk>
         </activation>
         <!-- describe what happens when this profile is executed -->
         <build>
            <plugins>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    
                </configuration>
             </plugin>             
      </plugins>
   </build>      
               
      </profile>
   </profiles>


Ruel Loehr
JBoss QA
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to