在Netbeans中使用Apache Ivy

在Netbeans中使用Apache Ivy,第1张

在Netbeans中使用Apache Ivy

不幸的是,我对netbeans的配置文件不熟悉。

以下是我用来生成Eclipse元数据文件的集成目标

  • .classpath
  • 。项目

也许您可以适应它。

<target name="eclipse">    <taskdef name="groovy" classname="org.prehaus.groovy.ant.Groovy" classpathref="build.path"/>    <ivy:cachefileset setid="libfiles" conf="compile"/>    <groovy>    <arg value="${src.dir}"/>    <arg value="${build.dir}/classes"/>    import groovy.xml.MarkupBuilder    //    // Generate the project file    //    project.log("Creating .project")    new File(".project").withWriter { writer ->        def xml = new MarkupBuilder(writer)        xml.projectDescription() { name(project.name) comment() projects() buildSpec() {     buildCommand() {         name("org.eclipse.jdt.core.javabuilder")         arguments()     } } natures() {     nature("org.eclipse.jdt.core.javanature") }        }    }    //    // Generate the classpath file    //    // The "lib" classpathentry fields are populated using the ivy artifact report    //    project.log("Creating .classpath")    new File(".classpath").withWriter { writer ->        def xml = new MarkupBuilder(writer)        xml.classpath() { classpathentry(kind:"src",    path:args[0]) classpathentry(kind:"output", path:args[1]) classpathentry(kind:"con",    path:"org.eclipse.jdt.launching.JRE_CONTAINER") project.references.libfiles.each {     classpathentry(kind:"lib", path:it) }        }    }    </groovy>        </target>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5507529.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-13
下一篇2022-12-13

发表评论

登录后才能评论

评论列表(0条)

    保存