You can do that in maven on a plugin basis.

http://maven.apache.org/general.html

  ...
  <build>
  ...
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  ...
  </build>


- Bob
____________________________________________________________
STSM • IBM • US East Commerce Solutions • 720-395-2897  • Tie - 676-2897 •
http://blog.balfes.net





From:   John Hjelmstad <[email protected]>
To:     [email protected],
Cc:     Ryan J Baxter/Westford/IBM@Lotus
Date:   03/24/2011 01:50 PM
Subject:        Re: Java 5/6 compatible builds



That's my general understanding from Paul. It allows us (though I don't
quite understand all the Maven juju) to write code and include dependencies
against 1.6, while falling back to 1.5 if needed.

One motivating use case for this in the immediate term is my and Michael's
reintroduction of Closure Compiler into the JS serving pipeline. It is
written against 1.6. My hope w/ these changes is to allow 1.6 users to get
the full Closure treatment, while falling back to a default (ie. using the
build-time JS YUICompressor).

@Paul, does this sound right? If so, can you give a brief primer on how
this
stuff works and what's required of both implementors and users?

--j

On Thu, Mar 24, 2011 at 10:25 AM, Ryan J Baxter <[email protected]>
wrote:

> Paul, I am not so familiar with Maven so excuse me if the answer to this
> questions is obvious....
>
> Are these changes to allow us to choose whether we want to build against
> Java 5 or 6?
>
> -Ryan
>
> Email: [email protected]
> Phone: 978-899-3041
> developerWorks Profile
>
>
>
> From:   Paul Lindner <[email protected]>
> To:     [email protected],
> Date:   03/24/2011 01:19 PM
> Subject:        Java 5/6 compatible builds
>
>
>
> Please see
>
> http://codereview.appspot.com/4276074/
>
> This is another reason I want to push out a 3.0.0 beta since this would
> entail adjusting the release process to accomodate compatibility
artifacts
> classified as 'java5' and moving the baseline to java6.
>
>
> --
> Paul Lindner -- [email protected] -- linkedin.com/in/plindner
>
>
>
>

Reply via email to