How to include file in Jar through Ant at specific location

前端 未结 3 2020
执笔经年
执笔经年 2021-01-01 12:09

I\'ve got an ant jar task:


    
        

        
相关标签:
3条回答
  • 2021-01-01 12:56

    Use a zipfileset like this:

    <jar destfile="${generated.jars.dir}/hello-${environment}.jar">
        <fileset dir="${generated.classes.dir}"/>
        <zipfileset dir="${environment.dir}/${environment}" 
                    includes="config.xml"
                    fullpath="database/config.xml"/>
    </jar>
    
    0 讨论(0)
  • 2021-01-01 13:01

    You want zipfileset:

    <zipfileset dir="${environment.dir}/${environment}" includes="config.xml" prefix="database"/>
    

    or:

    <zipfileset dir="${environment.dir}/${environment}" includes="config.xml" fullpath="database/config.xml"/>
    
    0 讨论(0)
  • 2021-01-01 13:03
    <!-- Generate EJBs -->
      <javadoc destdir="${ejb.build.dir}/src" classpathref="ejb.class.path" docletpath="${wl.home}/lib/ejbgen.jar" doclet="weblogic.tools.ejbgen.EJBGen" maxmemory="512m" docletpathref="class.path" failonerror="true" additionalparam="-descriptorDir ${ejb.build.dir}/src/META-INF -wls81 -forceGeneration">
       <fileset dir="${ejb.build.dir}/src" includes="**/ejb/*Bean.java,**/ejb/**/*Bean.java, **/ejb/enterprisemanagement/*EJB.java, **/ejb/sitemanagement/*EJB.java, kaas/gateways/rdm/**" excludes="**/agwmgmt/*.java,**/dstprofilemgmt/*.java, **/KaASBaseSessionBean.java,**/com/hns/iag/kaas/rdm/**">
    
    0 讨论(0)
提交回复
热议问题