[CMake] Adding dependency jar to jar

Pastrana, Rodrigo (RIS-BCT) Rodrigo.Pastrana at lexisnexis.com
Tue Jan 29 12:25:26 EST 2013


Hello, I've been creating a jar based on my java project without issue, but now I'm adding an external dependency and will like to package the said dependency's contents within my output jar.

I'm able to build the project via CMAKE by adding the external.jar to the CMAKE_JAVA_INCLUDE_PATH list:

LIST(APPEND CMAKE_JAVA_INCLUDE_PATH ${EXTERNAL_BUILDTIME_JAR})
ADD_JAR(${JAR_FILE} ${JAVA_SOURCE_FILES})

And I've tried a few things to include ${EXTERNAL_RUNTIME_JAR} in ${JAR_FILE} to no avail.
Does anybody know a way to accomplish this? (btw using CMAKE 2.8).

Using ANT through eclipse I was able to include the external using zipgroupfileset:
<jar jarfile="myjavaproj.jar" includes="**/*.class" basedir="bin">
                <zipgroupfileset dir="/XXX/yyy/zzz/" includes="external.jar"/>
</jar>

Thanks in advance. RP.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130129/1ccbeeb2/attachment.htm>


More information about the CMake mailing list