Add jdk6Test task #200

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

rwinch commented Dec 10, 2012

Note about the commit

If someone does not have jdk6Home configured the tests will be skipped. This may not be ideal, but I felt it was better than requiring local developers configure the property. If this is not the case, let me know and I can make jdk6Home a required property so that we can always run the jdk6Test task.

/cc @cbeams @jhoeller @philwebb

Commit Message

Previously the build was unable to build against JDK 7, test against
JDK 7, and test against JDK 6.

This commit allows setting of a gradle property [1] named jdk6Home.
Upon setting the jdk6Home property tests will be ran against JDK 6 as
well. One option for setting the property is to include jdk6Home
property in ~/.gradle/gradle.properties. For example the content of
the file might look like:

jdk6Home=jdk6Home=/usr/lib/jvm/jdk1.6.0_32

An alternative is configure jdk6Home from the commandline as shown below:

gradle build -Pjdk6Home=/usr/lib/jvm/jdk1.6.0_32

[1] http://gradle.org/docs/current/userguide/tutorial_this_and_that.html#sec:gradle_properties_and_system_properties

@rwinch rwinch Add jdk6Test task
Previously the build was unable to build against JDK 7, test against
JDK 7, and test against JDK 6.

This commit allows setting of a gradle property [1] named jdk6Home.
Upon setting the jdk6Home property tests will be ran against JDK 6 as
well. One option for setting the property is to include jdk6Home
property in ~/.gradle/gradle.properties. For example the content of
the file might look like:

    jdk6Home=jdk6Home=/usr/lib/jvm/jdk1.6.0_32

An alternative is configure jdk6Home from the commandline as shown below:

    gradle build -Pjdk6Home=/usr/lib/jvm/jdk1.6.0_32

[1] http://gradle.org/docs/current/userguide/tutorial_this_and_that.html#sec:gradle_properties_and_system_properties
e4ffd2b
Member

rwinch commented Dec 10, 2012

Another note is that I did not create a jdk5Test task due to the fact that it required more complicated changes due to classpath differences (i.e. it won't work with the servlet 3 jars which are JDK 6, requires some additional XML jars, etc) and @jhoeller had mentioned testing against JDK 5 wasn't necessary. We can always do this later, but I thought I would get this lower hanging fruit in before GA

Owner

philwebb commented Dec 10, 2012

When you say "If someone does not have jdk6Home configured the tests will be skipped" do you mean all tests or will tests on JDK 7 still run?

Member

rwinch commented Dec 10, 2012

Good question..Sorry I was a bit vague. The tests executed with JDK6 (i.e jdk6Test task) will be skipped if jdk6Home is not defined. Running the tests with JDK 7 are not impacted by this commit.

philwebb was assigned Dec 11, 2012

Member

snicoll commented Apr 18, 2014

@rwinch is this PR still applicable?

Member

rwinch commented Apr 18, 2014

Thanks for asking. I'm closing this as it no longer applicable.

rwinch closed this Apr 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment