Skip to content

Commit

Permalink
update now jar is being created
Browse files Browse the repository at this point in the history
  • Loading branch information
BalbinoOrtus committed Apr 26, 2022
1 parent 189d620 commit 4ecccd6
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/cfml/system/util/CompileDSL.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ component accessors=true {
var jarName = getJarNameString();
var currentProjectRoot = getProjectRoot();

/* var tempSrcFileName = tempDir & 'temp#createUUID()#.txt'; */
var tempSrcFileName = currentProjectRoot & 'temp#createUUID()#.txt';
var tempClassFileName = tempDir & 'temp#createUUID()#.txt';
/* var tempClassFileName = currentProjectRoot & 'temp#createUUID()#.txt'; */

var sourceFolders = [];
buildJarSourceFolders = fileSystemutil.resolvePath( variables.classOutputDirectory, getProjectRoot() );
Expand Down Expand Up @@ -355,8 +355,7 @@ component accessors=true {

try{
//writeTempSourceFile( tempSrcFileName,['D:\Javatest\greetings\classes\**.class'], ".class" );
//writeTempSourceFile( tempSrcFileName, sourceFolders, ".class" );
writeTempClassFiles( "D:\Javatest\test-new-01\ClassFile123456.txt",sourceFolders, ".class" );
writeTempClassFiles( tempClassFileName, sourceFolders, ".class" );

var jarClassString = createClassStringFromClassTextFiles()

Expand All @@ -367,18 +366,18 @@ component accessors=true {
//j = 'run "#getJavaBinFolder()#jar" --file #currentLibsDir##jarName# #getJarOptionsString()#';
//j = 'run "#getJavaBinFolder()#jar" --create --file #currentLibsDir#testX.jar "@#tempSrcFileName#" #getJarOptionsString()#';
if( !getCustomManifest().len() ) {
j = 'run ""#getJavaBinFolder()#jar" cf "#currentLibsDir##jarName#" "@#tempSrcFileName#" #getJarOptionsString()#"';
j = 'run ""#getJavaBinFolder()#jar" cf "#currentLibsDir##jarName#" "@#tempClassFileName#" #getJarOptionsString()#"';
} else {
j = 'run ""#getJavaBinFolder()#jar" cfm "#currentLibsDir##jarName#" "#variables.customManifest#" "@#tempSrcFileName#" #getJarOptionsString()#"';
j = 'run ""#getJavaBinFolder()#jar" cfm "#currentLibsDir##jarName#" "#variables.customManifest#" "@#tempClassFileName#" #getJarOptionsString()#"';
}
job.addLog( j );
//command( j ).run(echo=true);
//command( j ).run();
command( j ).run();

} finally {
/* if ( FileExists( tempSrcFileName ) ) {
fileDelete( tempSrcFileName );
} */
if ( FileExists( tempClassFileName ) ) {
fileDelete( tempClassFileName );
}
}


Expand Down

0 comments on commit 4ecccd6

Please sign in to comment.