Skip to content

Commit 1487adf

Browse files
committed
Merge pull request #14 from matthias-m/master
added optional support for other packaging formats
2 parents 769cacb + ac607e3 commit 1487adf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ To use it, add a plugin to your pom like
5252
<!-- (optional) name for binary executable, if not set will just -->
5353
<!-- make the regular jar artifact executable -->
5454
<programFile>nifty-executable</programFile>
55+
56+
<!-- (optional) support other packaging formats than jar -->
57+
<!-- <allowOtherTypes>true</allowOtherTypes> -->
5558

5659
<!-- (optional) name for a file that will define what script gets -->
5760
<!-- embedded into the executable jar. This can be used to -->

src/main/java/org/skife/waffles/ReallyExecutableJarMojo.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ public class ReallyExecutableJarMojo extends AbstractMojo
7676
@Parameter(property = "really-executable-jar.classifier")
7777
private String classifier;
7878

79+
/**
80+
* Allow other packaging types than "jar".
81+
*/
82+
@Parameter(property = "really-executable-jar.allowOtherTypes")
83+
private String allowOtherTypes;
84+
7985
/**
8086
* Attach the binary as an artifact to the deploy.
8187
*/
@@ -144,7 +150,7 @@ private boolean shouldProcess(Artifact artifact)
144150
return false;
145151
}
146152

147-
if (!artifact.getType().equals("jar")) {
153+
if (!Boolean.valueOf(allowOtherTypes) && !artifact.getType().equals("jar")) {
148154
return false;
149155
}
150156

0 commit comments

Comments
 (0)