Issue Details (XML | Word | Printable)

Key: APF-793
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Marc Schipperheyn
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
AppFuse

appfuse:install fails: expects generated-sources

Created: 03/Jun/07 12:14 PM   Updated: 08/Oct/07 01:10 PM   Resolved: 08/Oct/07 01:10 PM
Component/s: Tools - AppGen
Affects Version/s: 2.0-M5
Fix Version/s: 2.0 Final

Environment: Modular Struts 2


 Description  « Hide
It seems the appfuse:install feature expects the generated soures to be there. In my case I have just used the defaults.

[INFO] [appfuse:install]
[INFO] [AppFuse] Installing generated files (pattern: **/*.java)...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] D:\Java\Projects\dates43-test\core\target\appfuse\generated-sources not f
ound.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
D:\Java\Projects\dates43-test\core\target\appfuse\generated-sources not found.
        at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(Abstra
ctFileSet.java:349)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:404)
        at org.appfuse.mojo.installer.InstallArtifactsMojo.copyGeneratedObjects(
InstallArtifactsMojo.java:195)
        at org.appfuse.mojo.installer.InstallArtifactsMojo.execute(InstallArtifa
ctsMojo.java:101)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:493)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:463)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Sort Order: Ascending order - Click to sort in descending order
Helge Tesgaard added a comment - 04/Jun/07 06:16 AM
After having called the command "mvn appfuse:full-source" on M5 the command "mvn appfuse:install -Dentity=<POJO>" stops working. The POJO video shows an example of generating actions, JSPs etc and ends with showing the command "mvn appfuse:full-source". This is not good becaus if people tries the command the nice generation mechanism breaks (at least on my computer).

Matt Raible added a comment - 04/Jun/07 09:26 AM
You have to run "appfuse:gen" before running "appfuse:install". Also, "appfuse:full-source" does not work on modular archetypes. I believe this is stated in the release notes - perhaps not prominently enough.

Marc Schipperheyn added a comment - 04/Jun/07 11:32 AM
Here's my sequence of commands:
mvn archetype:create blabla appfuse-modular-struts
changed to project dir
mvn integration-test
mvn install eclipse:eclipse
mvn -Declipse.workspace blabla
mvn appfuse:gen
changed to core dir
mvn appfuse:gen
mvn appfuse:install -Dentity=nl.msw.blabla.model.Person
ERROR
Of course, I did doublecheck that the file is actually in the right package.

Not sure why you would actually need the sources here. The error suggests that you need them. Anyway, hope this clarifies the issue reported

Matt Raible added a comment - 04/Jun/07 11:34 AM
Try this:

mvn -Declipse.workspace blabla
changed to core dir
mvn appfuse:gen -Dentity=Person
mvn appfuse:install -Dentity=Person

Marc Schipperheyn added a comment - 04/Jun/07 12:25 PM
Ok, this didn't work either, but I managed to partly get around it. Point is that I followed the video tutorial. When I went back to the documentation I noticed that another sequence of commands was called for mvn compile:hibernate3:hbm2ddl (database dialect not found)
When that generated an error I found another Jira issue where you suggested a documentation update so that you need to run mvn resources:testResources.
mvn compile:hibernate3:hbm2ddl again and that works. So far so good,

Tried appfuse:gen -Dentitu=Person again
Now it sais: no database.properties found, trying absolute path and no hibernate.properties file loaded. Build is succesful though
appfuse:install fails again with generated-sources not found

Have to run now, but the manual sais I need to move on to edit spring configuration file etc. The video suggests this stuff is taken care of automatically. If I follow the manual, I will probably get there. Seems the manual is behind on the video (more automation) and the sequence in the video doesn't entirely work on a modular Struts. My 2cts. I'll try some more when I have time again.


Matt Raible added a comment - 08/Oct/07 01:10 PM
This should be fixed (and contain better errors messages) in 2.0.