FAQ
Gentlemen

running javadoc ant task:

   <javadoc overview="${java.src.dir}/overview.html" packagenames="org.apache.zookeeper.*" destdir="${build.javadoc}" author="true" version="true" use="true" Public="yes" windowtitle="${Name} ${version} API" doctitle="${Name} ${version} API" bottom="Copyright &amp;copy; ${year} The Apache Software Foundation" > <fileset dir="${java.src.dir}"> <include name="org/apache/**/*Main.java"/> <include name="org/apache/zookeeper/AsyncCallback.java"/> <include name="org/apache/zookeeper/CreateMode.java"/> <include name="org/apache/zookeeper/KeeperException.java"/> <include name="org/apache/zookeeper/ServerAdminClient.java"/> <include name="org/apache/zookeeper/Watcher.java"/> <include name="org/apache/zookeeper/WatchedEvent.java"/> <include name="org/apache/zookeeper/ZooDefs.java"/> <include name="org/apache/zookeeper/ZooKeeper.java"/> <include name="org/apache/zookeeper/server/LogFormatter.java"/> <include name="org/apache/zookeeper/server/SnapshotFormatter.java"/> <include name="org/apache/zookeeper/server/PurgeTxnLog.java"/> <exclude name="org/apache/zookeeper/server/quorum/QuorumPacket"/> </fileset> <packageset dir="${src_generated.dir}"> <exclude name="org/apache/zookeeper/proto"/> <exclude name="org/apache/zookeeper/txn"/> <exclude name="org/apache/zookeeper/version"/> <exclude name="org/apache/zookeeper/server/**"/> </packageset> <link href="${javadoc.link.java}"/> <classpath> <fileset dir="${build.dir}/classes"> <include name="**/*.class"/> </fileset> <fileset dir="${basedir}"> <include name="${jar.name}"/> </fileset> <path refid="java.classpath"/> </classpath> </javadoc>
produces this error:
/ZOOKEE~1/build.xml:760: Javadoc failed: java.io.IOException: Cannotrun program "/Java/jdk1.8/bin/javadoc.exe": CreateProcess error=206, The filename or extension is too long at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442) at org.apache.tools.ant.taskdefs.Javadoc.execute(Javadoc.java:1785) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1248) at org.apache.tools.ant.Main.runBuild(Main.java:851) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 22 more
Total time: 12 seconds
what am I doing wrong ?
thanks,
Martin
______________________________________________

