2

I am trying to build this project https://github.com/goldmansachs/gs-collections . Built with: ant -buildfile build.xml

However I get the following error:

[javadoc] javadoc: error - Illegal package name: "/home/bionix/Desktop/gs-collections/collections-api/target/generated-sources/java/com/gs/collections/api/block/function/primitive/CharFunction.java.crc"
[javadoc] javadoc: error - Illegal package name: "/home/bionix/Desktop/gs-collections/collections-api/target/generated-sources/java/com/gs/collections/api/block/function/primitive/CharFunction0.java.crc

and then here is the result: [javadoc] 100 errors

javadoc-jar:

BUILD FAILED
/home/bionix/Desktop/gs-collections/build.xml:33: The following error occurred while executing this line:
/home/bionix/Desktop/gs-collections/common-build.xml:280: /home/elmaakoul/Desktop/gs-collections/collections-api/target/javadoc does not exist.

I don't know the source of the problem in here. Can someone help me. Thank you

This is the common-build.xml:

    <target name="javadoc" depends="-deploy-properties, -ivy-init">
    <ivy:cachepath pathid="runtime.classpath" conf="runtime" />

    <javadoc
        destdir="target/javadoc"
        author="true"
        version="true"
        use="true"
        useexternalfile="true"
        windowtitle="${javadoc.title} - ${build.version.full}">

        <sourcefiles>
            <resources refid="all-sources" />
        </sourcefiles>

        <classpath refid="runtime.classpath" />

        <doctitle>${javadoc.title} - ${build.version.full}</doctitle>
        <link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
    </javadoc>
</target>

<target name="javadoc-jar"
    depends="-deploy-properties, javadoc"
    description="Builds the javadoc jar for the application">
    <jar
        jarfile="${javadoc.jar.name}"
        compress="true"
        index="false"
        basedir="target/javadoc" />
</target>
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
Bionix1441
  • 2,135
  • 1
  • 30
  • 65
  • 1
    This looks like an error in the build script. The package should be `com.gs.collections.api.block.function.primitive`. Here, the path includes parts which are just related to the build architecture (and I think a package cannot include a dash (as in `gs-collections`)). – Chop Jun 02 '15 at 05:17
  • I have changed the folder name from `gs-collections` to `gscollections` but I still have the same issue – Bionix1441 Jun 02 '15 at 05:19
  • `/home/bionix/Desktop/gs-collections/collections-api/target/generated-sources/java/com/gs/collections/api/block/function/primitive/` is clearly not a Java package. It is a full filesystem path. The build script needs adapting or correcting. I would like to have a closer look into this but unfortunately I lack the time. I guess somebody will help. Good luck figuring it out. – Chop Jun 02 '15 at 05:27
  • This is not an issue, if you look the error message you can see that javadoc try to generate doc from crc file, in your build.xml just ask to only read java file. Hope it helps – Benfarhat Oct 13 '18 at 13:57

1 Answers1

2

If you take a look on their build you will see that they use maven.

They skip javadoc generation.

enter image description here

And it builds correctly.

Oleg Pavliv
  • 20,462
  • 7
  • 59
  • 75
  • One way to solve the problem is to skip it. Thank you As far as the build with ant I have even tried to remove the but still did not work, not sure if this issue should be reported – Bionix1441 Jun 02 '15 at 06:14