iva*_*off 4 java packaging netbeans jar netbeans6.8
我更具体地问这个问题:
使用Netbeans,是否有可能创建一个额外的自定义构建目标,它将:
笔记:
感谢Mark的资源提示,我将示例简化为最小化:
完成以下操作仅打包源:
<!-- depends="jar" have to stay:
without it, we haven't the variable ${application.title} -->
<target name="MY-EXPORT-SOURCES" depends="jar">
<echo>MY TARGET: PACKAGING ${application.title} SOURCES</echo>
<delete file="dist/${application.title}.SOURCES.zip"/>
<zip destfile="dist/${application.title}.SOURCES.zip" basedir="src"
includes="**/*.java"/>
</target>
Run Code Online (Sandbox Code Playgroud)
要在Netbeans中运行,请执行:
build.xml rightclick - > run targets - > other targets - > MY-EXPORT-SOURCES.