We seem to have missed that use case after we changed from the
per-goal configuration model to the lifecycle bindings.

I think our medium term plan is to make the compiler configuration a
separate component referenced from that plugin, and then the test one
can have its own configuration, but defaults to the normal compile
configuration. I'll get it into JIRA as two separate items.

As a stopgap, I think the following will work as is even if a bit verbose:
<configuration>
  <skip>true</skip>
  <source>1.3</source>
  <target>1.3</target>
</configuration>
<executions>
  <execution>
    <configuration>
      <skip>false</skip>
      <source>1.5</source>
      <target>1.5</target>
    </configuration>
    <goals>
      <goal>test-compile</goal>
    </goals>
  </execution>
</executions>

what this does:
- configure the compiler plugin for 1.3, and skip the default test compile goal
- add an additional test compile goal with the new parameters and the
test compilation not skipped

Cheers,
Brett

On 11/15/05, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> I would like to compile my code as source and target for JDK 1.3.
>
> However, I use some JDK 1.5 stuff in my tests; I would like to
> configure my tests differently.
>
> Looking at the configuration mechanism, it appears that the
> granularity is at the plugin level.  I can't see how to configure one
> goal within a plugin differently than another.
>
> I've been looking over the docs, including
> http://maven.apache.org/plugins/maven-compiler-plugin/howto.html, and
> not seeing how to set things one way for compiler:compile, and another
> way for compiler:testCompile.
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to