For future reference:
The underlying reason is that the jar:jar plugin goal, which is run
during the package phase, will attach the resulting artifacts to the
current run, while just running jboss-as:deploy will not result in any
artifacts being attached.
I don't think there is a clean way to specify that jboss-as:deploy
depends on the artifacts being attached, unless you put it in a phase
which results in other weirdness. Another option would be to let
jboss-as:deploy attach the artifacts if they exist... yuck. Maybe a new
plugin which attaches artifacts if they exist and are not yet attached?
Carlo
On 03/21/2012 08:11 PM, Sande Gilda wrote:
Hi Scott,
I just ran into this same problem. The README instructions are wrong.
According to Pete, you need to run this as one command:
mvn clean package jboss-as:deploy
We will be updating the README file for that one and ejb-in-ear.
Thanks,
Sande
On 03/21/2012 10:20 AM, Scott Stark wrote:
> I can package up the quickstarts/kitchensink-ear contents, but when I run the
jboss-as:deploy step, it rechecks the build and now finds that the
org.jboss.as.quickstarts:jboss-as-kitchensink-ear-ejb:jar:7.1.1-SNAPSHOT is missing. What
is going on there?
>
> I'm using using the current
git://github.com/jbossas/quickstart.git head.
>
> [starksm@libra kitchensink-ear]$ mvn package
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EJB Module
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: WAR Module
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EAR Module
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR: EJB Module 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
jboss-as-kitchensink-ear-ejb ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
jboss-as-kitchensink-ear-ejb ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
jboss-as-kitchensink-ear-ejb ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
jboss-as-kitchensink-ear-ejb ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @
jboss-as-kitchensink-ear-ejb ---
> [INFO] Tests are skipped.
> [INFO]
> [INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ jboss-as-kitchensink-ear-ejb ---
> [INFO] Building EJB jboss-as-kitchensink-ear-ejb-7.1.1-SNAPSHOT with EJB version 3.1
> [INFO] Building jar:
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-ejb/target/jboss-as-kitchensink-ear-ejb-7.1.1-SNAPSHOT.jar
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR: WAR Module 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
jboss-as-kitchensink-ear-web ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/src/main/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
jboss-as-kitchensink-ear-web ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
jboss-as-kitchensink-ear-web ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
jboss-as-kitchensink-ear-web ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @
jboss-as-kitchensink-ear-web ---
> [INFO] No tests to run.
> [INFO] Surefire report directory:
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/target/surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ jboss-as-kitchensink-ear-web
---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [jboss-as-kitchensink-ear-web] in
[/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/target/jboss-as-kitchensink-ear-web-7.1.1-SNAPSHOT]
> [INFO] Processing war project
> [INFO] Copying webapp resources
[/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/src/main/webapp]
> [INFO] Webapp assembled in [37 msecs]
> [INFO] Building war:
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-web/target/jboss-as-kitchensink-ear-web-7.1.1-SNAPSHOT.war
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR: EAR Module 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-ear-plugin:2.6:generate-application-xml
(default-generate-application-xml) @ jboss-as-kitchensink-ear-ear ---
> [INFO] Generating application.xml
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
jboss-as-kitchensink-ear-ear ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-ear/src/main/resources
> [INFO]
> [INFO] --- maven-ear-plugin:2.6:ear (default-ear) @ jboss-as-kitchensink-ear-ear ---
> [INFO] Copying
artifact[war:org.jboss.as.quickstarts:jboss-as-kitchensink-ear-web:7.1.1-SNAPSHOT]
to[jboss-as-kitchensink-ear-web-7.1.1-SNAPSHOT.war]
> [INFO] Copying
artifact[ejb:org.jboss.as.quickstarts:jboss-as-kitchensink-ear-ejb:7.1.1-SNAPSHOT]
to[jboss-as-kitchensink-ear-ejb-7.1.1-SNAPSHOT.jar]
> [INFO] Copy ear sources to
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-ear/target/jboss-as-kitchensink-ear
> [INFO] Could not find manifest file:
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-ear/target/jboss-as-kitchensink-ear/META-INF/MANIFEST.MF
- Generating one
> [INFO] Building jar:
/home/starksm/quickstarts/kitchensink-ear/jboss-as-kitchensink-ear-ear/target/jboss-as-kitchensink-ear.ear
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR ............. SUCCESS [0.003s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EJB Module . SUCCESS [0.921s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: WAR Module . SUCCESS [0.793s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EAR Module . SUCCESS [0.241s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.212s
> [INFO] Finished at: Tue Mar 20 00:02:54 PDT 2012
> [INFO] Final Memory: 6M/15M
> [INFO] ------------------------------------------------------------------------
> [starksm@libra kitchensink-ear]$ mvn jboss-as:deploy
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EJB Module
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: WAR Module
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EAR Module
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- jboss-as-maven-plugin:7.1.0.Final:deploy (default-cli) @
jboss-as-kitchensink-ear ---
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR: EJB Module 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- jboss-as-maven-plugin:7.1.0.Final:deploy (default-cli) @
jboss-as-kitchensink-ear-ejb ---
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Kitchensink EAR: WAR Module 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR ............. SUCCESS [0.385s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EJB Module . SUCCESS [0.174s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: WAR Module . FAILURE [0.072s]
> [INFO] JBoss AS Quickstarts: Kitchensink EAR: EAR Module . SKIPPED
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.078s
> [INFO] Finished at: Tue Mar 20 00:03:01 PDT 2012
> [INFO] Final Memory: 6M/15M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project jboss-as-kitchensink-ear-web: Could not
resolve dependencies for project
org.jboss.as.quickstarts:jboss-as-kitchensink-ear-web:war:7.1.1-SNAPSHOT: Could not find
artifact org.jboss.as.quickstarts:jboss-as-kitchensink-ear-ejb:jar:7.1.1-SNAPSHOT ->
[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/DependencyResolutionExce...
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR] mvn<goals> -rf :jboss-as-kitchensink-ear-web
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev