Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pick the right javac version depending on the jdk which runs maven
Browse files Browse the repository at this point in the history
jdk8 uses 1.8 as specification version and jdk9 is using 9. there could be
other ways to solve this - just picked one.
mkristian committed Jan 29, 2017
1 parent 93ee98a commit 8ed38e6
Showing 4 changed files with 43 additions and 6 deletions.
17 changes: 15 additions & 2 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -166,8 +166,8 @@
'compilerArgs' => { 'arg' => '-J-Xmx1G' },
'showWarnings' => 'true',
'showDeprecation' => 'true',
'source' => [ '${base.java.version}', '1.7' ],
'target' => [ '${base.javac.version}', '1.7' ],
'source' => '${base.java.version}',
'target' => '${base.javac.version}',
'useIncrementalCompilation' => 'false' ) do
execute_goals( 'compile',
:id => 'anno',
@@ -380,6 +380,19 @@

end

# TODO change to 1.9 when running with jdk9 as soon as core builds
# with jdk9
{ '52.0': '1.8', '53.0': '1.9' }.each do |class_version, java_version|
profile "#{class_version}" do
activation do
property name: 'java.class.version', value: class_version
end

properties( 'base.java.version': java_version,
'base.javac.version': java_version )
end
end

profile 'tzdata' do

activation do
28 changes: 26 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -534,9 +534,7 @@ DO NOT MODIFIY - GENERATED CODE
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>${base.java.version}</source>
<source>1.7</source>
<target>${base.javac.version}</target>
<target>1.7</target>
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>
@@ -1094,6 +1092,32 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
</profile>
<profile>
<id>52.0</id>
<activation>
<property>
<name>java.class.version</name>
<value>52.0</value>
</property>
</activation>
<properties>
<base.javac.version>1.8</base.javac.version>
<base.java.version>1.8</base.java.version>
</properties>
</profile>
<profile>
<id>53.0</id>
<activation>
<property>
<name>java.class.version</name>
<value>53.0</value>
</property>
</activation>
<properties>
<base.javac.version>1.9</base.javac.version>
<base.java.version>1.9</base.java.version>
</properties>
</profile>
<profile>
<id>tzdata</id>
<activation>
2 changes: 1 addition & 1 deletion lib/pom.rb
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ def initialize( name, version, default_spec = true )
# just depends on jruby-core so we are sure the jruby.jar is in place
jar "org.jruby:jruby-core:#{version}", :scope => 'test'

extension 'org.torquebox.mojo:mavengem-wagon:0.2.2-SNAPSHOT'
extension 'org.torquebox.mojo:mavengem-wagon:0.2.2'

repository :id => :mavengems, :url => 'mavengem:https://rubygems.org'

2 changes: 1 addition & 1 deletion lib/pom.xml
Original file line number Diff line number Diff line change
@@ -222,7 +222,7 @@ DO NOT MODIFIY - GENERATED CODE
<extension>
<groupId>org.torquebox.mojo</groupId>
<artifactId>mavengem-wagon</artifactId>
<version>0.2.2-SNAPSHOT</version>
<version>0.2.2</version>
</extension>
</extensions>
<resources>

0 comments on commit 8ed38e6

Please sign in to comment.