Jul 27th, 2010, 10:53 AM
"perform package" fails on simple JAR project with no persistence
I'm creating a simple project which will be just a JAR archive that will be shared by a few web applications. I merely did the project setup and created a few classes, no persistence setup needed. If I "perform clean" followed by "perform package" I get weaving errors in the Roo shell. Something like "can't determine annotations of missing type javax.persistence.Entity when weaving type org.mypackage.MyClass" and I get the same thing on all the classes in the project. None of them have any annotations on them.
If I "perform clean" followed by "perform command --mavenCommand compile" followed by "perform command --mavenCommand compile" followed by "perform package" only then does it successfully package my JAR. I intentionally have to perform the maven compile twice because the first compile gives me the same errors as if I just "perform clean" then "perform package." The second compile seems to successfully complete, after which I can successfully package.
Jul 28th, 2010, 05:56 AM
That is because Roo includes AspectJ into the project pom.xml. AspectJ is an integral part to almost all functionalities Roo offers. However, currenty AspectJ has a direct dependency for the JPA API so that API needs to be included in the Roo pom.xml as well. See more details here http://forum.springsource.org/showth...070#post293070.
Which Roo version are you using?
Jul 28th, 2010, 07:02 AM