2011-12-06 16 views
3

私はEclipse用のビュープラグインを作成しました。私はプロジェクトからjarをエクスポートすることができ、それはかなりうまくいっています。私はそれを自動化するAntビルドスクリプトを作成しようとしています。ヘッドレスPDEビルドは成功しましたが、ファイルはありません

私は右のプロジェクト、輸出、Antbuildファイルをクリックし

  1. を行うことによって、Eclipseのから2つのAntビルドスクリプトを作成しました。
  2. プラグインのエクスポートウィザードでは、オプションで「Antスクリプトとして保存」を選択します。

まず一つは、それが電気ショック療法のinitターゲット、ビルドターゲットを、持っている、非常に長いです。もう一つは、単に以下の通りです:

<?xml version="1.0" encoding="UTF-8"?> 
<project default="plugin_export" name="build"> 
    <target name="plugin_export"> 
     <pde.exportPlugins destination="C:\newPlugin" exportSource="false" exportType="directory" plugins="myplugin" useJARFormat="false"/> 
    </target> 
</project> 

私は、コマンドラインでそれらの両方を実行しようとした:

java -jar c:\eclipse\plugins\org.eclipse.equinox.launcher_*.jar -application org.eclipse.ant.core.antRunner -data C:\newPlugin -buildfile build_plugin.xml 

私は長いantbuildを実行した場合、それはbinディレクトリの下にOBJファイルを作成しました。それはいいですが、プラグインjarファイルが必要です。私は2番目のことがそれをすると思われる。しかし、ビルドが成功しても、jarファイルは表示されません。ここで

は、Antスクリプトの出力です:

Apache Ant(TM) version 1.8.2 compiled on December 20 2010 
Buildfile: build_plugin.xml 
parsing buildfile C:\newPlugin\build_plugin.xml with URI = file:/C:/newPlugin/build_plugin.xml 
Project base dir set to: C:\newPlugin 
Build sequence for target(s) `plugin_export' is [plugin_export] 
Complete build sequence is [plugin_export, ] 

plugin_export: 
parsing buildfile jar:file:/C:/eclipse/plugins/org.apache.ant_1.8.2.v20110505-1300/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/eclipse/plugins/org.apache.ant_1.8.2.v20110505-1300/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file 
BUILD SUCCESSFUL 

BUILD SUCCESSFUL 
Total time: 2 seconds 

答えて

3

あなたの実行が正しく見えます。私は、同じ手順を経る時:その後、

<project default="plugin_export" name="build"> 
     <target name="plugin_export"> 
       <pde.exportPlugins destination="/opt/pwebster/workspaces/deploymentTest" exportSource="false" exportType="directory" plugins="org.eclipse.core.expressions" qualifier="v201112061450" useJARFormat="true"/> 
     </target> 
</project> 

し、それを実行します。

bash$ eclipse/eclipse -noSplash \ 
-application org.eclipse.ant.core.antRunner 
-data /opt/pwebster/workspaces/build38x/ \ 
-buildfile build_file.xml 

私はちょうどノート私のoutoutディレクトリにdeploymentTest/plugins/org.eclipse.core.expressions_3.4.300.v201112061450.jar

を取得する:あなたの目的地は、外のディレクトリでなければなりませんあなたの作業スペースを使用して、あなたはあなたのワークスペースを通話に渡すべきです-data

+0

それは変わって有望です。ダミーのプロジェクトを作成してコマンドラインを実行しても、私はまだ何も得られません。私は日食で何かを逃していますか?私はEclipse SDK 4.1.0を使用しています。私は新鮮なインストールをして、もう一度試してみます。他のアイデアがあれば聞いてうれしいです。 –

+0

Paul、それはbuild.xmlを取得しようとしている間にEclipseが作成したプラグインですか?私はちょうど私の家のマシン(最新のJavaとEclipseをダウンロード)で同じダミーのプロジェクトを試みたが、運がない。私はまだヘッドレスビルドを行うことはできません。それはバグでしょうか? –

+0

あなたのプロジェクトとデプロイメントディレクトリで作業ディレクトリに異なるディレクトリを使用していますか?プロジェクトのワークスペースをデータに渡していますか? –

関連する問題