2017-05-02 6 views
0

How can I create an executable JAR with dependencies using Maven?からこのMavenプラグを使用して自分のコードの実行ファイルを取得しようとしました。しかし、それはエラーで終了します。目標com.mycila:license-maven-pluginの実行に失敗しました:3.0:プロジェクトのチェック(チェック - ライセンス)rinsim-example:目標com.mycila:license-maven-pluginの実行チェックライセンス:3.0:チェックに失敗しました:ヘッダ文書LICENSE_HEADERを読み込めません。原因:ファイルシステムに見つからないリソースLICENSE_HEADER、クラスパスまたはURL:なしプロトコル:LICENSE_HEADER - > [ヘルプ1]>Raven、実行ファイルをコンパイルできませんでした。依存関係が

は、これが私のMavenのファイルの一部です:

<plugin> 
 
\t \t \t \t <artifactId>maven-assembly-plugin</artifactId> 
 
\t \t \t \t <configuration> 
 
\t \t \t \t \t <archive> 
 
\t \t \t \t \t \t <manifest> 
 
\t \t \t \t \t \t \t <mainClass>com.github.rinde.rinsim.examples.project.DDRP</mainClass> 
 
\t \t \t \t \t \t </manifest> 
 
\t \t \t \t \t </archive> 
 
\t \t \t \t \t <descriptorRefs> 
 
\t \t \t \t \t \t <descriptorRef>jar-with-dependencies</descriptorRef> 
 
\t \t \t \t \t </descriptorRefs> 
 
\t \t \t \t </configuration> 
 
\t \t \t \t <executions> 
 
\t \t \t \t \t <execution> 
 
\t \t \t \t \t \t <id>make-my-jar-with-dependencies</id> 
 
\t \t \t \t \t \t <phase>package</phase> 
 
\t \t \t \t \t \t <goals> 
 
\t \t \t \t \t \t \t <goal>single</goal> 
 
\t \t \t \t \t \t </goals> 
 
\t \t \t \t \t </execution> 
 
\t \t \t \t </executions> 
 
\t \t \t </plugin>

ありがとうございます。

+0

表示されるエラーメッセージは何ですか? – rinde

+0

エラーは次のとおりです:目標com.mycila:license-maven-pluginの実行に失敗しました:3.0:プロジェクトのチェック(チェック - ライセンス)rinsim-example:目標com.mycilaの実行チェックライセンス:license-maven-plugin:3.0 :チェックに失敗しました:ヘッダ文書LICENSE_HEADERを読み込めません。原因:ファイルシステム、クラスパスまたはURLでリソースLICENSE_HEADERが見つかりません:プロトコルなし:LICENSE_HEADER - > [ヘルプ1] –

答えて

0

license-maven-pluginを含むRinSim pom.xmlの一部をコピーしたようですか?このエラーメッセージのソースであるlicense-maven-pluginプラグインの実行を削除するべきでしょう。これはRinSimにライセンスのmaven-pluginのの定義です:

<pluginExecution> 
    <pluginExecutionFilter> 
    <groupId>com.mycila</groupId> 
    <artifactId> 
     license-maven-plugin 
    </artifactId> 
    <versionRange> 
     [2.11,) 
    </versionRange> 
    <goals> 
     <goal>check</goal> 
    </goals> 
    </pluginExecutionFilter> 
    <action> 
    <ignore></ignore> 
    </action> 
</pluginExecution> 

また、あなたがlicense-maven-pluginを使用するように選択することができます。このプラグインを使用すると、すべてのソースファイルにライセンスヘッダーを設定できます。

+0

目標org.apache.maven.pluginsを実行できませんでした:maven-compiler-plugin:3.1:compile(default-compile )プロジェクトのrinsim-example:コンパイル失敗 - > [ヘルプ1] Rinde、ライセンス部分を削除しましたが、このエラーが出てきます。私はプロジェクトファイルを含んでいるサンプルファイルのpom.xmlにmavenプラグインを置いています。実行コマンド:mvn cleanコンパイルアセンブリ:サンプルファイルのsingleで実行可能なjarをビルドします。そして、シミュレータのオリジナルのコードはすべて、git cloneを実行して取得し、代わりにWebサイトの紹介に従います。何か正しいものはありませんか? –

+0

RinSimのクローン作成はお勧めしません。ウェブサイトの指示に従ってください。 – rinde

関連する問題