Do not bundle shared library with Maven.
<arg value="--build"/>
<arg value="."/>
<arg value="--target"/>
- <arg value="tinysplinejar"/>
+ <arg value="tinysplinejava"/>
</exec>
</target>
</configuration>
</goals>
<configuration>
<target>
- <echo>Replacing Maven generated jar with CMake generated jar</echo>
- <!-- delete original jar -->
- <delete file="${project.build.directory}/${project.artifactId}-${project.version}.jar" />
- <!-- create new jar that contains the shared library -->
- <unzip src="${basedir}/lib/tinyspline.jar" dest="${project.build.directory}/tmp-java-dir" />
- <copy todir="${project.build.directory}/tmp-java-dir">
- <fileset dir="${basedir}/lib">
- <include name="*tinysplinejava*" />
- </fileset>
+ <echo>Copying CMake generated jar to target</echo>
+ <copy file="${basedir}/lib/tinyspline.jar"
+ tofile="${project.build.directory}/${project.artifactId}-${project.version}.jar">
</copy>
- <jar destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar" basedir="${project.build.directory}/tmp-java-dir" />
- <!-- cleanup -->
- <delete dir="${project.build.directory}/tmp-java-dir" />
- <delete file="${project.build.directory}/tinyspline.jar" />
</target>
</configuration>
</execution>
