5

I would like to define svnSetting globally in my build.xml ant script:

<project name="helloworld" basedir="." default="helloworld">
    <svnSetting
        javahl="false"
        svnkit="true"
        username="guest"
        password=""
        id="svn.settings"
    />
    ...
</project>

but eclipse says of course:

Problem: failed to create task or type svnSetting Cause: The name is undefined.

Is there any possibility I can define svnSetting directly under project and not within targets?

burnersk
  • 3,320
  • 4
  • 33
  • 56

1 Answers1

6

You should add typedef to your ant script:

<project name="helloworld" basedir="." default="helloworld">
    <path id="path.svnant">
        <pathelement location="${basedir}/svnant.jar"/>
        <pathelement location="${basedir}/svnClientAdapter.jar"/>
    </path>
    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
             classpathref="path.svnant"/>

You can read this article for more details.

Alex K
  • 22,315
  • 19
  • 108
  • 236
  • Args, I already have an typedef BUT I had it below svnSetting... moved svnSetting below typedef and all work now. Thanks! – burnersk Oct 27 '11 at 13:03