History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-1012
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Matt Raible
Reporter: Edouard Laroche-Joubert
Votes: 0
Watchers: 0
Operations

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

Extend appfuse maven plugin to allow sub-packages

Created: 01/Feb/08 06:34 AM   Updated: 05/May/08 05:55 AM
Component/s: Tools - AMP
Affects Version/s: 2.0.1
Fix Version/s: 2.1

File Attachments: 1. Text File APF-1012.patch (2 kb)
2. Text File APF-1012.patch (2 kb)
3. Java Source File AppFuseGeneratorMojo.java (14 kb)

Environment: all


 Description  « Hide
Using AMP with sub-packages is an essential thing. So I checked out AMP from svn repository and made a quick (and dirty ?) improvement to be aware of subpackages.
I didn't test it very much, just made the modification in AppFuseGeneratorMojo and tryied it in a "core" and "web" project and it worked.

It was a really small modification, I think it can be integrated easily (well the hard part is testing, isn't it ?).

The modified class is in attachment.




 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 01/Feb/08 11:13 AM
Thanks for the patch! Is it possible to attach a diff instead of the whole file? Use "svn diff > APF-1012.patch" to create it.

Edouard Laroche-Joubert - 01/Feb/08 04:11 PM
Yep sorry, actually I've found a bug in the "web" part module (because of the "if ... war ..." part I think). It's not a big thing, it generates two Action class (and jsp as well): one in the sub package, and an other one in the main package.
Maybe it indicates that it was generating the files twice.
I'll look at this, correct it and send the diff ;)

happy to help.

Edouard Laroche-Joubert - 04/Feb/08 01:43 AM
Still got the Action bug (two generations) but it's a start.

Edouard Laroche-Joubert - 04/Feb/08 09:40 AM
sorry the previous one was wrong.

Matt Raible - 03/May/08 10:30 AM
I don't see how this patch helps anything. Do you have to set additional configuration properties in your pom.xml for this to work?

Edouard Laroche-Joubert - 05/May/08 05:55 AM
Hi Matt,

well when you want your code to be generated you use: mvn appfuse:gen -Dentity=Person

that works fine, it generates it in org.appfuse.model.Person, org.appfuse.dao.PersonDao etc.... But what about having a package in between for example : org.appfuse.salary.model.Person, org.appfuse.dao.PersonDao, etc..
You have to refactor all the classes, check the xml files etc...

here you use: mvn appfuse:gen -Dentity=Person -DfullPath=org.appfuse.salary.model
(or something like that, I forgot a bit about, I did it the 4th of february sorry).

and it generates : org.appfuse.salary.model.Person, org.appfuse.salary.dao.PersonDao, etc.