Skip to content

Commit

Permalink
Improved build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Aug 7, 2024
1 parent 2365853 commit 7b30b60
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 49 deletions.
19 changes: 19 additions & 0 deletions inst/java/classpath.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
r2pmml-1.0-SNAPSHOT.jar
gson-2.10.1.jar
guava-19.0-minified.jar
istack-commons-runtime-4.0.1.jar
jakarta.activation-2.0.1.jar
jakarta.xml.bind-api-3.0.1.jar
jaxb-core-3.0.2.jar
jaxb-runtime-3.0.2.jar
jcommander-1.72.jar
pmml-converter-1.5.7.jar
pmml-model-1.6.5.jar
pmml-model-metro-1.6.5.jar
pmml-rexp-1.5.6.jar
pmml-rexp-xgboost-1.5.6.jar
pmml-xgboost-1.8.6.jar
slf4j-api-1.7.36.jar
slf4j-jdk14-1.7.36.jar
ubjson-0.1.8.jar
ubjson-gson-0.1.8.jar
65 changes: 16 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<directory>${project.basedir}/inst/java</directory>
<includes>
<include>*.jar</include>
<include>classpath.txt</include>
</includes>
</fileset>
</filesets>
Expand Down Expand Up @@ -137,16 +138,6 @@
<outputDirectory>${project.basedir}/java</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-libraries</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeArtifactIds>guava</excludeArtifactIds>
<outputDirectory>${project.basedir}/inst/java</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -183,26 +174,28 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<groupId>org.jpmml</groupId>
<artifactId>packager-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
<goal>create-classpath</goal>
</goals>
<configuration>
<minify>
<artifacts>
<artifact>com.google.guava:guava</artifact>
</artifacts>
<entryPoints>
<entryPoint>com.r2pmml.Main</entryPoint>
</entryPoints>
<propertyEntryPoints>
<propertyEntryPoint>META-INF/r2pmml.properties</propertyEntryPoint>
</propertyEntryPoints>
</minify>
<outputDirectory>${project.basedir}/inst/java</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/target</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -255,32 +248,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jpmml</groupId>
<artifactId>minify-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>minify-guava</id>
<phase>package</phase>
<goals>
<goal>minify</goal>
</goals>
<configuration>
<artifacts>
<artifact>com.google.guava:guava</artifact>
</artifacts>
<entryPoints>
<entryPoint>com.r2pmml.Main</entryPoint>
</entryPoints>
<propertyEntryPoints>
<propertyEntryPoint>META-INF/r2pmml.properties</propertyEntryPoint>
</propertyEntryPoints>
<outputDir>${project.basedir}/inst/java</outputDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 7b30b60

Please sign in to comment.