Skip to content

Commit 8f7fd9b

Browse files
committed
fixed the update manifest, now created jar has modifications
1 parent 7ae9220 commit 8f7fd9b

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

src/cfml/system/util/CompileDSL.cfc

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ component accessors=true {
9999
}
100100

101101
function toJar( string jarName='' ) {
102-
setJarNameString( jarName );
102+
if( jarName.len() ) {
103+
setJarNameString( jarName );
104+
}
103105
setCreateJar( true );
104106
return this;
105107
}
@@ -119,10 +121,11 @@ component accessors=true {
119121
return this;
120122
}
121123

122-
function addToManifest( required string customManifest ) {
124+
//no longer needed
125+
/* function addToManifest( required string customManifest ) {
123126
setCustomManifest( fileSystemutil.resolvePath( customManifest, getProjectRoot() ) );
124127
return this;
125-
}
128+
} */
126129

127130
function manifest( required struct customParams ) {
128131
setCustomManifestParams( customParams );
@@ -288,13 +291,15 @@ component accessors=true {
288291

289292
}
290293
jarName &= word & ".jar";
291-
setJarNameString( jarName );
292-
//job.addLog( ' jarName= #jarName# ' );
293294

294295
}
295296

296297
}
297298

299+
setJarNameString( jarName );
300+
//job.addLog( ' jarName= #jarName# ' );
301+
//job.addLog( ' jarName*= #getJarNameString()# ' );
302+
298303
job.complete();
299304

300305
try{
@@ -308,12 +313,13 @@ component accessors=true {
308313
//j = 'run "#getJavaBinFolder()#jar" --file #currentLibsDir##jarName# #getJarOptionsString()#';
309314
//j = 'run "#getJavaBinFolder()#jar" --create --file #currentLibsDir#testX.jar "@#tempSrcFileName#" #getJarOptionsString()#';
310315
if( !getCustomManifest().len() ) {
311-
j = 'run ""#getJavaBinFolder()#jar" cf "#currentLibsDir#\#jarName#" "@#tempSrcFileName#" #getJarOptionsString()#"';
316+
j = 'run ""#getJavaBinFolder()#jar" cf "#currentLibsDir##jarName#" "@#tempSrcFileName#" #getJarOptionsString()#"';
312317
} 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()#"';
314319
}
315320
job.addLog( j );
316-
command( j ).run(echo=true);
321+
//command( j ).run(echo=true);
322+
command( j ).run();
317323

318324
} finally {
319325
if ( FileExists( tempSrcFileName ) ) {
@@ -339,7 +345,7 @@ component accessors=true {
339345

340346
j = 'run ""#getJavaBinFolder()#jar" uf "#currentLibsDir##jarName#" -C #currentResourcePath# . "'
341347

342-
job.addLog( j );
348+
//job.addLog( j );
343349
//command( j ).run(echo=true);
344350
command( j ).run();
345351

@@ -407,6 +413,15 @@ component accessors=true {
407413
try {
408414
writeUpdateManifestFile( tempUpdateManifestFileName, paramStruct );
409415
} 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
410425
/* if ( FileExists( tempUpdateManifestFileName ) ) {
411426
fileDelete( tempUpdateManifestFileName );
412427
} */

0 commit comments

Comments
 (0)