summaryrefslogtreecommitdiff
path: root/module/ri-engine/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'module/ri-engine/pom.xml')
-rw-r--r--module/ri-engine/pom.xml69
1 files changed, 45 insertions, 24 deletions
diff --git a/module/ri-engine/pom.xml b/module/ri-engine/pom.xml
index 97fee1c..d17f83e 100644
--- a/module/ri-engine/pom.xml
+++ b/module/ri-engine/pom.xml
@@ -3,6 +3,9 @@
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>
+ <properties>
+ <main-class>io.trygvis.rules.engine.Main</main-class>
+ </properties>
<parent>
<groupId>io.trygvis.rules-sandbox</groupId>
@@ -34,22 +37,6 @@
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
</dependency>
- <!--
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-mvel</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.kie</groupId>
- <artifactId>kie-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.kie</groupId>
- <artifactId>kie-internal</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- -->
<dependency>
<groupId>ch.qos.logback</groupId>
@@ -115,16 +102,21 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.2.4</version>
<executions>
<execution>
- <id>copy-dependencies</id>
- <phase>prepare-package</phase>
+ <phase>package</phase>
<goals>
- <goal>copy-dependencies</goal>
+ <goal>shade</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/kie.conf</resource>
+ </transformer>
+ </transformers>
+ <outputFile>${project.build.directory}/${project.artifactId}-${project.version}-fat.jar</outputFile>
</configuration>
</execution>
</executions>
@@ -136,13 +128,42 @@
<configuration>
<archive>
<manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- <mainClass>io.trygvis.rules.engine.Main</mainClass>
+ <mainClass>${main-class}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
+
+ <!-- TODO: attach generated script to build -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>generate-autocompletion-script</id>
+ <phase>package</phase>
+ <goals>
+ <!-- The java goal doesn't work here as maven itself would have to run with enable-preview -->
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>java</executable>
+ <arguments>
+ <argument>-Dpicocli.autocomplete.systemExitOnError</argument>
+ <argument>--enable-preview</argument>
+ <argument>-cp</argument>
+ <classpath/>
+ <argument>picocli.AutoComplete</argument>
+ <argument>--force</argument>
+ <argument>--completionScript</argument>
+ <argument>${project.build.directory}/engine_completion.sh</argument>
+ <argument>${main-class}</argument>
+ </arguments>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>