You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2021/08/05 16:45:52 UTC
[commons-rng] 01/21: Add profile to build the example application
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
commit d8e0cc64dbf385a64228c53453227f04fa2f1c56
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Thu Aug 5 13:19:30 2021 +0100
Add profile to build the example application
---
commons-rng-examples/examples-quadrature/pom.xml | 46 ++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/commons-rng-examples/examples-quadrature/pom.xml b/commons-rng-examples/examples-quadrature/pom.xml
index e2a7aea..765c0e5 100644
--- a/commons-rng-examples/examples-quadrature/pom.xml
+++ b/commons-rng-examples/examples-quadrature/pom.xml
@@ -39,6 +39,9 @@
<commons.automatic.module.name>org.apache.commons.rng.examples.quadrature</commons.automatic.module.name>
<!-- Workaround to avoid duplicating config files. -->
<rng.parent.dir>${basedir}/../..</rng.parent.dir>
+
+ <uberjar.name>examples-quadrature</uberjar.name>
+ <project.mainClass>org.apache.commons.rng.examples.quadrature.ComputePi</project.mainClass>
</properties>
<dependencies>
@@ -53,4 +56,47 @@
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>examples-quadrature</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>${rng.shade.version}</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <finalName>${uberjar.name}</finalName>
+ <minimizeJar>true</minimizeJar>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>${project.mainClass}</mainClass>
+ </transformer>
+ </transformers>
+ <filters>
+ <filter>
+ <!-- Shading signed JARs will fail without this. http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar -->
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>