Browse Source

support for fat-jars and fixed names for both normal and fat jars.

Christophe Debruyne 7 years ago
parent
commit
0bd25bfe09
3 changed files with 31 additions and 1 deletions
  1. 2 0
      .gitignore
  2. 6 1
      README.md
  3. 23 0
      pom.xml

+ 2 - 0
.gitignore

@@ -23,3 +23,5 @@ target/
 /bin/
 
 derby.log
+
+dependency-reduced-pom.xml

+ 6 - 1
README.md

@@ -12,7 +12,12 @@ $ mvn dependency:copy-dependencies
 The run the R2RML processor, execute the following command:
 
 ```bash
-$ java -jar r2rml-0.0.1-SNAPSHOT.jar config.properties
+$ java -jar r2rml.jar config.properties
+```
+A fat jar is also provided with the [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/). It does not depend on the `dependency` folder and can be executed as follows:
+
+```bash
+$ java -jar r2rml-fat.jar config.properties
 ```
 
 Where `config.properties` is a properties file containing:

+ 23 - 0
pom.xml

@@ -6,6 +6,7 @@
 	<version>0.0.1-SNAPSHOT</version>
 	<name>R2RML Implementation</name>
 	<build>
+		<finalName>r2rml</finalName>
 		<sourceDirectory>src</sourceDirectory>
 		<resources>
 			<resource>
@@ -38,6 +39,28 @@
 					</archive>
 				</configuration>
 			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-shade-plugin</artifactId>
+				<version>2.4.3</version>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>shade</goal>
+						</goals>
+						<configuration>
+							<finalName>r2rml-fat</finalName>
+							<transformers>
+								<transformer
+									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+									<mainClass>r2rml.Main</mainClass>
+								</transformer>
+							</transformers>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
 		</plugins>
 	</build>
 	<dependencies>