Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] IAJC outJar removes empty directories OR non classfiles from output.

Yes, I can certainly output to the directory tree and then reJar the file as the problem only occurrs when outjar is specified.
 
The only other work-around that I have found (i.e. Weave and have Jar output with
empty directory structure and all non class files) is to perform an additional
ant jar task, following the IAJC outjar task as follows:

<jar destfile="${build.dir}/tempWoven.jar"
     update="yes"
     filesonly="false" 
     duplicate="preserve">
     <fileset dir="${classes.dir}">
          <type type="dir"/>   
          <patternset refid="${component}.patternset"/>
     </fileset>
</jar>

Thanks
marc

From: aspectj-dev-bounces@xxxxxxxxxxx [mailto:aspectj-dev-bounces@xxxxxxxxxxx] On Behalf Of Dean Wampler
Sent: 13 September 2007 15:02
To: AspectJ developer discussions
Cc: Dean Wampler
Subject: Re: [aspectj-dev] IAJC outJar removes empty directories OR non classfiles from output.

I don't know if there is a bug when you read from a jar, but what works for me is to read from a directory tree.
My ant task is something like this:

<copy todir="class">  <!-- where the compiler put the .class files already...  -->
<fileset dir="src" includes="**/*.properties" />
<fileset dir="src" includes="**/*.xml" />
</copy>

<iajc
inpath="class"
outjar="woven.jar"
aspectpath="${aspectpath}" 
inpathDirCopyFilter="**/.svn/*,**/*.java,**/*.aj,**/*.class"
argfiles="${contract4j5.home}/ant/ajc.args.lst">
...

Hope that helps.
dean

On Sep 13, 2007, at 4:38 AM, Marc Ludwig wrote:

To all,

I am using ant IAJC task to weave an Aspect Library JAR file, with other project JAR file to produce a single WOVEN jar file.

Using the following ANT task this is successful, but the corresponding JAR no longer has directory entries.

Build Task:
<iajc classpathref="aop.jar.classpath"
      debug="true"
      compliance="-1.5"
      xlint="true"
      outjar="${build.dir}/tempWoven.jar">
      <injars>
        <pathelement path="${build.dir}/${jarfile}"/>
      </injars>
      <aspectpath>
        <pathelement path="${mlib.dir}/${admaspect.jar}"/>
        <pathelement path="${lib.dir}/${spring-aspects.jar}"/>
      </aspectpath>
</iajc>

The input Jar file has structure like:
base/package/structure/
base/package/structure/someObject.class

The input Jar file has structure like:
base/package/structure/someObject.class
base/package/structure/someObject$AjcClosure1.class

If I use the inpathDirCopyFilter, then the directory structure is retained, but all non class file elements fropm the input jar are not merged into the outjar.

I can not find any way to merge aspect library with JAR file, to produce a JAR output that retains the empty directories and non class files.

Many Thanks for any help!


***********************************************************************************

aquila

This email may contain privileged and confidential information and should not be used by anyone who is not
the original intended recipient(s). Any other distribution, use or reproduction without the sender's prior
consent is unauthorised and strictly prohibited.

If you have received this email in error, please notify the sender immediately by email and delete all copies of
the message from your system.

***********************************************************************************


 
_______________________________________________
aspectj-dev mailing list

Dean Wampler, Ph.D.
dean at objectmentor.com
See also:
http://aquarium.rubyforge.org     AOP for Ruby
http://www.contract4j.org         Design by Contract for Java5

I want my tombstone to say:
  Unknown Application Error in Dean Wampler.exe.
  Application Terminated.
      [Okay]        [Cancel]




Back to the top