首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在AJDT无头PDE构建过程中未设置ajdt.pdebuild.scripts

在AJDT无头PDE构建过程中未设置ajdt.pdebuild.scripts
EN

Stack Overflow用户
提问于 2011-12-03 10:37:38
回答 2查看 204关注 0票数 0

我在Eclipse3.5中开发了一个eclipse应用程序。我能够通过以下目标条目在ant (命令shell外部eclipse)中成功地执行pde无头构建:

代码语言:javascript
复制
<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),我就对上面的目标做了如下修改:

代码语言:javascript
复制
<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值吗?谢谢!

EN

回答 2

Stack Overflow用户

发布于 2011-12-03 15:50:15

请看这篇博文:

http://contraptionsforprogramming.blogspot.com/2010/03/ajdt-pde-builds-redux.html

您不应该使用AJDT。这是一种旧的做事方式,不再得到支持。相反,您应该对build.properties文件进行更改:

代码语言:javascript
复制
# required
compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
sourceFileExtensions=*.java, *.aj

# optional
compilerArg=-aspectpath other.jar

阅读博客帖子,了解更多细节。

票数 0
EN

Stack Overflow用户

发布于 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"

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8367087

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档