Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] -outjar bug

> when calling
> 
>       ajc -injars test1.jar myAspect.java -outjar test2.jar
> 
> i have noticed that in aspectj1.1b4 test2.jar contains only the .class
> files of test1.jar. 

-outjar specifies a jar file for the results of the compilation,
not a final build product including the resources of the input jar(s).
However, if the .class files defined by myAspect.java are not included 
in the output test2.jar, that's a bug which should be submitted, 
preferably with a test case.

If you do want ajc to merge jars, consider submitting a feature 
request, specifying how ajc should handle the usual merge issues like
1) which resources to include or exclude
2) how to handle meta data
3) whether 1) and/or 2) can be specified on a per-jar basis
4) how to handle conflicts between resources in multiple input jars

In terms of whether it will be adopted, a well-considered feature 
request is second only to one with a patch.  One way to implement this
would be to extend the ant task with new options to support a 
post-compile merge, but that would leave out command-line users
(and might not handle the incremental case correctly).  For sample code 
along this line, see the assemble methods of the AntBuilder delegate of 
the BuildModule task in the AspectJ build module.

Wes

---- URLs
- Submitting a bug or feature request
http://dev.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
- Writing test cases
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/faq.html#q:harnesstestcases
- Getting and compiling the AspectJ source for a patch or sample code
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/faq.html#q:buildingsource

Mark wrote:
> 
> hi,
> 
> when calling
> 
>       ajc -injars test1.jar myAspect.java -outjar test2.jar
> 
> i have noticed that in aspectj1.1b4 test2.jar contains only the .class
> files of
> test1.jar. all other ressource files (like templates, property files
> etc pp) are *not* copied to test2.jar.
> 
> i find this rather disturbing since i
>   1. have to add a 2nd process step to my build script
>   2. need to write a build script
> in order to get all non class files back to test2.jar.
> 
> is there a reason for this behaviour?
> can we fix this for the 1.1 release? or do we have a workaround?
> 
> thanks,
> mark
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top