summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-11 13:31:41 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-11 16:51:21 +0300
commitf776982842daa0dcdf04cc7055afaae9d3386280 (patch)
tree56fb5ef43b48a6c4710ffc0799d097de2a8899cc /pom.xml
parent7c6710191bd8a5be69c2ec6fc356f013bd36aaf7 (diff)
downloadvaadin-framework-f776982842daa0dcdf04cc7055afaae9d3386280.tar.gz
vaadin-framework-f776982842daa0dcdf04cc7055afaae9d3386280.zip
Generate sources with release profile
This patch refactors how unpacking of dependencies is handled. It now uses a more generic configuration on top level as well as updates the phase where the extraction happens. This way the source plugin configuration remains small Change-Id: I952ec84e05eac255f8b44044baceba37e07737c5
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml67
1 files changed, 67 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 59cc45b0f8..1ca0a5bcca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,9 @@
<!-- Atmosphere versions -->
<atmosphere.runtime.version>2.2.7.vaadin1</atmosphere.runtime.version>
<atmosphere.js.version>2.2.6.vaadin4</atmosphere.js.version>
+
+ <!-- Dependency unpack directory -->
+ <dependency.unpack.directory>${project.build.directory}/dependency-unpack</dependency.unpack.directory>
</properties>
<!-- TODO: remove this after maven plugin has been released -->
@@ -96,6 +99,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
+ <!-- Downgraded due to filtering related bug -->
<version>2.6</version>
</plugin>
<plugin>
@@ -127,6 +131,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
+ <configuration>
+ <outputDirectory>${dependency.unpack.directory}</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -134,6 +143,15 @@
<version>1.4.0</version>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.10</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
@@ -165,6 +183,33 @@
</plugin>
</plugins>
</pluginManagement>
+
+ <plugins>
+ <!-- Unpacked Dependencies as resource -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+
+ <!-- Needs extra resource folder for unpacked dependencies -->
+ <executions>
+ <execution>
+ <id>add-dependency-resources</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${dependency.unpack.directory}</directory>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
<profiles>
@@ -176,6 +221,28 @@
<properties>
<vaadin.plugin.version>${project.version}</vaadin.plugin.version>
</properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sources-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <!-- Only include java files -->
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>