2

I'm trying to assemble a project using maven and the OpenImaj library, I been following the instructions on this page http://www.openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html but some of the process seems to be different from the one outline in the tutorial, I have tried this on two different computers (mac and pc) and received the following errors/steps, any idea of where/what I am doing wrong will be helpful.

  1. after running the mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml archetype:generate line I am prompt to "Choose a number or apply filter" where the default is 284.

  2. Once I select 284 (should I be selecting anything else?), I'm being prompt to select "maven-archetype-quickstart version" where I choose the latest 6:1.1, following by the groupId, artifactId, version, package, and Y confirmation, this result with 'Build Success' and create the directory as well as the pom.xml file on my computer.

  3. When I navigate to the project folder "cd projectName" and run the mvn assembly:assembly command, I first see that a few of the packages are being collected, then I see a "Build Failure" notification -"Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5.... No assembly descriptors found.

any idea what I am doing wrong and how I can get the OpenImaj lib integrated into a project, should I be downloading the SVN version and attempt to set the projects from local libraries.

Many thanks in advance!

3 Answers3

2

Just add this plugin to your pom.xml. This solved the problem for me:

<build>
  <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
        <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
        </configuration>
      </plugin>
  </plugins>

aashima
  • 1,203
  • 12
  • 31
0

Are you sure you're entering the maven command in step 1 correctly? You should only see three options (just confirmed this is working on both OSX, debian & ubuntu):

abe:~ jon$ mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml archetype:generate
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO] 
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://maven.openimaj.org/archetype-catalog.xml -> org.apache.maven.archetypes:maven-    archetype-quickstart (An archetype which contains a sample Maven project.)
2: http://maven.openimaj.org/archetype-catalog.xml -> org.openimaj:openimaj-quickstart-archetype (Maven quickstart archetype for OpenIMAJ)
3: http://maven.openimaj.org/archetype-catalog.xml -> org.openimaj:openimaj-subproject-archetype (Maven archetype for creating OpenIMAJ subprojects with the most of the standard configuration completed automatically)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains):     

You then need to pick the org.openimaj:openimaj-quickstart-archetype option from the list (probably #2).

Jon
  • 841
  • 4
  • 5
0

I had faced similar issues and finally worked it out. There are two things to note here. One is the network we are using and second is the maven tool we are using.

In your eclipse IDE go to window -> preferences.

Under maven tab go to installations sub-tab. Instead of using the embedded maven add filepath to maven installed on your system (The one command Line uses).

Under General Tab go to Network connections tab. Change the active provider.

Neither of the above will completly build the project successfully in one go. But each combination of network and maven will download some jars. Once you try two to three combinations you will have all the jars and the project will build successfully.

tacticurv
  • 498
  • 4
  • 18