Search Discussions

  • Martin Gainty at Feb 20, 2016 at 11:50 pm
    fixed using the <exec tag
       <target name="javadoc" depends="jar" description="Generate javadoc"> <!-- <javadoc overview="${java.src.dir}/overview.html" packagenames="org.apache.zookeeper.*" destdir="${build.javadoc}" author="true" version="true" use="true" Public="yes" windowtitle="${Name} ${version} API" doctitle="${Name} ${version} API" bottom="Copyright &amp;copy; ${year} The Apache Software Foundation" > <fileset dir="${java.src.dir}"> <include name="org/apache/**/*Main.java"/> <include name="org/apache/zookeeper/AsyncCallback.java"/> <include name="org/apache/zookeeper/CreateMode.java"/> <include name="org/apache/zookeeper/KeeperException.java"/> <include name="org/apache/zookeeper/ServerAdminClient.java"/> <include name="org/apache/zookeeper/Watcher.java"/> <include name="org/apache/zookeeper/WatchedEvent.java"/> <include name="org/apache/zookeeper/ZooDefs.java"/> <include name="org/apache/zookeeper/ZooKeeper.java"/> <include name="org/apache/zookeeper/server/LogFormatter.java"/> <include name="org/apache/zookeeper/server/SnapshotFormatter.java"/> <include name="org/apache/zookeeper/server/PurgeTxnLog.java"/> <exclude name="org/apache/zookeeper/server/quorum/QuorumPacket"/> </fileset> <packageset dir="${src_generated.dir}"> <exclude name="org/apache/zookeeper/proto"/> <exclude name="org/apache/zookeeper/txn"/> <exclude name="org/apache/zookeeper/version"/> <exclude name="org/apache/zookeeper/server/**"/> </packageset> <link href="${javadoc.link.java}"/> <classpath> <fileset dir="C:/MAVEN-~1/ZOOKEE~1/build/classes"> <include name="**/*.class"/> </fileset> <fileset dir="${basedir}"> <include name="${jar.name}"/> </fileset> <path refid="java.classpath"/> </classpath> </javadoc> -->
           <exec executable="cmd.exe" failonerror="false"> <arg value="/c"/> <arg value="/Java/jdk1.8/bin/javadoc.exe -locale en_US -d /MAVEN-~1/ZOOKEE~1/src/java/java/generated -sourcepath /MAVEN-~1/ZOOKEE~1/src/java/main -subpackages org -encoding utf-8 -protected -overview /MAVEN-~1/ZOOKEE~1/src/src/java/main/overview.html -noindex -classpath /java/jdk18/lib/tools.jar;/MAVEN-~1/ZOOKEE~1/build/classes;/Users/mgainty/.m2/REPOSI~1/org/slf4j/slf4j/4/jar;/Users/mgainty/.m2/REPOSI~1/log4j/log4j/1.2.17/jar;/Users/mgainty/.m2/REPOSITORY/org/apache/commons/commonscli/2.0/jar;/Users/mgainty/.m2/REPOSI~1/jline/jline/2.11/jar;/Users/mgainty/.m2/REPOSI~1/org/jboss/netty/netty/3.2.10.Final/jar;/Users/mgainty/.m2/REPOSI~1/org/codehaus/jackson/JACKSO~1/1.9.5/jar;/Users/mgainty/.m2/REPOSI~1/org/codehaus/jackson/JACKSO~2/1.9.3/jar;/Users/mgainty/.m2/REPOSI~1/javax/servlet/JAVAX~1.SER/3.0.1/jar;/Users/mgainty/.m2/REPOSI~1/org/mortbay/jetty/server/6.1.23/jar;${build.classes}"/> </exec> </target>
    javadoc now works and produces html output in /MAVEN-~1/ZOOKEE~1/src/java/java/generated

    Thanks!
    Martin
    ______________________________________________


    From: mgainty@hotmail.com
    To: user@ant.apache.org
    Subject: javadoc failure
    Date: Fri, 19 Feb 2016 10:22:34 -0500

    Gentlemen

    running javadoc ant task:

    <javadoc overview="${java.src.dir}/overview.html" packagenames="org.apache.zookeeper.*" destdir="${build.javadoc}" author="true" version="true" use="true" Public="yes" windowtitle="${Name} ${version} API" doctitle="${Name} ${version} API" bottom="Copyright &amp;copy; ${year} The Apache Software Foundation" > <fileset dir="${java.src.dir}"> <include name="org/apache/**/*Main.java"/> <include name="org/apache/zookeeper/AsyncCallback.java"/> <include name="org/apache/zookeeper/CreateMode.java"/> <include name="org/apache/zookeeper/KeeperException.java"/> <include name="org/apache/zookeeper/ServerAdminClient.java"/> <include name="org/apache/zookeeper/Watcher.java"/> <include name="org/apache/zookeeper/WatchedEvent.java"/> <include name="org/apache/zookeeper/ZooDefs.java"/> <include name="org/apache/zookeeper/ZooKeeper.java"/> <include name="org/apache/zookeeper/server/LogFormatter.java"/> <include name="org/apache/zookeeper/server/SnapshotFormatter.java"/> <include name="org/apache/zookeeper/server/PurgeTxnLog.java"/> <exclude name="org/apache/zookeeper/server/quorum/QuorumPacket"/> </fileset> <packageset dir="${src_generated.dir}"> <exclude name="org/apache/zookeeper/proto"/> <exclude name="org/apache/zookeeper/txn"/> <exclude name="org/apache/zookeeper/version"/> <exclude name="org/apache/zookeeper/server/**"/> </packageset> <link href="${javadoc.link.java}"/> <classpath> <fileset dir="${build.dir}/classes"> <include name="**/*.class"/> </fileset> <fileset dir="${basedir}"> <include name="${jar.name}"/> </fileset> <path refid="java.classpath"/> </classpath> </javadoc>
    produces this error:
    /ZOOKEE~1/build.xml:760: Javadoc failed: java.io.IOException: Cannotrun program "/Java/jdk1.8/bin/javadoc.exe": CreateProcess error=206, The filename or extension is too long at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442) at org.apache.tools.ant.taskdefs.Javadoc.execute(Javadoc.java:1785) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1248) at org.apache.tools.ant.Main.runBuild(Main.java:851) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 22 more
    Total time: 12 seconds
    what am I doing wrong ?
    thanks,
    Martin
    ______________________________________________

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedFeb 19, '16 at 3:22p
activeFeb 20, '16 at 11:50p
posts2
users1
websiteant.apache.org

1 user in discussion

Martin Gainty: 2 posts

People

Translate

site design / logo © 2018 Grokbase