Skip to content

Commit c602005

Browse files
committed
Runnable jar from pom
1 parent 6b1a5ba commit c602005

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

pom.xml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,63 @@
119119

120120
<build>
121121
<sourceDirectory>${basedir}/src/net/preibisch</sourceDirectory>
122+
122123
<plugins>
124+
125+
<!-- download source code in Eclipse, best practice -->
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-eclipse-plugin</artifactId>
129+
<version>2.9</version>
130+
<configuration>
131+
<downloadSources>true</downloadSources>
132+
<downloadJavadocs>false</downloadJavadocs>
133+
</configuration>
134+
</plugin>
135+
136+
<!-- Set a compiler level -->
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-compiler-plugin</artifactId>
140+
<version>2.3.2</version>
141+
<configuration>
142+
<source>1.8</source>
143+
<target>1.8</target>
144+
</configuration>
145+
</plugin>
146+
147+
<!-- Maven Assembly Plugin -->
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-assembly-plugin</artifactId>
151+
<version>2.4.1</version>
152+
<configuration>
153+
<!-- get all project dependencies -->
154+
<descriptorRefs>
155+
<descriptorRef>jar-with-dependencies</descriptorRef>
156+
</descriptorRefs>
157+
<!-- MainClass in mainfest make a executable jar -->
158+
<archive>
159+
<manifest>
160+
<mainClass>net.preibisch.fusiontask.task.MainJob</mainClass>
161+
</manifest>
162+
</archive>
163+
164+
</configuration>
165+
<executions>
166+
<execution>
167+
<id>make-assembly</id>
168+
<!-- bind to the packaging phase -->
169+
<phase>package</phase>
170+
<goals>
171+
<goal>single</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
176+
177+
</plugins>
178+
<!-- <plugins>
123179
<plugin>
124180
<artifactId>maven-assembly-plugin</artifactId>
125181
<configuration>
@@ -133,6 +189,6 @@
133189
</descriptorRefs>
134190
</configuration>
135191
</plugin>
136-
</plugins>
192+
</plugins> -->
137193
</build>
138194
</project>

0 commit comments

Comments
 (0)