Skip to content

Commit

Permalink
swtiched to maven shade plugin
Browse files Browse the repository at this point in the history
I was having problems with unpredictable class loading behavior when building the project using maven command line.  Switching from the maven-assembly-plugin to maven-shade-plugin (like in minerva-cli) seems to have resolved the issue.
  • Loading branch information
goodb committed Aug 26, 2019
1 parent f4938dc commit c032886
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
target/
/.DS_Store
*.DS_Store
.project
.settings
.classpath
minerva-server/blazegraph.jnl
/bin/
*.icloud
minerva-server/.DS_Store
minerva-cli/bin/reactome-entities-blazegraph.jnl
11 changes: 11 additions & 0 deletions .gitignore~
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
target/
/.DS_Store
.project
.settings
.classpath
minerva-server/blazegraph.jnl
/bin/
*.icloud
minerva-server/.DS_Store
minerva-cli/bin/reactome-entities-blazegraph.jnl
minerva-core/.DS_Store
47 changes: 40 additions & 7 deletions minerva-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</excludes>
</configuration>
</plugin>
<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
Expand Down Expand Up @@ -50,16 +50,49 @@
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<outputFile>bin/minerva-server.jar</outputFile>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>org.geneontology.minerva.server.StartUpTool</Main-Class>
<git-revision-sha1>${git.commit.id}</git-revision-sha1>
<git-revision-url>https://github.com/geneontology/minerva/commit/${git.commit.id}</git-revision-url>
<git-branch>${git.branch}</git-branch>
<git-dirty>${git.dirty}</git-dirty>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.9</version>
</dependency>
<dependency>
<groupId>org.geneontology</groupId>
<artifactId>minerva-core</artifactId>
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<owltools.version>0.3.0-SNAPSHOT</owltools.version>
<owlapi.version>4.2.8</owlapi.version>
<!-- <owlapi.version>4.2.8</owlapi.version>-->
<owlapi.version>4.5.7</owlapi.version>
</properties>

<build>
Expand Down Expand Up @@ -240,7 +241,8 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
<!-- <version>4.2.5</version>-->
<version>4.5.9</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
Expand Down

0 comments on commit c032886

Please sign in to comment.