@@ -99,7 +99,9 @@ component accessors=true {
99
99
}
100
100
101
101
function toJar ( string jarName = ' ' ) {
102
- setJarNameString ( jarName );
102
+ if ( jarName .len () ) {
103
+ setJarNameString ( jarName );
104
+ }
103
105
setCreateJar ( true );
104
106
return this ;
105
107
}
@@ -119,10 +121,11 @@ component accessors=true {
119
121
return this ;
120
122
}
121
123
122
- function addToManifest ( required string customManifest ) {
124
+ // no longer needed
125
+ /* function addToManifest( required string customManifest ) {
123
126
setCustomManifest( fileSystemutil.resolvePath( customManifest, getProjectRoot() ) );
124
127
return this;
125
- }
128
+ } */
126
129
127
130
function manifest ( required struct customParams ) {
128
131
setCustomManifestParams ( customParams );
@@ -288,13 +291,15 @@ component accessors=true {
288
291
289
292
}
290
293
jarName & = word & " .jar" ;
291
- setJarNameString ( jarName );
292
- // job.addLog( ' jarName= #jarName# ' );
293
294
294
295
}
295
296
296
297
}
297
298
299
+ setJarNameString ( jarName );
300
+ // job.addLog( ' jarName= #jarName# ' );
301
+ // job.addLog( ' jarName*= #getJarNameString()# ' );
302
+
298
303
job .complete ();
299
304
300
305
try {
@@ -308,12 +313,13 @@ component accessors=true {
308
313
// j = 'run "#getJavaBinFolder()#jar" --file #currentLibsDir##jarName# #getJarOptionsString()#';
309
314
// j = 'run "#getJavaBinFolder()#jar" --create --file #currentLibsDir#testX.jar "@#tempSrcFileName#" #getJarOptionsString()#';
310
315
if ( ! getCustomManifest ().len () ) {
311
- j = ' run ""#getJavaBinFolder () #jar" cf "#currentLibsDir #\ #jarName #" "@#tempSrcFileName #" #getJarOptionsString () #"' ;
316
+ j = ' run ""#getJavaBinFolder () #jar" cf "#currentLibsDir ##jarName #" "@#tempSrcFileName #" #getJarOptionsString () #"' ;
312
317
} else {
313
- j = ' run ""#getJavaBinFolder () #jar" cfm "#currentLibsDir #\ #jarName #" "#variables .customManifest #" "@#tempSrcFileName #" #getJarOptionsString () #"' ;
318
+ j = ' run ""#getJavaBinFolder () #jar" cfm "#currentLibsDir ##jarName #" "#variables .customManifest #" "@#tempSrcFileName #" #getJarOptionsString () #"' ;
314
319
}
315
320
job .addLog ( j );
316
- command ( j ).run (echo = true );
321
+ // command( j ).run(echo=true);
322
+ command ( j ).run ();
317
323
318
324
} finally {
319
325
if ( FileExists ( tempSrcFileName ) ) {
@@ -339,7 +345,7 @@ component accessors=true {
339
345
340
346
j = ' run ""#getJavaBinFolder () #jar" uf "#currentLibsDir ##jarName #" -C #currentResourcePath # . "'
341
347
342
- job .addLog ( j );
348
+ // job.addLog( j );
343
349
// command( j ).run(echo=true);
344
350
command ( j ).run ();
345
351
@@ -407,6 +413,15 @@ component accessors=true {
407
413
try {
408
414
writeUpdateManifestFile ( tempUpdateManifestFileName , paramStruct );
409
415
} finally {
416
+ /*
417
+ if the file was created then we have to save the filename and path
418
+ to use it when creating the jar
419
+ */
420
+ if ( FileExists ( tempUpdateManifestFileName ) ) {
421
+ setCustomManifest ( tempUpdateManifestFileName );
422
+ }
423
+
424
+ // not needed here any more
410
425
/* if ( FileExists( tempUpdateManifestFileName ) ) {
411
426
fileDelete( tempUpdateManifestFileName );
412
427
} */
0 commit comments