Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] RE: Error using iajc task

In this second case you have:
<pathelement location="$../{dir.Repo}/lib/aspectjtools.jar"/>

do you really mean '$../{dir.Repo}'

I just took your snippet, wrapped it in a <project/> and it ran OK, I
hardcoded the path to aspectjtools.jar.  Have you tried hard coding
that path - if that makes the problem go away it is clearly the
definition of that pathelement.  Have you tried running 'ant -verbose'
to get extra feedback?

Andy


2009/9/16 Leyzerzon, Simeon <simeon.leyzerzon@xxxxxxxx>:
> I moved taskdef to reside together with the task itself
>
>                  <taskdef
>                    resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
>                    <classpath>
>                      <pathelement location="$../{dir.Repo}/lib/aspectjtools.jar"/>
>                    </classpath>
>                  </taskdef>
>                <iajc sourceRoots="./src" destDir="${dir.build}">
>                        <classpath>
>                                <path refid="classpath.base"/>
>                                <path refid="classpath.aspect"/>
>                        </classpath>
>                </iajc>
>
> and now I'm getting a different variation of the error message:
>
> compile:
>     [echo] compiling source...
>  [taskdef] Could not load definitions from resource org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties. It could not be found.
>
> BUILD FAILED
> C:\IRIS\ver1.3\GlobalMarketAnalytics\GMA.xml:87: Problem: failed to create task or type iajc
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
>
> I checked the jar, and the properties and relevant class for the task seems to be defined there.
>
> Could someone please shed some light?
> Thank you,
> Simeon
>
> -----Original Message-----
> From: aspectj-dev-bounces@xxxxxxxxxxx [mailto:aspectj-dev-bounces@xxxxxxxxxxx] On Behalf Of Leyzerzon, Simeon [ICG-IT]
> Sent: Tuesday, September 15, 2009 2:12 PM
> To: 'aspectj-dev@xxxxxxxxxxx'
> Subject: [aspectj-dev] Error using iajc task
>
> I'm getting the following while executing the attached script:
>
> BUILD FAILED
> C:\IRIS\ver1.3\GlobalMarketAnalytics\GMA.xml:86: Problem: failed to create task or type iajc
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
>
> I have included aspectjtools.jar on the classpath.  This is under Java 1.5.  AspectJ 1.6 - just downloaded latest.
>
> I'm repeating my build file here:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="GMA" default="jar">
>
>          <taskdef
>            resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
>            <classpath>
>              <pathelement location="${dir.Repo}/lib/aspectjtools.jar"/>
>            </classpath>
>          </taskdef>
>
>        <property id="local properties" file="local.properties"/>
>        <property id="project properties" file="./${parent}/project.properties"/>
>        <echoproperties/>
>
>        <path id="classpath.base">
>                <fileset dir="./lib">
>                        <include name="**/*.jar"/>
>                </fileset>
>                <fileset dir="../${dir.Repo}/lib">
>                        <include name="**/*.jar"/>
>                </fileset>
>                <pathelement path="${weblogic.jar}"/>
>        </path>
>
>          <path id="classpath.test">
>            <pathelement location="../lib/${junit.jar}" />
>                <pathelement location="${dir.build}" />
>            <path refid="classpath.base" />
>          </path>
>
>        <path id="classpath.aspect">
>                <fileset dir="../${dir.Repo}/lib">
>                        <include name="**/aspectjrt.jar"/>
>                </fileset>
>        </path>
>
>        <target name="clean">
>                <delete dir="${dir.build}"/>
>                <delete file="${GMA}.jar"/>
>        </target>
>
>        <target name="init" depends="clean">
>                <tstamp/>
>                <mkdir dir="${dir.build}"/>
>        </target>
>
>
>        <target name="pre_compile" depends="init" description="copies resources and building dependencies">
>
>                <echo message="Building ${GMA}'s dependencies..."/>
>                                <ant antfile="${IrisAppLib}.xml" dir="../${IrisAppLib}"/>
>                                <copy todir="./lib">
>                                        <fileset dir="../${IrisAppLib}">
>                                                <include name="${IrisAppLib}.jar"/>
>                                        </fileset>
>                                </copy>
>                <echo message="${IrisAppLib}.jar was added to ${IrisApp}.war classpath."/>
>
>                <echo message="Copying ${GMA} resources to ${GMA}'s classpath..."/>
>
>                <copy todir="${dir.build}">
>                        <fileset dir="./src">
>                                <include name="**/*.properties"/>
>                        </fileset>
>                </copy>
>                <echo message="Copied property files to ${GMA}'s classpath..."/>
>
>                <copy todir="${dir.build}">
>                        <fileset dir="./src">
>                                <include name="**/*.xml"/>
>                        </fileset>
>                </copy>
>                <echo message="Copied XML files to ${GMA}'s classpath..."/>
>
>        </target>
>
>        <target name="compile" depends="pre_compile" description="Compile GMA component source code">
>                <echo message="compiling source..."/>
> <!--
>                <javac srcdir="./src" destdir="${dir.build}" includes="**/*.java" source="${compile.source}" debug="${compile.debug}" optimize="${compile.optimize}">
>                        <classpath>
>                                <path refid="classpath.base"/>
>                        </classpath>
>                </javac>
> -->
>                <iajc sourceRoots="./src" destDir="${dir.build}">
>                        <classpath>
>                                <path refid="classpath.base"/>
>                                <path refid="classpath.aspect"/>
>                        </classpath>
>                </iajc>
>                <echo message="compiling tests..."/>
>            <javac srcdir="${dir.test}" destdir="${dir.build}" includes="**/*.java" source="${compile.source}" debug="${compile.debug}" optimize="${compile.optimize}">
>              <classpath refid="classpath.test"/>
>            </javac>
>        </target>
>
>
>          <target name="test" depends="compile">
>                <echo message="performing JUnit testing..."/>
>            <junit>
>              <classpath refid="classpath.test" />
>
>              <formatter type="brief" usefile="false" />
>              <batchtest>
>                <fileset dir="${dir.build}" includes="${tests.includes}" excludes="${tests.excludes}"/>
>              </batchtest>
>            </junit>
>          </target>
>
>
>        <target name="jar" depends="compile">
>                <!--<jar destfile="./${GMA}_raw.jar">-->
>                <jar destfile="./${GMA}.jar">
>                        <fileset dir="${dir.build}"/>
>                        <manifest>
>                                <attribute name="Manifest-Version" value="1.0"/>
>                                <attribute name="Class-Path" value="."/>
>                                <attribute name="Built-By" value=""/>
>                                <!--<attribute name="Build-Date" value="${current.time}"/>-->
>                                <attribute name="Product-Name" value="${IrisAppLib}"/>
>                                <attribute name="Specification-Title" value="${IrisAppLib}"/>
>                                <attribute name="Specification-Vendor" value="Citi"/>
>                                <attribute name="Specification-Version" value="${app.build}"/>
>                                <attribute name="Implementation-Title" value="${IrisAppLib}"/>
>                                <attribute name="Implementation-Vendor" value=""/>
>                                <attribute name="Implementation-Version" value="${app.build}"/>
>                        </manifest>
>                </jar>
>
>                <!-- Keep a copy of the archive at workspace/classes repository -->
>                <copy todir="../${dir.build}">
>                        <fileset dir=".">
>                                <include name="${GMA}.jar"/>
>                        </fileset>
>                </copy>
>                <!--<delete file="${GMA}_raw.jar"/>-->
>        </target>
> </project>
>
> Appreciate any pointers.
>
> Simeon
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


Back to the top