Use dependency plugin to copy runtime lib to MOD-INF dirs

This commit is contained in:
Antonin Delpeuch 2018-09-11 10:55:29 +01:00
parent f2c0361bfc
commit c12502aaae
24 changed files with 123 additions and 51 deletions

View File

@ -81,8 +81,20 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
<configuration> <configuration>
<skip>true</skip> <outputFile>target/classpath.txt</outputFile>
</configuration> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -93,6 +105,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -79,8 +79,20 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
<configuration> <configuration>
<skip>true</skip> <outputFile>target/classpath.txt</outputFile>
</configuration> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -91,6 +103,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -78,14 +78,22 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
<configuration> <configuration>
<skip>true</skip> <outputFile>target/classpath.txt</outputFile>
</configuration> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
<pluginManagement>
<plugins>
</plugins>
</pluginManagement>
</build> </build>
<dependencies> <dependencies>
@ -93,6 +101,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -71,19 +71,27 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
</plugins> <plugin>
<pluginManagement> <groupId>org.apache.maven.plugins</groupId>
<plugins> <artifactId>maven-dependency-plugin</artifactId>
<plugin> <version>3.1.1</version>
<groupId>org.apache.maven.plugins</groupId> <configuration>
<artifactId>maven-dependency-plugin</artifactId> <outputFile>target/classpath.txt</outputFile>
<version>3.1.1</version> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration> <configuration>
<skip>true</skip> <outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration> </configuration>
</plugin> </execution>
</plugins> </executions>
</pluginManagement> </plugin>
</plugins>
</build> </build>
<dependencies> <dependencies>
@ -91,6 +99,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -62,19 +62,27 @@
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</configuration> </configuration>
</plugin> </plugin>
</plugins> <plugin>
<pluginManagement> <groupId>org.apache.maven.plugins</groupId>
<plugins> <artifactId>maven-dependency-plugin</artifactId>
<plugin> <version>3.1.1</version>
<groupId>org.apache.maven.plugins</groupId> <configuration>
<artifactId>maven-dependency-plugin</artifactId> <outputFile>target/classpath.txt</outputFile>
<version>3.1.1</version> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration> <configuration>
<skip>true</skip> <outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration> </configuration>
</plugin> </execution>
</plugins> </executions>
</pluginManagement> </plugin>
</plugins>
</build> </build>
<dependencies> <dependencies>
@ -82,6 +90,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -78,17 +78,26 @@
</suiteXmlFiles> </suiteXmlFiles>
</configuration> </configuration>
</plugin> </plugin>
</plugins> <plugin>
<pluginManagement> <groupId>org.apache.maven.plugins</groupId>
<plugins> <artifactId>maven-dependency-plugin</artifactId>
<plugin> <version>3.1.1</version>
<groupId>org.apache.maven.plugins</groupId> <configuration>
<artifactId>maven-dependency-plugin</artifactId> <outputFile>target/classpath.txt</outputFile>
<version>3.1.1</version> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration> <configuration>
<skip>true</skip> <outputDirectory>module/MOD-INF/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration> </configuration>
</plugin> </execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
@ -98,7 +107,7 @@
<id>install-wdtk-datamodel</id> <id>install-wdtk-datamodel</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/module/MOD-INF/lib/wdtk-datamodel-0.9.0-SNAPSHOT-jar-with-dependencies.jar</file> <file>${basedir}/lib/wdtk-datamodel-0.9.0-SNAPSHOT-jar-with-dependencies.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>org.wikidata.wdtk</groupId> <groupId>org.wikidata.wdtk</groupId>
<artifactId>wdtk-datamodel</artifactId> <artifactId>wdtk-datamodel</artifactId>
@ -114,7 +123,7 @@
<id>install-wdtk-wikibaseapi</id> <id>install-wdtk-wikibaseapi</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/module/MOD-INF/lib/wdtk-wikibaseapi-0.9.0-SNAPSHOT.jar</file> <file>${basedir}/lib/wdtk-wikibaseapi-0.9.0-SNAPSHOT.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>org.wikidata.wdtk</groupId> <groupId>org.wikidata.wdtk</groupId>
<artifactId>wdtk-wikibaseapi</artifactId> <artifactId>wdtk-wikibaseapi</artifactId>
@ -128,9 +137,7 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins>
</plugins>
</pluginManagement>
</build> </build>
<dependencies> <dependencies>
@ -138,6 +145,7 @@
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View File

@ -94,8 +94,19 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
<configuration> <configuration>
<skip>true</skip> <outputFile>target/classpath.txt</outputFile>
</configuration> </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>webapp/WEB-INF/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -118,7 +129,7 @@
<id>install-marc4j</id> <id>install-marc4j</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/marc4j-2.4.jar</file> <file>${basedir}/lib/marc4j-2.4.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>marc4j</groupId> <groupId>marc4j</groupId>
<artifactId>marc4j</artifactId> <artifactId>marc4j</artifactId>
@ -134,7 +145,7 @@
<id>install-tableschema</id> <id>install-tableschema</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/tableschema-java-1.0-SNAPSHOT.jar</file> <file>${basedir}/lib/tableschema-java-1.0-SNAPSHOT.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>io.frictionlessdata</groupId> <groupId>io.frictionlessdata</groupId>
<artifactId>tableschema-java</artifactId> <artifactId>tableschema-java</artifactId>
@ -150,7 +161,7 @@
<id>install-datapackage</id> <id>install-datapackage</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/datapackage-java-1.0-SNAPSHOT.jar</file> <file>${basedir}/lib/datapackage-java-1.0-SNAPSHOT.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>io.frictionlessdata</groupId> <groupId>io.frictionlessdata</groupId>
<artifactId>datapackage-java</artifactId> <artifactId>datapackage-java</artifactId>
@ -166,7 +177,7 @@
<id>install-opencsv</id> <id>install-opencsv</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/opencsv-2.4-SNAPSHOT.jar</file> <file>${basedir}/lib/opencsv-2.4-SNAPSHOT.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>net.sf.opencsv</groupId> <groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId> <artifactId>opencsv</artifactId>
@ -182,7 +193,7 @@
<id>install-butterfly</id> <id>install-butterfly</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/butterfly-1.0.1.jar</file> <file>${basedir}/lib/butterfly-1.0.1.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>edu.mit.simile</groupId> <groupId>edu.mit.simile</groupId>
<artifactId>butterfly</artifactId> <artifactId>butterfly</artifactId>
@ -198,7 +209,7 @@
<id>install-vicino</id> <id>install-vicino</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<configuration> <configuration>
<file>${basedir}/webapp/WEB-INF/lib/vicino-1.1.jar</file> <file>${basedir}/lib/vicino-1.1.jar</file>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>edu.mit.simile</groupId> <groupId>edu.mit.simile</groupId>
<artifactId>vicino</artifactId> <artifactId>vicino</artifactId>