ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From THUFIR HAWAT <hawat.thu...@gmail.com>
Subject Re: import Tidy jar, path to jar
Date Tue, 24 May 2005 18:15:28 GMT
I can't pin down why I think this, but I believe there's a mismatch
between where the build file says to find Tidy.jar and its actual
location.  I made changes to the properties file per your comments,
and to build.xml, too.

[thufir@localhost java]$
[thufir@localhost java]$ ll lib/
total 184
-rw-rw-r--  1 thufir thufir 177868 Aug  1  2001 Tidy.jar
[thufir@localhost java]$
[thufir@localhost java]$ ant
Buildfile: build.xml

clean:
   [delete] Deleting directory /home/thufir/java/bin

prepare:
    [mkdir] Created dir: /home/thufir/java/bin

compile:
    [javac] Compiling 1 source file to /home/thufir/java/bin
    [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:9: package
org.w3c.tidy does not exist
    [javac] import org.w3c.tidy.Tidy;
    [javac]                     ^
    [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:38: cannot find
symbol
    [javac] symbol  : class Tidy
    [javac] location: class atreides.tidyXhtml.Test16
    [javac]             Tidy tidy = new Tidy();
    [javac]                 ^
    [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:38: cannot find
symbol
    [javac] symbol  : class Tidy
    [javac] location: class atreides.tidyXhtml.Test16
    [javac]             Tidy tidy = new Tidy();
    [javac]                                 ^
    [javac] 3 errors

BUILD FAILED
/home/thufir/java/build.xml:18: Compile failed; see the compiler error
output for
details.

Total time: 4 seconds
[thufir@localhost java]$ cat build.xml
<project name="XHTML" default="package">

        <import file="properties.tidy.xml" />

        <target name="clean">
                <delete dir="${outputDir}" />
        </target>

        <target name="prepare" depends="clean">
                <mkdir dir="${outputDir}" />
        </target>

        <target name="compile" depends="prepare">
                <javac
                        srcdir          = "${sourceDir}"
                        destdir         = "${outputDir}"
                        classpath       = "${tidy.classpath}"
                />
        </target>

        <target name="package" depends="compile">
                <jar jarfile="${outputDir}/${mainClass}.jar"
basedir="${outputDir}"
>
                        <manifest>
                                <attribute name="Main-Class"
value="${pkgPath}${mainClass}"/>
                        </manifest>
                </jar>
        </target>

</project>
[thufir@localhost java]$ cat properties.tidy.xml
<project name="properties">
        <property name="outputDir"      value="bin/" />
        <property name="sourceDir"      value="src/atreides/tidyXhtml/" />
        <property name="mainClass"      value="Test16" />
        <property name="pkgPath"        value="atreides.tidyXhtml." />
        <property name="user.name"      value="thufir" />
        <path id="tidy.classpath">
                <pathelement path="lib/Tidy.jar" />
        </path>
</project>
[thufir@localhost java]$



thanks,

Thufir

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


Mime
View raw message