Browse Source

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
tags/7.7.0.alpha1
Teemu Suo-Anttila 8 years ago
parent
commit
f776982842

+ 0
- 1
all/pom.xml View File

@@ -80,7 +80,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<phase>initialize</phase>

+ 12
- 0
buildhelpers/pom.xml View File

@@ -63,5 +63,17 @@
</configuration>
</plugin>
</plugins>

<!-- Skip sources jar -->
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

+ 2
- 6
client-compiler/pom.xml View File

@@ -214,7 +214,7 @@
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>process-classes</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
@@ -248,9 +248,6 @@
</excludes>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
@@ -267,7 +264,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
@@ -320,5 +317,4 @@
</plugins>
</build>
<!--todo .javadoc.jar file -->
<!--todo .sources.java -->
</project>

+ 3
- 6
client/pom.xml View File

@@ -53,7 +53,7 @@
<version>${javax.validation.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
@@ -101,7 +101,7 @@
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
@@ -129,9 +129,6 @@
<excludes>META-INF/**</excludes>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
@@ -150,7 +147,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>

+ 1
- 1
liferay/liferay-assembly-descriptor.xml View File

@@ -9,7 +9,7 @@
<fileSets>
<fileSet>
<outputDirectory/>
<directory>${project.build.directory}/dependency</directory>
<directory>${dependency.unpack.directory}</directory>
<includes>
<include>**</include>
</includes>

+ 1
- 1
liferay/pom.xml View File

@@ -55,7 +55,7 @@
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>

+ 67
- 0
pom.xml View File

@@ -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,12 +131,26 @@
<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>
<artifactId>exec-maven-plugin</artifactId>
<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>
@@ -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>


+ 2
- 6
server/pom.xml View File

@@ -168,7 +168,6 @@

<build>
<plugins>

<!-- Copy needed GWT dependencies to package -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -176,7 +175,7 @@
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
@@ -188,9 +187,6 @@
</artifactItem>
</artifactItems>
<includes>com/google/gwt/*/server/**</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
@@ -209,7 +205,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>

+ 2
- 6
shared/pom.xml View File

@@ -85,7 +85,7 @@
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
@@ -112,15 +112,11 @@
</includes>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>


<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
@@ -133,7 +129,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>

+ 2
- 2
shared/src/main/java-templates/com/vaadin/shared/Version.java View File

@@ -47,10 +47,10 @@ public class Version implements Serializable {

/* Initialize version numbers from string replaced by build-script. */
static {
if ("${vaadin.version}".equals("${" + "vaadin.version" + "}")) {
if ("${project.version}".equals("${" + "project.version" + "}")) {
VERSION = "9.9.9.INTERNAL-DEBUG-BUILD";
} else {
VERSION = "${vaadin.version}";
VERSION = "${project.version}";
}
final String[] digits = VERSION.split("\\.", 4);
VERSION_MAJOR = Integer.parseInt(digits[0]);

+ 8
- 1
themes/pom.xml View File

@@ -219,7 +219,14 @@

<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>

+ 0
- 3
uitest/pom.xml View File

@@ -252,7 +252,6 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
@@ -319,7 +318,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>true</skip>
</configuration>
@@ -327,7 +325,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<configuration>
<skip>true</skip>
</configuration>

+ 3
- 7
widgets/pom.xml View File

@@ -89,7 +89,7 @@
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
@@ -156,9 +156,6 @@
<outputDirectory>${project.build.directory}/themes</outputDirectory>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
@@ -175,7 +172,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
@@ -192,8 +189,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/com/vaadin/themes/public
</outputDirectory>
<outputDirectory>${project.build.outputDirectory}/com/vaadin/themes/public</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/themes/VAADIN/themes</directory>

Loading…
Cancel
Save