Community
Participate
Working Groups
Currently during a binary weave only .class files are wriiten to the -outjar. Unfortunately most non-trival Java programs also comprise properties files, messages, XML, images etc. These are not copied and programs are most likely to fail without them. This problem has been raised on the aspectj-users mailing list: "http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg00101.html"
Reassigning it to myself since we can solve it at the same time as we implement copying resources from source path to the output path.
Created attachment 5585 [details] Copy non-Java resources from "-injars" to "-outjar"
As a first pass we should avoid copying over anything in the META-INF directory (issue a warning that we didn't if it existed) and issue errors if clashing resources existed in multiple JARs.
Fixed for 1.1.1
updated target milestone field to 1.1.1
*** Bug 43454 has been marked as a duplicate of this bug. ***
*** Bug 43467 has been marked as a duplicate of this bug. ***
The bug is marked as fixed in AspectJ1.1.1 but I can not get it to work. Can anyone else get it to work ? More about my setup: The 3rdparty.jar file contains a property file in the root and a etc root directory containing more non-java files. NONE OF these are copied to my output (which is the problem). Maybe it is because I am using the ajc task like this: <iajc injars="3rdparty.jar" outjar="${build}/out.jar" sourceRootCopyFilter="**/CVS/*"> <srcDir path="${src}"/> ... </iajc> OR like this (which does not work either): <iajc injars="3rdparty.jar" destDir="${build}/classes"> <srcDir path="${src}"/> ... </iajc> I also tried some combination of the above, but nothing works. I.e. ajc still forget to copy the non-java stuff (only the processed *.class files are copied to output). Is there still a bug or am I doing something wrong ?
Ok, found out that one more option copyInJars was needed (apparently is is false by default). It works when set to true! Can someone set the bug back to resolved - apparently I am not allowed to do so.
Setting to "resolved" as requested by the re-opener.
I am running into similar problems. I am using aspectj compiler 1.1.1 and eclipse 3.0m4. The ant target is: <target name="weave-struts" > <iajc fork="true" injars="${struts.jar}" outjar="${weaved-struts.jar}"> <sourceroots> <pathelement location="${aspect.dir}"/> </sourceroots> <classpath refid="compile.classpath"/> </iajc> </target> Here is the output: [iajc] manifest not copied: 'META-INF/tlds/struts-html.tld' in JAR 'C:\eclipse-3.0m4-workspace\Tasag\WEB-INF\src\struts-lib\struts.jar' [iajc] manifest not copied: 'META-INF/tlds/struts-logic.tld' in JAR 'C:\eclipse-3.0m4-workspace\Tasag\WEB-INF\src\struts-lib\struts.jar' [iajc] manifest not copied: 'META-INF/tlds/struts-nested.tld' in JAR 'C:\eclipse-3.0m4-workspace\Tasag\WEB-INF\src\struts-lib\struts.jar' [iajc] manifest not copied: 'META-INF/tlds/struts-template.tld' in JAR 'C:\eclipse-3.0m4-workspace\Tasag\WEB-INF\src\struts-lib\struts.jar' [iajc] manifest not copied: 'META-INF/tlds/struts-tiles.tld' in JAR 'C:\eclipse-3.0m4-workspace\Tasag\WEB-INF\src\struts-lib\struts.jar' I tried setting attribute copyinjars="true" but got the following output: "copyInjars not required since 1.1.1".
Please see bug#44190 whose fix should be included in the next version of AJDT.