Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Ant task

Hi Camila -

One way to debug Ant task problems is to first make the process
work using the command-line compiler ajc and then do the 
same thing in Ant.  

Here's the output when I try to write to a read-only outjar:

  error Unable to open outjar

And when I write to a jar in use:

  error Unable to open outjar [...]
  (The process cannot access the file because it is
   being used by another process)

Here's the output when I try to create an outjar for which 
the directory does not exist:

  build config error: unable to create outjar file

So I'd guess your script needs to create the dist directory:

   <mkdir dir="${dist}"/>

(The compiler could probably detect this condition and write
a better error message.)

Wes

> ------------Original Message------------
> From: Camila Rocha <camilar@xxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Tue, Sep-14-2004 12:11 PM
> Subject: Re: [aspectj-users] Ant task
>
> I don't know if I understood your question... We mean if another
> process is requiring access to a file inside tracker?
> Well, the aspects to be included into the boilerSystem component will
> access a tracker class. And these aspects are inside the tracker
> component either.
> 
> I hope you can understand now. :) 
> 
> 
> On Tue, 14 Sep 2004 19:20:23 +0100, Adrian Colyer
> <adrian_colyer@xxxxxxxxxx> wrote:
> > Could another process have an open file handle on tracker.jar?
> > 
> > -- Adrian
> > Adrian_Colyer@xxxxxxxxxx
> > 
> > Camila Rocha <camilar@xxxxxxxxx>
> > Sent by: aspectj-users-admin@xxxxxxxxxxx
> > 13/09/2004 00:40
> > Please respond to
> > aspectj-users@xxxxxxxxxxx
> > 
> > To
> > aspectj-users@xxxxxxxxxxx
> > cc
> > 
> > Subject
> > [aspectj-users] Ant task
> > 
> > 
> > 
> > 
> > Hello,
> > 
> > I'm trouble to create to build.xml file for my application...
> > I have a component named boilerSystem in the JAR format (just 
> .class).
> > I want to create a JAR file with my aspects (just the .class too), 
> and
> > then make the weaving between the too jars.
> > The aspects have imports to the boilerSystem classes.
> > The ant task I've created so far is:
> > <target name="compile_tracker" depends="init">
> >     <taskdef
> > resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
> >                  <classpath>
> >                                  <pathelement
> > location="${lib}/aspectjtools.jar"/>
> >                  </classpath>
> >     </taskdef>
> >    <iajc outjar="${dist}/tracker.jar"
> >                    sourceroots="tracker" <!-- that is the dir where 
> the
> > aspects are -->
> >                    Xnoweave="true" <!-- I don't want the weaving to 
> happen
> > now -->
> >                   >
> >                  <classpath>
> >                                  <pathelement
> > location="${lib}/boilerSystem.jar"/>
> >                                  <pathelement
> > location="${lib}/aspectjrt.jar"/>
> >                  </classpath>
> >   </iajc>
> > </target>
> > 
> > But the compiler says:
> >      [iajc] [error   0]: error build config error: unable to create 
> outjar
> > file:
> >  C:\Arquivos de 
> programas\eclipse\workspace\boilerSystem3\dist\tracker.jar
> > 
> > And that is it... Nothing else to help.
> > 
> > Tks,
> > Camila
> > 
> > --
> > Camila Rocha
> > www.ic.unicamp.br/~ra022247
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> > 
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> > 
> 
> 
> 
> -- 
> Camila Rocha
> www.ic.unicamp.br/~ra022247
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 




Back to the top