You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jan Matèrne <ap...@materne.de> on 2010/11/23 14:26:36 UTC

Building AntUnit

I tried to build AntUnit.
But the first problem is that you must have JUnit on the compile classpath.
This is not part of Ant and there is no target for downloading that.

So I thought about enhancing the common/ivy.xml for running ivy
- downloading the ivy.jar (I think "go-ivy" is the target name from the
tutorial :)
- retrieving the defined dependencies

WDYT?



Having manually added Junit 4.8.2 (-lib ...) I'll get

BUILD FAILED
C:\ant\svn-repository\antlibs\antunit\trunk\common\build.xml:351: The
following error occurred while executing this line:
C:\ant\svn-repository\antlibs\antunit\trunk\common\ivy.xml:59:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
change an object in a way which is incorrect with regard to namespaces.
        at
com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkNamespaceWF(Unk
nown Source)

The part is:

  <target name="make-ivy.xml" depends="ivy-init"
unless="project.has-ivy.xml?">
    <echo message="Creating ivy.xml ${target.ivy.xml}" level="verbose"/>
    <echoxml file="${target.ivy.xml}">
      <ivy-module version="2.0">
        <info organisation="${ivy.organization}"
              module="ant"
              revision="${artifact.version}"
              publication="${publication.datetime}">
          <license name="Apache Software License 2.0"
                   url="http://www.apache.org/licenses/LICENSE-2.0"/>
          <ivyauthor name="Apache Ant Development Team"
                     url="http://ant.apache.org/"/>
        </info>
>>>        <publications xmlns:e="urn:ant.apache.org:ivy-extras">

Happens with JDK 1.5 and 1.6.

Any ideas?


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


Re: Building AntUnit

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-11-23, Jan Matèrne wrote:

> I tried to build AntUnit.
> But the first problem is that you must have JUnit on the compile classpath.
> This is not part of Ant and there is no target for downloading that.

> So I thought about enhancing the common/ivy.xml for running ivy
> - downloading the ivy.jar (I think "go-ivy" is the target name from the
> tutorial :)
> - retrieving the defined dependencies

If you want to do that, I'd say go ahead.  It would be good if you could
avoid downloading Ant since I often want to build an Antlib against
Ant's core (maybe even with uncommitted changes) rather than any
downloadable version.

> Having manually added Junit 4.8.2 (-lib ...) I'll get

> BUILD FAILED
> C:\ant\svn-repository\antlibs\antunit\trunk\common\build.xml:351: The
> following error occurred while executing this line:
> C:\ant\svn-repository\antlibs\antunit\trunk\common\ivy.xml:59:
> org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
> change an object in a way which is incorrect with regard to namespaces.
>         at
> com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkNamespaceWF(Unk
> nown Source)

Works fine for me and Gump, but both of us make sure the real Xerces
(and the real Xalan) will be used rather than the Sun labeled versions.
That being said, I don't think I play any tricks on the OpenJDK
installations that I use on Linux.  May be an issue with the XML parser
in the Sun VM.

Stefan

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