ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morten S. Mortensen" <morten.morten...@tietoenator.com>
Subject RE: <record>-something fails when called from super-project!
Date Mon, 02 Feb 2004 09:05:11 GMT

...A temporary solution appears to be a conversion of -

    <record
      name="${analysis.javadoc.file}"
      action="start"
      emacsmode="true"
      append="false"
    />

- into the fragment -

<!--
  'record' fails when build-script is called from a super-script with 'ant' -
  to circumvent this, the value of the "name"-attribute used is expanded into
  an absolute file-name!
-->
    <pathconvert
      targetos="unix"
      property="analysis.javadoc.file.absolute"
    >
      <path>
        <pathelement location="${analysis.javadoc.file}"/>
      </path>
    </pathconvert>

    <record
      name="${analysis.javadoc.file.absolute}"
      action="start"
      emacsmode="true"
      append="false"
    />

- because this makes the file-name absolute.

Regards,
Morten Sabroe Mortensen


-----Original Message-----
From: Morten S. Mortensen 
Sent: 2. februar 2004 09:10
To: 'Ant Users List'
Subject: <record>-something fails when called from super-project!



Hi,

I notice, that a <record> like -

    <record
      name="${analysis.javadoc.file}"
      action="start"
      emacsmode="true"
      append="false"
    />

- tends to fail, when I the build-file with the <record> is not invoked directly, but
from a super-project using <ant>. In both type of calls, the actual value of "name"
used is "build/sub/J2SE/analysis/JavaDoc/public/javadoc-report.txt". Yes, the directory exists.

With "ant -debug", I see something like -

C:\......\doc.xml:476: Problems creating a recorder entry
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
tHelper.java:574)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:345)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
        at org.apache.tools.ant.Task.perform(Task.java:401)
        at org.apache.tools.ant.Target.execute(Target.java:338)
        at org.apache.tools.ant.Target.performTasks(Target.java:365)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1237)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
        at org.apache.tools.ant.Main.runBuild(Main.java:669)
        at org.apache.tools.ant.Main.startAnt(Main.java:220)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)

Could it be, that <record> fails to use "resolveFile()" - and the directory part of
"name" because of this appears to not exist, since it has a bad offset - or something?

Regards,
Morten Sabroe Mortensen


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message