Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Separates optional modules by jdk versions #1824

Merged
merged 1 commit into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<dependency>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-profiler-optional</artifactId>
<scope>runtime</scope>
<type>pom</type>
</dependency>

<!-- plug-ins -->
Expand Down
5 changes: 3 additions & 2 deletions agent/src/assembly/distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>${basedir}/src/main/resources</directory>
Expand All @@ -23,7 +23,7 @@
<outputDirectory>script</outputDirectory>
</fileSet>
</fileSets>

<dependencySets>
<dependencySet>
<includes>
Expand All @@ -42,6 +42,7 @@
<exclude>com.navercorp.pinpoint:pinpoint-bootstrap-core</exclude>
<exclude>com.navercorp.pinpoint:pinpoint-bootstrap</exclude>
<exclude>com.navercorp.pinpoint:pinpoint-plugins</exclude>
<exclude>*:pom</exclude>
</excludes>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
Expand Down
1 change: 1 addition & 0 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>

</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<module>thrift</module>
<module>test</module>
<module>web</module>
<module>java8-test</module>
<module>hbase</module>
</modules>

Expand Down Expand Up @@ -144,6 +143,7 @@
<dependency>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-profiler-optional</artifactId>
<type>pom</type>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
33 changes: 8 additions & 25 deletions profiler-optional/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# pinpoint-profiler-optional

**pinpoint-profiler-optional** is an optional package for pinpoint-profiler, adding features that are implemented using APIs available in JDK 7 or later.
Modules under **pinpoint-profiler-optional** contain optional packages for pinpoint-profiler, containing features and codes that must be compiled against specific versions of JDK.

Additionally, these optional modules may contain vendor-specific stub classes compile against.
These classes are not included in in the final jar packaging, and the vendor-specific implementations that are compiled against these stubs must be loaded with vendor-supplied implementations.

## Requirements
In order to build pinpoint-profiler-optional, the following requirements must be met:
In order to build pinpoint-profiler-optional and it's child modules, the following requirements must be met:

* JDK 7+ installed
* JDK 7 installed
* `JAVA_7_HOME` environment variable set to JDK 7 home directory

Once the `JAVA_7_HOME` environment is set, the *maven-compiler-plugin* invokes the JDK 7 compiler to compile the optional package:

```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
<debug>${compiler-debug}</debug>
<optimize>true</optimize>
<fork>true</fork>
<verbose>true</verbose>
<compilerVersion>1.7</compilerVersion>
<executable>${JAVA_7_HOME}/bin/javac</executable>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
```
* JDK 8 installed
* `JAVA_8_HOME` environment variable set to JDK 8 home directory
37 changes: 11 additions & 26 deletions profiler-optional/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,21 @@

<artifactId>pinpoint-profiler-optional</artifactId>
<name>pinpoint-profiler-optional</name>
<packaging>pom</packaging>
<description>pinpoint profiler optional package</description>

<properties>
<jdk.version>1.7</jdk.version>
<jdk.home>${env.JAVA_7_HOME}</jdk.home>
</properties>


<modules>
<module>profiler-optional-jdk6</module>
<module>profiler-optional-jdk7</module>
<module>profiler-optional-jdk8</module>
<module>profiler-optional-parent</module>
</modules>

