Skip to content

Commit

Permalink
shade the bytecode libraries instead of using maven assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarv committed Apr 11, 2018
1 parent 101e246 commit 1c424f3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 44 deletions.
2 changes: 1 addition & 1 deletion examples/falo.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ logConsole: true

format: {class}#{line}

javassist: true
javassist: false

targets: cg | thread- | entry | single- | dot,
ddg | single | dot,
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ xargs javac -cp target:lib/junit-4.12.jar -d target || exit 255
function run {
echo "Run $1 with $2"
java -cp target:lib/junit-4.12.jar \
-javaagent:../jdcallgraph/target/jdcallgraph-0.2-agent.jar=./$2 \
-javaagent:../jdcallgraph/target/jdcallgraph-0.2.jar=./$2 \
com/dkarv/testcases/$1/Main
if java -cp target com/dkarv/testcases/$1/Verification ; then
echo "Verification of >> $1 with $2 << succeeded" >&2
Expand Down
69 changes: 27 additions & 42 deletions jdcallgraph/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.7.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.21.0-GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -64,29 +62,41 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptors>
<descriptor>config/assembly.xml</descriptor>
</descriptors>
<archive>
<manifestEntries>
<Can-Redefine-Classes>true</Can-Redefine-Classes>
<Premain-Class>com.dkarv.jdcallgraph.Tracer</Premain-Class>
</manifestEntries>
</archive>
</configuration>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>net.bytebuddy</pattern>
<shadedPattern>com.dkarv.jdcallgraph.bytebuddy</shadedPattern>
</relocation>
<relocation>
<pattern>javassist</pattern>
<shadedPattern>com.dkarv.jdcallgraph.javassist</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Premain-Class>com.dkarv.jdcallgraph.Tracer</Premain-Class>
<Can-Retransform-Classes>true</Can-Retransform-Classes>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
Expand Down Expand Up @@ -148,31 +158,6 @@
</execution>
</executions>-->
</plugin>
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>net.bytebuddy</pattern>
<shadedPattern>com.dkarv.jdcallgraph.bytebuddy</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>-->
</plugins>
</build>
</project>

0 comments on commit 1c424f3

Please sign in to comment.