Skip to content

Commit 3bdaaa2

Browse files
Ivan Senicpbouillet
Ivan Senic
authored andcommitted
INSPECTIT-2184: Updated agent and shared.all to java 1.6, added java … (inspectIT#159)
1 parent 1a4ce9c commit 3bdaaa2

File tree

11 files changed

+52
-46
lines changed

11 files changed

+52
-46
lines changed

dependencies.gradle

+8-4
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ configurations {
7070
xjc
7171
izpack
7272
jvms
73-
java15rt
73+
java16rt
7474
eclipseBase
7575
antContrib
76+
jarCheck
7677
}
7778
// all our configurations to transitive=false
7879
configurations.sharedAllProd.transitive = false
@@ -119,7 +120,7 @@ dependencies {
119120
'javax.validation:validation-api:1.1.0.Final',
120121
'javax.inject:com.springsource.javax.inject:1.0.0',
121122

122-
'com.google.guava:guava-jdk5:13.0',
123+
'com.google.guava:guava:18.0',
123124
'com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2',
124125
'org.codehaus.jackson:jackson-core-asl:1.9.13',
125126
'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
@@ -249,13 +250,16 @@ dependencies {
249250
'org.openjdk:openjdk-7-jre-linux-x64:1.7.0-u80-unofficial',
250251
'org.openjdk:openjdk-7-jre-macosx-x64:1.7.0-u80-unofficial'
251252
)
252-
java15rt (
253-
'com.sun:rt:1.5.0_22'
253+
java16rt (
254+
'com.sun:rt:1.6.0_45'
254255
)
255256
eclipseBase (
256257
'org.eclipse:eclipse-base:3.8.2'
257258
)
258259
antContrib (
259260
'ant-contrib:ant-contrib:1.0b3'
260261
)
262+
jarCheck (
263+
'jarcheck:jarcheck:1.5'
264+
)
261265
}

inspectit.agent.java/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<attribute name="FROM_GRADLE_MODEL" value="true"/>
2626
</attributes>
2727
</classpathentry>
28-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
28+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
2929
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
3030
<classpathentry kind="output" path="bin"/>
3131
</classpath>
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#Mon Jun 20 09:15:30 CEST 2011
21
eclipse.preferences.version=1
32
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
43
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
5-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
65
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
7-
org.eclipse.jdt.core.compiler.compliance=1.5
6+
org.eclipse.jdt.core.compiler.compliance=1.6
87
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
98
org.eclipse.jdt.core.compiler.debug.localVariable=generate
109
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
1110
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
1211
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
13-
org.eclipse.jdt.core.compiler.source=1.5
12+
org.eclipse.jdt.core.compiler.source=1.6
1413
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore

inspectit.agent.java/inspectit.agent.java.gradle

+26-20
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ evaluationDependsOn(':inspectit.shared.all')
88
defaultTasks 'releaseAndAnalyze'
99

1010
/** used by the eclipse buildship plugin */
11-
sourceCompatibility = '1.5'
12-
targetCompatibility = '1.5'
11+
sourceCompatibility = '1.6'
12+
targetCompatibility = '1.6'
1313

1414
/** defined to have it included in Eclipse as source */
1515
sourceSets {
@@ -23,7 +23,7 @@ sourceSets {
2323
/** Some agent specific properties */
2424
ext {
2525
distJarName = 'inspectit-agent'
26-
releaseNameSun15 = "inspectit-agent-sun1.5-${versionInfo}.zip"
26+
releaseName = "inspectit-agent-java6-${versionInfo}.zip"
2727
}
2828

2929
/** Setting compile configuration as plugin in Eclipse needs it */
@@ -43,17 +43,12 @@ dependencies {
4343
testCompile project (path: ':inspectit.shared.all', configuration: 'testArchives')
4444
}
4545

46-
/** Compile compatibility to 1.5 for all compile tasks */
46+
/** Compile compatibility to 1.6 for all compile tasks */
4747
tasks.withType(JavaCompile) { t ->
48-
// jmh can not run with java 1.5
49-
if (!(t.getName().contains('jmh') || t.getName().contains('Jmh'))) {
50-
sourceCompatibility = '1.5'
51-
targetCompatibility = '1.5'
48+
sourceCompatibility = '1.6'
49+
targetCompatibility = '1.6'
5250

53-
options.bootClasspath = configurations.java15rt.asPath
54-
// Used to suppress the warning that source value 1.5 will be obsolete in the future.
55-
options.compilerArgs << '-Xlint:-options'
56-
}
51+
options.bootClasspath = configurations.java16rt.asPath
5752
}
5853

5954

@@ -66,15 +61,26 @@ cobertura {
6661
* Creates the jar. Excludes libs from the configurations.agentJavaProd that are not Java5 compatible. Uses existing manifest.
6762
*/
6863
jar {
64+
// use jarCheck to make sure all classes in our dependencies are at maximum in version 1.6
65+
doFirst {
66+
def jarCheckOutput = new File("$buildRoot/jarCheck")
67+
jarCheckOutput.mkdirs()
68+
configurations.agentJavaProd.each { file ->
69+
def name = file.name
70+
javaexec {
71+
classpath configurations.jarCheck
72+
main = 'com.mindprod.jarcheck.JarCheck'
73+
args = ["$file", "1.0", "1.6"]
74+
standardOutput = new File(jarCheckOutput, "$name-check.log").newOutputStream()
75+
}
76+
}
77+
}
78+
6979
archivesBaseName = distJarName
70-
80+
7181
into('libs') {
7282
from project(':inspectit.shared.all').jar.outputs
7383
from configurations.agentJavaProd
74-
75-
// exclude due to the incompatibility with Java5
76-
exclude('validation-api*')
77-
exclude('hibernate-jpa-2.1-api*')
7884
}
7985

8086
manifest {
@@ -86,10 +92,10 @@ jar {
8692
* Creates the release package.
8793
*/
8894
task release (type: Zip, dependsOn: jar) {
89-
description = "Releases the ${releaseNameSun15} package."
95+
description = "Releases the ${releaseName} package."
9096
group = 'Release'
9197
destinationDir = file(buildReleasePackages)
92-
archiveName = releaseNameSun15
98+
archiveName = releaseName
9399
into('agent') {
94100
from jar.outputs
95101
from file(mainExtResources)
@@ -98,7 +104,7 @@ task release (type: Zip, dependsOn: jar) {
98104
}
99105

100106
task releaseAndAnalyze {
101-
description = "Runs all unit tests, all checks and releases the ${releaseNameSun15} package."
107+
description = "Runs all unit tests, all checks and releases the ${releaseName} package."
102108
group = 'Release'
103109
dependsOn(analyze, release)
104110
}

inspectit.shared.all/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<attribute name="FROM_GRADLE_MODEL" value="true"/>
1616
</attributes>
1717
</classpathentry>
18-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
18+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
1919
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
2020
<classpathentry kind="output" path="bin"/>
2121
</classpath>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
#Mon Jun 20 09:21:22 CEST 2011
21
eclipse.preferences.version=1
32
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
54
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6-
org.eclipse.jdt.core.compiler.compliance=1.5
5+
org.eclipse.jdt.core.compiler.compliance=1.6
76
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
87
org.eclipse.jdt.core.compiler.debug.localVariable=generate
98
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
109
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
1110
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12-
org.eclipse.jdt.core.compiler.source=1.5
11+
org.eclipse.jdt.core.compiler.source=1.6
1312
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore

inspectit.shared.all/inspectit.shared.all.gradle

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
defaultTasks 'releaseAndAnalyze'
88

99
/** used by the eclipse buildship plugin */
10-
sourceCompatibility = '1.5'
11-
targetCompatibility = '1.5'
10+
sourceCompatibility = '1.6'
11+
targetCompatibility = '1.6'
1212

1313
/** Artifact names */
1414
ext {
@@ -27,14 +27,12 @@ configurations {
2727
testArchives.extendsFrom (testCompile)
2828
}
2929

30-
/** Compile compatibility to 1.5 for all compile tasks */
30+
/** Compile compatibility to 1.6 for all compile tasks */
3131
tasks.withType(JavaCompile) {
32-
sourceCompatibility = '1.5'
33-
targetCompatibility = '1.5'
32+
sourceCompatibility = '1.6'
33+
targetCompatibility = '1.6'
3434

35-
options.bootClasspath = configurations.java15rt.asPath
36-
// Used to suppress the warning that source value 1.5 will be obsolete in the future.
37-
options.compilerArgs << '-Xlint:-options'
35+
options.bootClasspath = configurations.java16rt.asPath
3836
}
3937

4038
/**

inspectit.shared.all/src/main/resources/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Require-Bundle: com.esotericsoftware.minlog;bundle-version="1.2.0",
5555
de.javakaffee.kryo-serializers;bundle-version="0.23.0",
5656
com.esotericsoftware.kryonet;bundle-version="2.21.0",
5757
slf4j.api;bundle-version="1.7.21",
58-
com.google.guava.jdk5;bundle-version="13.0.0",
58+
com.google.guava;bundle-version="18.0.0",
5959
org.hamcrest.all;bundle-version="1.3.0",
6060
org.hibernate.javax.persistence.hibernate-jpa-2.1-api;bundle-version="1.0.0",
6161
javax.validation.api;bundle-version="1.1.0",

inspectit.shared.cs/src/main/resources/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Require-Bundle: rocks.inspectit.shared.all,
1515
slf4j.api;bundle-version="1.7.21",
1616
com.esotericsoftware.kryo;bundle-version="2.24.0",
1717
org.hamcrest.all;bundle-version="1.3.0",
18-
com.google.guava.jdk5;bundle-version="13.0.0",
18+
com.google.guava;bundle-version="18.0.0",
1919
com.github.stephenc.high-scale-lib;bundle-version="1.1.2",
2020
org.springframework.spring-aop;bundle-version="3.2.16",
2121
org.springframework.spring-beans;bundle-version="3.2.16",

inspectit.ui.rcp/src/main/resources/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Require-Bundle: org.eclipse.ui,
3838
ch.qos.logback.core;bundle-version="1.1.7",
3939
uk.org.lidalia.sysout-over-slf4j;bundle-version="1.0.2",
4040
com.esotericsoftware.kryo;bundle-version="2.24.0",
41-
com.google.guava.jdk5;bundle-version="13.0.0",
41+
com.google.guava;bundle-version="18.0.0",
4242
com.google.gson;bundle-version="2.3.1",
4343
org.springframework.spring-aop;bundle-version="3.2.16",
4444
org.springframework.spring-beans;bundle-version="3.2.16",

inspectit.ui.rcp/src/main/resources/inspectIT.product

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ END OF TERMS AND CONDITIONS
111111
<plugin id="com.esotericsoftware.reflectasm"/>
112112
<plugin id="com.github.stephenc.high-scale-lib"/>
113113
<plugin id="com.google.gson"/>
114-
<plugin id="com.google.guava.jdk5"/>
114+
<plugin id="com.google.guava"/>
115115
<plugin id="com.ibm.icu"/>
116116
<plugin id="com.springsource.javax.inject"/>
117117
<plugin id="com.springsource.org.aopalliance"/>

0 commit comments

Comments
 (0)