Skip to content

Commit cc96eeb

Browse files
committed
fix maven
1 parent b6dd093 commit cc96eeb

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/main/java/io/github/fvarrui/javapackager/PackageTask.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ public PackageTask() {
6969
this.additionalModulePaths = new ArrayList<>();
7070
this.fileAssociations = null;
7171
this.packagingJdk = null;
72-
scripts(new Scripts());
72+
scripts = new Scripts();
7373
}
7474

7575
/**
7676
* Output directory.
7777
*/
78-
@Parameter(property = "outputDirectory", required = false)
78+
@Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}")
7979
@OutputDirectory
8080
@Optional
8181
protected File outputDirectory;
@@ -115,47 +115,47 @@ public PackageTask() {
115115
/**
116116
* Full path to your app main class.
117117
*/
118-
@Parameter(property = "mainClass", required = true)
118+
@Parameter(property = "mainClass", required = true, defaultValue = "${exec.mainClass}")
119119
@Input
120120
@Optional
121121
protected String mainClass;
122122

123123
/**
124124
* App name.
125125
*/
126-
@Parameter(property = "appName")
126+
@Parameter(property = "appName", defaultValue = "${project.name}")
127127
@Input
128128
@Optional
129129
protected String appName;
130130

131131
/**
132132
* App name to show.
133133
*/
134-
@Parameter(property = "appDisplayName")
134+
@Parameter(property = "appDisplayName", defaultValue = "${project.name}")
135135
@Input
136136
@Optional
137137
protected String appDisplayName;
138138

139139
/**
140140
* Project version.
141141
*/
142-
@Parameter(property = "version")
142+
@Parameter(property = "version", defaultValue = "${project.version}")
143143
@Input
144144
@Optional
145145
protected String version;
146146

147147
/**
148148
* Project description.
149149
*/
150-
@Parameter(property = "description")
150+
@Parameter(property = "description", defaultValue = "${project.description}")
151151
@Input
152152
@Optional
153153
protected String description;
154154

155155
/**
156156
* App website URL.
157157
*/
158-
@Parameter(property = "url")
158+
@Parameter(property = "url", defaultValue = "${project.url}")
159159
@Input
160160
@Optional
161161
protected String url;
@@ -171,15 +171,15 @@ public PackageTask() {
171171
/**
172172
* Organization name.
173173
*/
174-
@Parameter(property = "organizationName", required = false)
174+
@Parameter(property = "organizationName", defaultValue = "${project.organization.name}")
175175
@Input
176176
@Optional
177177
protected String organizationName;
178178

179179
/**
180180
* Organization website URL.
181181
*/
182-
@Parameter(property = "organizationUrl", required = false)
182+
@Parameter(property = "organizationUrl", defaultValue = "${project.organization.url}")
183183
@Input
184184
@Optional
185185
protected String organizationUrl;
@@ -378,7 +378,7 @@ public PackageTask() {
378378
/**
379379
* Assets directory
380380
*/
381-
@Parameter(property = "assetsDir", required = false)
381+
@Parameter(property = "assetsDir", defaultValue = "${project.basedir}/assets")
382382
@InputDirectory
383383
@Optional
384384
protected File assetsDir;

src/test/java/io/github/fvarrui/javapackager/RealTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void helloWorldMaven() throws Exception {
2222
request.setGoals(Arrays.asList("clean", "package"));
2323
request.addArg("-Dmaven.javadoc.skip=true");
2424
request.addArg("-Dmaven.test.skip=true");
25+
request.addArg("-e");
2526
Invoker invoker = new DefaultInvoker();
2627
InvocationResult result = invoker.execute(request);
2728
if(result.getExitCode() != 0 || result.getExecutionException() != null)

0 commit comments

Comments
 (0)