<dependencies>
<dependency>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-profiler</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-bootstrap</artifactId>
</exclusion>
<exclusion>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-rpc</artifactId>
</exclusion>
<exclusion>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-thrift</artifactId>
</exclusion>
</exclusions>
<artifactId>pinpoint-profiler-optional-jdk7</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.settings/
/*.iml
/.project
/target/
/.classpath
/.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RMRqrdbgbKFhbaVnDxHUdDQvrOQXxIBklnvcmahheubVC
mh2KM35CLkwUHS4DH7QVhxy52J5hnWbyEm6Cyd3KkF<mV
RmmnSVOqOMnOnMMrmMqwXomoroNrqPNRrPSsWwtUxXuUU
sRONqpnmqmUUnqonmstsmmmmmUUnqonmstsmmmmmUUGfk
RMRqrdbgbKFhbaVnDxHUdDQvrOQXxIBklnvcmahheubVC
mh2KM35CLkwUHS4DH7QVhxy52J5hnWbyEm6Cyd3KkF<mV
RmmnSVOqOMnOnMMrmMqwXomoroNrqPNRrPSsWwtUxXuUU
sRONqpnmqmUUnqonmstsmmmmmUUnqonmstsmmmmmUUGfk
mlfkqUUnmmmm
23 changes: 23 additions & 0 deletions profiler-optional/profiler-optional-jdk6/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-profiler-optional-parent</artifactId>
<relativePath>../profiler-optional-parent</relativePath>
<version>1.6.0-SNAPSHOT</version>
</parent>

<artifactId>pinpoint-profiler-optional-jdk6</artifactId>
<name>pinpoint-profiler-optional-jdk6</name>
<packaging>jar</packaging>
<description>pinpoint profiler optional package for jdk 6</description>

<properties>
<jdk.version>1.6</jdk.version>
<jdk.home>${env.JAVA_6_HOME}</jdk.home>
</properties>

</project>
5 changes: 5 additions & 0 deletions profiler-optional/profiler-optional-jdk7/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.settings/
/*.iml
/.project
/target/
/.classpath
5 changes: 5 additions & 0 deletions profiler-optional/profiler-optional-jdk7/clover.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RMRqrdbgbKFhbaVnDxHUdDQvrOQXxIBklnvcmahheubVC
mh2KM35CLkwUHS4DH7QVhxy52J5hnWbyEm6Cyd3KkF<mV
RmmnSVOqOMnOnMMrmMqwXomoroNrqPNRrPSsWwtUxXuUU
sRONqpnmqmUUnqonmstsmmmmmUUnqonmstsmmmmmUUGfk
mlfkqUUnmmmm
36 changes: 36 additions & 0 deletions profiler-optional/profiler-optional-jdk7/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.navercorp.pinpoint</groupId>
<artifactId>pinpoint-profiler-optional-parent</artifactId>
<relativePath>../profiler-optional-parent</relativePath>
<version>1.6.0-SNAPSHOT</version>
</parent>

<artifactId>pinpoint-profiler-optional-jdk7</artifactId>
<name>pinpoint-profiler-optional-jdk7</name>
<packaging>jar</packaging>
<description>pinpoint profiler optional package for jdk 7</description>

<properties>
<jdk.version>1.7</jdk.version>
<jdk.home>${env.JAVA_7_HOME}</jdk.home>
</properties>

<dependencies>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-debug-all</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public String toString() {
return "CpuLoadMetricSet for Java 1.7+";
}

}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2016 Naver Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package bug_regression_jdk7.javassist;

import bug_regression_jdk7.javassist.asm.BytecodeVerifyTestClassVisitor;
Expand Down Expand Up @@ -50,7 +66,7 @@ public void bug_regression_BytecodeVerifyError_Invalid_StackMapFrame() throws Ex
try {
Class.forName(INVALID_STACK_MAP_FRAME, true, classLoader);
Assert.fail("VerifyError");
} catch (java.lang.VerifyError e) {
} catch (VerifyError e) {
logger.debug("verifyError:{}", e.getMessage(), e);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2016 Naver Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package bug_regression_jdk7.javassist.asm;

import org.objectweb.asm.ClassVisitor;
Expand All @@ -6,8 +22,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.objectweb.asm.Opcodes.ACC_PUBLIC;

/**
* @author Woonduk Kang(emeroad)
*/
Expand All @@ -17,7 +31,7 @@ public class BytecodeVerifyTestClassVisitor extends ClassVisitor {
private String name;

public BytecodeVerifyTestClassVisitor(final ClassVisitor cv) {
super(org.objectweb.asm.Opcodes.ASM5, cv);
super(Opcodes.ASM5, cv);
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions profiler-optional/profiler-optional-jdk8/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.settings/
/*.iml
/.project
/target/
/.classpath
Loading