Announcement Announcement Module
Collapse
No announcement yet.
bat file for invoking beandoc ant task Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • bat file for invoking beandoc ant task

    In the bean doc documentation it says that "In order to run the <beandoc/> Ant task, all of the runtime dependencies must be available to Ant when the task is called. This means either wrapping the call to Ant in a batch or shell script that adds these JAR files onto the classpath, or copying the JAR files into $ANT_HOME/lib. The runtime dependencies are all copied to the target/dist directory when you build BeanDoc."

    I prefer the bat file approach, but would like to automatically generate the classpath with reference to a lib directory rather than type it in explicitly. If I were able to use ant syntax this would be trivial:
    Code:
    	<path id="classpath">
        	<fileset dir="$&#123;lib&#125;">
          	<include name="**/*.jar"/>
            <include name="**/*.zip"/>
        	</fileset>
      	</path>
    but figuring out how to do this in a bat file is beyond my very limited bat file savy. Is it possible to dynamically build a classpath with bat file syntax? If not, how do people in the forum handle this?

  • #2
    All libraries ANT depends on, I add to my project (so all other programmers will have the same libraries).

    Code:
      <path id="classpath.support">
            <fileset dir="lib-support">
                <include name="**/*.jar"/>
            </fileset>
        </path>
    So if ANT needs jars, I drop them in the lib-support library. I wouldn`t fiddle around with bat files, you can do it perfectly from ant. And if you need to import a taskdef, you can give the classpath.support to it.

    Comment

    Working...
    X