Hi, This is related to the other war discussion we had - AspectJ has no knowledge beyond understanding a jar. Similar to how javac has no understanding either.
Of course, this doesn't mean we can't add it. But the recommended approach at the moment is to use the other tools available to do pre-processing (unpacking) and post-processing (repacking) - tools like the ant jar task. How about producing output to some other jar and then using another ant task that runs after the compile to merge the contents back into the right place in your war file? I'm a bit surprised things behaved at all given that the input was a war file - I'd have expected the leading directories on the front of the package names to have given the weaver problems. cheers, Andy On 18 May 2012 09:50, Jean Andre <jean.an...@intact.net> wrote: > Hello, > > We have a problem and we tried to figure out if this problem can be solved > by iajc. We have WAR file which contains the source and the @aspectJ files. > We use the ANT command <iajc> inpath="my_original_War" -outJar="MyWar" - > classpath="The full list of jar" > > The weaven did not report any error, everything seems fine. BUT, when we > tried to run the WAR file inside the EAR, it fails. We compared the both > WAR and the WAR produced by the Weaver did not have the same structure as > the original WAR. > > The WAR has an additional folder starting from the root : > com\companyName\projectName\.... In fact, the weaver have put the src folder > at the root of the WAR file instead of keeping the classes inside > WEB-INF\classes. It it like having duplicated classes, with and without > veaven. > > For sure, it is not normal ? > Iis there a way to specify with IAJC the destination folder where to put > the weaven classes inside the WAR (I think, there are weaven classes ?) > > What are our alternatives ? > > Best regards and thank you for your quick feedback. > > JA. > > ============================================= > The exact command for the weaver > ============================================= > > <iajc inpath="Web_origine.war" > outjar="Web.war" > showWeaveInfo="false"> > <classpath> > <pathelement path = "ext/aspectjrt.jar"/> > <pathelement path = "ext/javax.faces.jar"/> > <pathelement path = > "ext/annotations-4.2.0.Final.jar"/> > <pathelement path = "ext/antlr-2.7.6.jar"/> > <pathelement path = "ext/cglib-nodep-2.2.2.jar"/> > <pathelement path = > "ext/cof-service-api-official.jar"/> > <pathelement path = > "ext/cof-service-web-official.jar"/> > <pathelement path = > "ext/common-api-core-official.jar"/> > <pathelement path = > "ext/common-api-dm-official.jar"/> > <pathelement path = > "ext/common-api-email-official.jar"/> > <pathelement path = > "ext/common-api-il-services-official.jar"/> > <pathelement path = > "ext/common-api-java-services-official.jar"/> > <pathelement path = > "ext/common-api-moneris-official.jar"/> > <pathelement path = > "ext/common-api-pega-services-official.jar"/> > <pathelement path = > "ext/common-api-web-official.jar"/> > <pathelement path = > "ext/common-api-web-struts-official.jar"/> > <pathelement path = > "ext/common-api-web-tags-official.jar"/> > <pathelement path = > "ext/common-api-wi-official.jar"/> > <pathelement path = "ext/commons-lang-2.4.jar"/> > <pathelement path = > "ext/commons-logging-1.1.1.jar"/> > <pathelement path = > "ext/commons-validator-1.4.0.jar"/> > <pathelement path = "ext/cssparser-0.9.6.jar"/> > <pathelement path = "ext/dom4j-1.6.1.jar"/> > <pathelement path = "ext/guava-11.0.1.jar"/> > <pathelement path = "ext/hibernate-3.3.2.jar"/> > <pathelement path = > "ext/hibernate-annotations-3.4.0.jar"/> > <pathelement path = > "ext/hibernate-commons-annotations-3.4.0.jar"/> > <pathelement path = > "ext/hibernate-entitymanager-3.4.0.jar"/> > <pathelement path = > "ext/hibernate-validator-4.2.0.Final.jar"/> > <pathelement path = "ext/junit-4.10.jar"/> > <pathelement path = "ext/log4j-1.2.16.jar"/> > <pathelement path = "ext/ojdbc14-10.2.0.4.jar"/> > <pathelement path = > "ext/org.springframework.asm-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.beans-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.context-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.core-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.expression-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.jdbc-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.orm-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.transaction-3.0.6.RELEASE.jar"/> > <pathelement path = > "ext/org.springframework.web-3.0.6.RELEASE.jar"/> > <pathelement path = "ext/pop-api-official.jar"/> > <pathelement path = > "ext/pop-services-official.jar"/> > <pathelement path = > "ext/richfaces-components-api-4.2.0.Final.jar"/> > <pathelement path = > "ext/richfaces-components-ui-4.2.0.Final.jar"/> > <pathelement path = > "ext/richfaces-core-api-4.2.0.Final.jar"/> > <pathelement path = > "ext/richfaces-core-impl-4.2.0.Final.jar"/> > <pathelement path = "ext/sac-1.3.jar"/> > <pathelement path = "ext/slf4j-api-1.6.4.jar"/> > <pathelement path = > "ext/slf4j-log4j12-1.6.4.jar"/> > <pathelement path = "ext/j2ee.jar"/> > <pathelement path = > "ext/commons-collections-3.2.1.jar"/> > <pathelement path = > "ext/org.springframework.aop-3.0.6.RELEASE.jar"/> > </classpath> > > </iajc> > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users