[ 
http://jira.codehaus.org/browse/MCOMPILER-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Janes updated MCOMPILER-91:
---------------------------------

    Attachment: maven-compiler-plugin.patch

I have a similar need for test trees (separating strict unit tests from 
project-level integration tests).  The attached patch changes the existing 
compileSourceRoots and outputDirectory parameters from read-only to read-write, 
so that you can configure them on a per-execution basis, e.g.:

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>it</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <compileSourceRoots>
                <compileSourceRoot>src/it/java</compileSourceRoot>
              </compileSourceRoots>
              <outputDirectory>target/it-classes</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

You could probably apply a similar patch to CompilerMojo.java.

There are no new phases required, and maven-surefire-plugin can already be 
configured to use different source/class/output directories, which means this 
could also be applied to [integration 
tests|http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies]
 without modifying either plugin.

> source and output directories should be configurable
> ----------------------------------------------------
>
>                 Key: MCOMPILER-91
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-91
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: New Feature
>            Reporter: Paul Gier
>         Attachments: maven-compiler-plugin.patch
>
>
> I have a project with two test source trees.  These sources are kept separate 
> from each other because they need to be compiled and processed with different 
> parameters.
> Currently there is no way in maven to have two separate source trees for the 
> tests other than using a profile.
> It should be possible to configure the source and output directories in the 
> plugin so that each source tree can be compiled with different parameters.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to