[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759786#action_12759786
 ] 

Thomas Dudziak commented on ZOOKEEPER-537:
------------------------------------------

Fixing is easy, just add exludes in the Ant build:

    <target name="compile-extra" depends="compile-main" if="extra.src.dir">
        ...
        <copy todir="${build.classes}">
            <fileset dir="${extra.src.dir}">
              <exclude name="**/*.java"/>
            </fileset>
        </copy>
   </target>

    <target name="compile-main" depends="build-generated">
        ...
        <copy todir="${build.classes}">
            <fileset dir="${java.src.dir}">
              <exclude name="**/*.java"/>
            </fileset>
            <fileset dir="${src_generated.dir}">
              <exclude name="**/*.java"/>
            </fileset>
        </copy>
    </target>


> The zookeeper jar includes the java source files
> ------------------------------------------------
>
>                 Key: ZOOKEEPER-537
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-537
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>            Reporter: Thomas Dudziak
>             Fix For: 3.2.1
>
>
> This is a problem if you use zookeeper as a dependency in maven because for 
> whatever reason the maven compiler plugin will pick up the java files in the 
> jar and compile them to the output directory. From there they will land in 
> the generated jar file for whatever project happens to depend on zookeeper 
> thus introducing duplicate classes (once in zookeeper.jar, once in the 
> project's artifact).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to