pietrobraione / jbse

A symbolic Java virtual machine for program analysis, verification and test generation
http://pietrobraione.github.io/jbse/
GNU General Public License v3.0
102 stars 29 forks source link

Added generation of jar with runtime dependencies in Maven #9

Closed andreamattavelli closed 6 years ago

andreamattavelli commented 6 years ago

The uber jar (jbse-0.8.0-SNAPSHOT.jar) is placed in /target together with the original one (original-jbse-0.8.0-SNAPSHOT.jar). The uber jar renames javassist as jbse.javassist to avoid potential conflict during analysis.

The jar is built during package.

pietrobraione commented 6 years ago

Personally I don't like very much uber jars. Since the only external dependence is Javassist I don't see a compelling reason to create an uber jar.

andreamattavelli commented 6 years ago

Yes, there is just one external dependency. However, whoever wants to use JBSE has to compile and package it (Maven resolves the javassist dependency) and then retrieve javassist (again) to run the tool. With this patch, the manual resolution of the dependency is not necessary anymore. One can thus package JBSE and use it straight away. I agree that it is not extremely important, but it is in my opinion a valuable addition.

pietrobraione commented 6 years ago

OK, but I would prefer that jbse-<VERSION>.jar were the original jar, and that the uber jar had name jbse-uber-<VERSION>.jar. Is it possible?

andreamattavelli commented 6 years ago

I don't know if you can rename both jars, but I am confident that we can rename the uber jar. I'll take a look.

andreamattavelli commented 6 years ago

Using tag <finalName> it is possible to specify a custom name. For consistency with Maven I decided to use <finalName>${project.artifactId}-shaded-${project.version}</finalName>, instead of <finalName>${project.artifactId}-uber-${project.version}</finalName>, but it is a minor point. The original jar doesn't get renamed, as you wanted.

pietrobraione commented 6 years ago

Great, ack.