私はMaven 3.3.9をDebian 8.4で別途.debとしてインストールしました 私はPHPコードを開発し、事前定義された開発ファイルツリーを持っています。 。 私は同じ構造を持つ2つのプロジェクトディレクトリを持っている:JARは空になります - 内容は含まれていません
.
├── admin5.php
.
├── app
│ ├── addons
. .
│ └── Tygh
├── bower_components
│ └── jquery-sticky
├── bower.json
. .
├── js
│ ├── addons
│ ├── lib
│ └── tygh
├── pom.xml
├── target
│ ├── classes
│ ├── dependency-maven-plugin-markers
│ ├── ip5_bestore-1.0.jar
│ ├── maven-archiver
│ └── original-ip5_bestore-1.0.jar
└── var
私は両方で同じのpom.xmlがあります。
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ip-5</groupId>
<artifactId>ip5_coolposter</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory> {basedir}/src/main/js/addons/ip5_bestore/dependencies/</outputDirectory>
<resources>
<resource>
<directory> {basedir}/bower_components/fabric.js/dist/</directory>
<includes>
<include>fabric.min.js</include>
</includes>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory> {basedir}</directory>
<includes>
<include>app/addons/ip5_*/</include>
<include>design/backend/css/addons/ip5_*/</include>
<include>design/backend/media/images/ip5_*/</include>
<include>design/backend/templates/addons/ip5_*/</include>
<include>design/themes/responsive/css/addons/ip5_*/</include>
<include>design/themes/responsive/media/images/addons/ip5_*/</include>
<include>design/themes/responsive/media/fonts/ip5_fonts/</include>
<include>design/themes/responsive/styles/data/IP5_*</include>
<include>design/themes/responsive/templates/addons/ip5_*/</include>
<include>js/addons/ip5_*/</include>
<include>var/langs/*/addons/ip5_*.po</include>
<include>cmsmagazined1992e543a5d7b4d64afe783fffdbc8d.txt</include>
</includes>
</resource>
</resources>
</build>
</project>
私はそのうちの一つで、「MVNパッケージ」を行い、すべてのものは成功しますが、他に私が取得:実行ID「コピー」と
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ip5_bestore ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] --- maven-shade-plugin:2.4.1:shade (default) @ ip5_bestore ---
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /var/www/bestore/target/ip5_bestore-1.0.jar with /var/www/bestore/target/ip5_bestore-1.0-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
は非常に明確な答えをいただき、ありがとうございます。私はあなたが提案したものを試しました。まず最初に、私はこのプロジェクトで依存関係プラグインを取り除きました。今はコピーリソースが必要です。 2つ目は、mvn cleanパッケージが両方で失敗することです。第三に、あなたが提案したように私は検証段階を入れました(私はパッケージ化と初期化も試みました)。ビットそれはまだ動作しません。 copy-resource-pluginブロックを省略した場合にのみ動作します。どこに問題があるのでしょうか?ありがとうございました。 –
更新されたpom.xmlのコンテンツBTWを挿入しました。 –
私はそれを見つけた!コピーレゾルサブロックの設定セクションを実行セクションに入れました!!! –