我在Eclipse3.5中开发了一个eclipse应用程序。我能够通过以下目标条目在ant (命令shell外部eclipse)中成功地执行pde无头构建:
<target name="compile">
<java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true" dir="some-dir">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${eclipse.location}/plugins/org.eclipse.pde.build_${some-version}/scripts/productBuild/productBuild.xml" />
<arg value="-Dtimestamp=${timestamp}" />
<arg value="-propertyfile" />
<arg value="${some-dir}/ant.properties" />
<classpath>
<pathelement
location="${eclipse.location}/plugins/org.eclipse.equinox.launcher_${some-version}.jar" />
</classpath>
</java>
</target>但是一旦涉及到AspectJ (AJDT),我就对上面的目标做了如下修改:
<target name="compile">
<java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true" dir="${some-dir}">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
**<arg value="${eclipse.location}/plugins/org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900/scripts/productBuild/productBuild.xml" />**
<arg value="-Dtimestamp=${timestamp}" />
<arg value="-propertyfile" />
<arg value="${some-dir}/ant.properties" />
**<jvmarg value="-Dajdt.pdebuild.home=${eclipse.location}/plugins/org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900" />**
<classpath>
<pathelement
location="${eclipse.location}/plugins/org.eclipse.equinox.launcher_${some-version}.jar" />
</classpath>
</java>
</target>不幸的是,我现在得到了以下错误:
c:\eclipse-3.5\plugins\org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900\scripts\productBuild\productBuild.xml:8:找不到从c:\eclipse-3.5\plugins\org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900\scripts\productBuild\productBuild.xml导入的${ajdt.pdebuild.scripts}/productBuild/allElements.xml
有人知道如何设置ajdt.pdebuild.scripts值吗?谢谢!
发布于 2011-12-03 15:50:15
请看这篇博文:
http://contraptionsforprogramming.blogspot.com/2010/03/ajdt-pde-builds-redux.html
您不应该使用AJDT。这是一种旧的做事方式,不再得到支持。相反,您应该对build.properties文件进行更改:
# required
compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
sourceFileExtensions=*.java, *.aj
# optional
compilerArg=-aspectpath other.jar阅读博客帖子,了解更多细节。
发布于 2011-12-05 08:22:01
要在Eclipse3.5中执行pde无头构建,需要执行几个步骤:
1)在上面显示的"java“块中添加值为"jvmarg”的ajdt.pdebuild.scripts param。
2)在.../scripts/productBuild/productBuild.xml,value="productBuild/allElements.xml"中将property name="allElementsFile“name=改为property name="allElementsFile”value="${ajdt.pdebuild.scripts}/productBuild/allElements.xml"
3)在.../scripts/productBuild/productBuild.xml,中注释掉导入file="${ajdt.pdebuild.scripts}/productBuild/allElements.xml"
4)在.../scripts/productBuild/productBuild.xml,中粘贴以下导入语句:import file="${ajdt.pdebuild.scripts}/build.xml"
https://stackoverflow.com/questions/8367087
复制相似问题