[JBoss JIRA] (JDF-126) Unable to run forge script/commands when dependencies are missing
by Hardy Ferentschik (JIRA)
Hardy Ferentschik created JDF-126:
-------------------------------------
Summary: Unable to run forge script/commands when dependencies are missing
Key: JDF-126
URL: https://issues.jboss.org/browse/JDF-126
Project: JBoss Developer Framework
Issue Type: Feature Request
Components: ticket-monster
Environment: java version "1.6.0_35"
JBoss Forge, version [ 1.1.1.Final ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ]
Reporter: Hardy Ferentschik
Assignee: Marius Bogoevici
I cloned the ticket-monster repo - https://github.com/jboss-jdf/ticket-monster and tried to build the webapp using the instructions from:
* readme - https://github.com/jboss-jdf/ticket-monster/blob/master/demo/README.md
* tutorial - http://www.jboss.org/jdf/examples/ticket-monster/tutorial/AdminJSF/#_sett...
According to the instructions I should be able to launch
_forge_ and then run the forge script _admin_layer.fsh_. However, this does **not** work if I don't have all required maven dependencies already installed in my local repository. Depending which dependencies are missing a different error message appears.
One way to reproduce it is to delete some of the required dependencies, eg
{code}
> rm -rf ~/.m2/repository/org/jboss/errai
{code}
after that:
{code}
> forge
> run admin_layer.fsh
{code}
In this case I get:
{noformat}
***INFO*** Installation cancelled!
***ERROR*** Failed to install [faces]; there may be a mess!
Wrote /Users/hardy/work/hibernate/git/misc/ticket-monster/demo/pom.xml
***ERROR*** Exception encountered: The requested facet of type [org.jboss.forge.scaffold.faces.FacesScaffold] was not found. The facet is not installed. (type "set VERBOSE true" to enable stack traces)
{noformat}
The verbose stacktrace does not help much either. I've also seen that _forge_ seemingly tried to download dependencies from central, but fails (this was when I ran the script for the very first time).
To fix the error you need to run the maven build once from the command line to make sure that all dependencies get resolved. After that forge and the forge script will work.
At the very least the documentation should mention that a initial build is required to ensure all dependencies are available. Even better of course if forge would take care of this.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira