Ant cannot find a class needed by an externally defined taskdef

前端 未结 6 357
闹比i
闹比i 2020-12-31 06:00

I am trying to use the axis-java2wsdl ant task to create a wsdl from one of my java classes, but I cannot get the classpath correct.

I am using Ubuntu\'s libaxis-jav

6条回答
  •  礼貌的吻别
    2020-12-31 06:33

    In general, this works. But you need to check very carefully which classes are where.

    If your task class can be loaded in a classloader higher up in the classloader hierarchy (like CLASSPATH or ANT_HOME/lib) then your classpathref will simply get ignored.

    Read the FAQ entry for more details.

    Ant's class loader implementation uses Java's delegation model

    The ClassLoader class uses a delegation model to search for classes and resources. Each instance of ClassLoader has an associated parent class loader. When called upon to find a class or resource, a ClassLoader instance will delegate the search for the class or resource to its parent class loader before attempting to find the class or resource itself. The virtual machine's built-in class loader, called the bootstrap class loader, does not itself have a parent but may serve as the parent of a ClassLoader instance.

    Note: running ant -diagnostics can help too.

提交回复
热议问题