Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b6295e5

Browse files
committedApr 1, 2012
closes #17: Assemble diffr into a single jar and create bash scripts for running it.
* Created assembly module that assembles all modules and dependencies into a single jar and packages them up with bash scripts into a zip and tar.gz archives.
1 parent 7d86559 commit b6295e5

File tree

5 files changed

+98
-2
lines changed

5 files changed

+98
-2
lines changed
 

‎assembly/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>diffr</groupId>
9+
<artifactId>parent</artifactId>
10+
<version>1.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<groupId>diffr</groupId>
14+
<artifactId>assembly</artifactId>
15+
<version>1.0-SNAPSHOT</version>
16+
<packaging>jar</packaging>
17+
<name>${project.groupId}.${project.artifactId}</name>
18+
<description>Assembles diffr and patchr into a single jar.</description>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>diffr</groupId>
23+
<artifactId>diff</artifactId>
24+
<version>${current.version}</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>diffr</groupId>
28+
<artifactId>patch</artifactId>
29+
<version>${current.version}</version>
30+
</dependency>
31+
</dependencies>
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-shade-plugin</artifactId>
38+
<version>1.6</version>
39+
<executions>
40+
<execution>
41+
<phase>package</phase>
42+
<goals>
43+
<goal>shade</goal>
44+
</goals>
45+
</execution>
46+
</executions>
47+
</plugin>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-assembly-plugin</artifactId>
51+
<version>${assembly.version}</version>
52+
<configuration>
53+
<descriptors>
54+
<descriptor>src/main/assembly/assembly.xml</descriptor>
55+
</descriptors>
56+
</configuration>
57+
</plugin>
58+
</plugins>
59+
</build>
60+
</project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
<id>diffr-assembly</id>
5+
<formats>
6+
<format>zip</format>
7+
<format>tar.gz</format>
8+
</formats>
9+
<includeBaseDirectory>false</includeBaseDirectory>
10+
<dependencySets>
11+
<dependencySet>
12+
<useProjectArtifact>true</useProjectArtifact>
13+
<includes>
14+
<include>diffr:assembly:jar</include>
15+
</includes>
16+
</dependencySet>
17+
</dependencySets>
18+
19+
<files>
20+
<file>
21+
<outputDirectory>/</outputDirectory>
22+
<source>src/main/bin/diffr.sh</source>
23+
<fileMode>755</fileMode>
24+
</file>
25+
<file>
26+
<outputDirectory>/</outputDirectory>
27+
<source>src/main/bin/patchr.sh</source>
28+
<fileMode>755</fileMode>
29+
</file>
30+
</files>
31+
</assembly>

‎assembly/src/main/bin/diffr.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
java -cp "*" diffr.diff.Main

‎assembly/src/main/bin/patchr.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
java -cp "*" diffr.patch.Main

‎pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</repositories>
8181

8282
<properties>
83-
<assembly.version>2.2.1</assembly.version>
83+
<assembly.version>2.3</assembly.version>
8484
<caliper.version>0.5-rc1</caliper.version>
8585
<clean.version>2.4.1</clean.version>
8686
<cobertura.version>2.5.1</cobertura.version>
@@ -102,10 +102,11 @@
102102
</properties>
103103

104104
<modules>
105-
<module>util</module>
105+
<module>assembly</module>
106106
<module>diff</module>
107107
<module>patch</module>
108108
<module>suffix-tree</module>
109+
<module>util</module>
109110
</modules>
110111

111112
<build>

0 commit comments

Comments
 (0)
Please sign in to comment.