Don't run javah unless any file has a native method
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6ac65b3e5c
commit
e2da053329
@ -55,6 +55,18 @@
|
|||||||
</patternset>
|
</patternset>
|
||||||
</fileset>
|
</fileset>
|
||||||
</fileScanner>
|
</fileScanner>
|
||||||
|
|
||||||
|
<j:set var="compileJNI" value="false"/>
|
||||||
|
<j:forEach var="file" items="${classFiles.iterator()}">
|
||||||
|
<j:set var="clazz" value="${javaSourceTool.getBcelClass(file.toString())}"/>
|
||||||
|
<j:forEach var="method" items="${clazz.getMethods()}">
|
||||||
|
<j:if test="${method.isNative() == 'true'}">
|
||||||
|
<j:set var="compileJNI" value="true"/>
|
||||||
|
</j:if>
|
||||||
|
</j:forEach>
|
||||||
|
</j:forEach>
|
||||||
|
|
||||||
|
<j:if test="${compileJNI == 'true'}">
|
||||||
<mkdir dir="${maven.build.dir}/native/jni"/>
|
<mkdir dir="${maven.build.dir}/native/jni"/>
|
||||||
<javah destdir="${maven.build.dir}/native/jni">
|
<javah destdir="${maven.build.dir}/native/jni">
|
||||||
<classpath>
|
<classpath>
|
||||||
@ -74,5 +86,6 @@
|
|||||||
</j:if>
|
</j:if>
|
||||||
</j:forEach>
|
</j:forEach>
|
||||||
</javah>
|
</javah>
|
||||||
|
</j:if>
|
||||||
</goal>
|
</goal>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user