$ mvn -version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-33-generic", arch: "amd64", family: "unix"
$ mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml archetype:generate
....
<lots of downloads and then>
[INFO] Generating project in Interactive mode
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.987 s
[INFO] Finished at: 2017-09-01T08:58:09+09:00
[INFO] Final Memory: 18M/60M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: archetypeCatalog 'http://maven.openimaj.org/archetype-catalog.xml' is not supported anymore. Please read the plugin documentation for details. -> [Help 1][ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR][Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I am now stuck with the error message.
Is this a Maven problem or an OpenImagj bug?
Thanks,
R.
Last edit: spamrefuse 2017-09-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK; with that I got a few steps further in the process.
At the end of the "getting started" tutorial I create a "target/foobar-1.0-SNAPSHOT.jar". There is no "-jar-with-dependencies.jar":
$ cd learninglab
$ mvn assembly:assembly
[INFO] Scanning for projects...
[INFO][INFO] ------------------------------------------------------------------------
[INFO] Building learninglab 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO][INFO] >>> maven-assembly-plugin:2.4.1:assembly (default-cli) > package @ learninglab >>>
[INFO][INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ learninglab ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/me/learninglab/src/main/resources
[INFO][INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ learninglab ---
[INFO] Nothing to compile - all classes are up to date
[INFO][INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ learninglab ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/me/learninglab/src/test/resources
[INFO][INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ learninglab ---
[INFO] Nothing to compile - all classes are up to date
[INFO][INFO] --- maven-surefire-plugin:2.17:test (default-test) @ learninglab ---
[INFO] Surefire report directory: /home/me/learninglab/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.openimaj.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in org.openimaj.AppTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0[INFO][INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ learninglab ---
[INFO][INFO]<<< maven-assembly-plugin:2.4.1:assembly (default-cli) < package @ learninglab <<<[INFO][INFO] --- maven-assembly-plugin:2.4.1:assembly (default-cli) @ learninglab ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.404 s
[INFO] Finished at: 2017-09-01T21:57:38+09:00
[INFO] Final Memory: 13M/60M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:assembly (default-cli) on project learninglab: Error reading assemblies: No assembly descriptors found. -> [Help 1][ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR][Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
$ ls -1p target/
classes/
learninglab-1.0-SNAPSHOT.jar
maven-archiver/
maven-status/
surefire-reports/
test-classes/
Notice the [ERROR] sections above......and I'm stuck again....phew.
Eventually I want to use eclipse, so I moved on to the next paragraph and did the eclipse lines. I get it loaded in eclipse, but eclipse gives error indicators for the lines that import junit.......
I'm quite lost in what I am actually doing.....
R.
Last edit: spamrefuse 2017-09-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You almost certainly selected the wrong archetype from the list after running archetype:generate (probably one the maven-quickstart-archetype, rather than the openimaj-quickstart-archetype). Once you've created the project (using archetype:generate), you should be able to load into a recent eclipse without running mvn eclipse:eclipse by just using the option in eclipse to import an existing maven project (e.g. File->Import...->Maven/Existing Maven Project).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
This is on Ubuntu 17.04, x86_64.
I follow the guidelines from here:
http://openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html
as follows:
I am now stuck with the error message.
Is this a Maven problem or an OpenImagj bug?
Thanks,
R.
Last edit: spamrefuse 2017-09-01
A bit of both. Version 3 of the maven archetype plugin broke support for remote catalogs (see https://issues.apache.org/jira/browse/ARCHETYPE-519). This obviously impacts the tutorial. There is an issue to track this (basically the tutorial needs to be updated with one of the work-arounds) here: https://github.com/openimaj/openimaj/issues/134.
TLDR:
mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
should workOK; with that I got a few steps further in the process.
At the end of the "getting started" tutorial I create a "target/foobar-1.0-SNAPSHOT.jar". There is no "-jar-with-dependencies.jar":
Notice the [ERROR] sections above......and I'm stuck again....phew.
Eventually I want to use eclipse, so I moved on to the next paragraph and did the eclipse lines. I get it loaded in eclipse, but eclipse gives error indicators for the lines that import junit.......
I'm quite lost in what I am actually doing.....
R.
Last edit: spamrefuse 2017-09-01
You almost certainly selected the wrong archetype from the list after running archetype:generate (probably one the
maven-quickstart-archetype
, rather than theopenimaj-quickstart-archetype
). Once you've created the project (usingarchetype:generate
), you should be able to load into a recent eclipse without runningmvn eclipse:eclipse
by just using the option in eclipse to import an existing maven project (e.g. File->Import...->Maven/Existing Maven Project).Bingo! And thank you!!!
The "Hello World" window is now generated with Maven / Eclipse.
Time to get my hands dirty with other OpenImaj stuff...
R.