0

私はEclipse 3.5で開発されているEclipse rcpアプリケーションを持っています。次のターゲット エントリを使用して、ant で pde ヘッドレス ビルドを ( eclipse 外のコマンド シェルから) 正常に実行できます。

<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: ${ajdt.pdebuild.scripts} が見つかりません/ c:\eclipse-3.5\plugins\org.eclipse.ajdt.pde.build_2.0.2.e35x-release-20101021-0900\scripts\productBuild\productBuild.xml からインポートされた productBuild/allElements.xml

ajdt.pdebuild.scripts 値を設定する方法について誰か考えがありますか? ありがとうございました!!!

4

2 に答える 2

0

ajdt-pde ヘッドレス ビルドを Eclipse 3.5 で実行するには、いくつかの手順が必要です。

1) ajdt.pdebuild.scriptsパラメータを、それぞれの値を「jvmarg」として上記の「java」ブロックに追加します。
2) .../scripts/productBuild/productBuild.xmlで、property name="allElementsFile" value="productBuild/allElements.xml"をこのproperty name="allElementsFile" value="${ajdt.pdebuild.scripts}に変更します。 /productBuild/allElements.xml"
3) .../scripts/productBuild/productBuild.xmlで、コメント アウトimport file="${ajdt.pdebuild.scripts}/productBuild/allElements.xml"
4) .../でscripts/productBuild/productBuild.xmlに、次のインポート ステートメントを貼り付けます: import file="${ajdt.pdebuild.scripts}/build.

于 2011-12-05T08:22:01.020 に答える
0

このブログ投稿を参照してください。

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

AJDT-PDE を使用しないでください。これは古い方法であり、サポートされなくなりました。代わりに、build.properties ファイルを変更する必要があります。

# required
compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
sourceFileExtensions=*.java, *.aj

# optional
compilerArg=-aspectpath other.jar

詳細については、ブログ投稿をお読みください。

于 2011-12-03T15:50:15.393 に答える