Frage

I'm using AppFuse and I wanna create a multi-module project. I tried to follow the AppFuse quick start guide so I used the below command to create the project:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-jsf-archetype -DarchetypeVersion=2.2.1 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse

Then I got "BUILD SUCCESS" Message but after running the below command (for running application):

Path/myproject/web ---> mvn jetty:run

I faced with this error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:46.317s
[INFO] Finished at: Mon Jun 10 11:33:50 PDT 2013
[INFO] Final Memory: 10M/95M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myproject-web: Could not resolve dependencies for project com.mycompany:myproject-web:war:1.0-SNAPSHOT: Could not find artifact com.mycompany:myproject-core:jar:1.0-SNAPSHOT in appfuse-snapshots (http://oss.sonatype.org/content/repositories/appfuse-snapshots) -> [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/DependencyResolutionException

Unfortunately I faced this error both in ubuntu 13.04 and win 8.

How should I resolve it?

War es hilfreich?

Lösung

As you said you are using modular appfuse application.

In appfuse modular application two module exists: core and web. Web module depends to core module.

So you should first install the core module. Try this code in your core module directory:

mvn install
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top