Skip to content

default build procedure does not work as expected #3

@hmenager

Description

@hmenager

If I clone the repo as is, and type as instructed "mvn clean package" I get:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building bubastis 1.1.1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ bubastis ---
[INFO] Deleting /home/hmenager/bubastis/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bubastis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/hmenager/bubastis/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ bubastis ---
[INFO] Compiling 10 source files to /home/hmenager/bubastis/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ bubastis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/hmenager/bubastis/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ bubastis ---
[INFO] Compiling 1 source file to /home/hmenager/bubastis/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ bubastis ---
[INFO] Surefire report directory: /home/hmenager/bubastis/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running uk.ac.ebi.efo.bubastis.DriverTest
test one url and one local file
Parsing failed.  Reason: Ontology 1 is neither a file nor a URL
test two local files
Parsing failed.  Reason: Ontology 1 is neither a file nor a URL
test two local files with differences
Parsing failed.  Reason: Ontology 1 is neither a file nor a URL
test one url and one local file
Parsing failed.  Reason: Ontology 1 is neither a file nor a URL
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.07 sec - in uk.ac.ebi.efo.bubastis.DriverTest

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ bubastis ---
[INFO] Packaging webapp
[INFO] Assembling webapp [bubastis] in [/home/hmenager/bubastis/target/bubastis]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/hmenager/bubastis/src/main/webapp]
[INFO] Webapp assembled in [72 msecs]
[INFO] Building war: /home/hmenager/bubastis/target/bubastis.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] --- maven-assembly-plugin:2.4:single (make-assembly) @ bubastis ---
[INFO] Building jar: /home/hmenager/bubastis/target/bubastis_1_2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.253 s
[INFO] Finished at: 2017-07-03T22:14:16+02:00
[INFO] Final Memory: 31M/271M
[INFO] ------------------------------------------------------------------------

Then trying to launch it:

$ java -jar target/bubastis_1_2.jar 
Error: Could not find or load main class uk.ac.ebi.efo.bubastis.Driver

If I however tweak pom.xml to change the packaging, like this:

diff --git a/pom.xml b/pom.xml
index 5adc2d0..b10f9b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     <groupId>uk.ac.ebi.fgpt</groupId>
     <artifactId>bubastis</artifactId>
     <version>1.1.1</version>
-    <packaging>war</packaging>
+    <packaging>jar</packaging>^M
 
     <name>bubastis</name>
     <url>http://www.ebi.ac.uk/efo/bubastis</url>

and then launch the same command line, the Driver class is indeed found in the jarfile (bubastis_1_2.jar, not bubastis.jar which isn't functional). I'm pretty sure this isn't the right way to get a functional bubastis jarfile, as I haven't dealt with java for a long long time, but there is probably a way to fix this.

cc @joncison, fixing this would improve a lot the edam release process!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions