@@ -77,7 +77,7 @@ public void run() {
77
77
context .put ("vmLoc" , templateDir );
78
78
VelocityEngine ve = new VelocityEngine ();
79
79
Properties props = new Properties ();
80
- props .put ("velocimacro.library" , templateDir + File . separator + " macros.vm" );
80
+ props .put ("velocimacro.library" , templateDir + "/ macros.vm" );
81
81
props .put (RuntimeConstants .RESOURCE_LOADER , "classpath" );
82
82
props .put ("classpath.resource.loader.class" , ClasspathResourceLoader .class .getName ());
83
83
ve .init (props );
@@ -136,7 +136,7 @@ private boolean isExportable(Step step) {
136
136
*/
137
137
private void generateCode (VelocityEngine ve , String templateDir , File file ,
138
138
VelocityContext context ) {
139
- Template tm = ve .getTemplate (templateDir + File . separator + PIPELINE_TEMPLATE );
139
+ Template tm = ve .getTemplate (templateDir + "/" + PIPELINE_TEMPLATE );
140
140
StringWriter sw = new StringWriter ();
141
141
tm .merge (context , sw );
142
142
try (PrintWriter writer = new PrintWriter (file .getAbsolutePath (), "UTF-8" )) {
@@ -157,11 +157,11 @@ private void generateCode(VelocityEngine ve, String templateDir, File file,
157
157
*/
158
158
private void generateH (VelocityEngine ve , String templateDir , File file ,
159
159
VelocityContext context ) {
160
- Template tm = ve .getTemplate (templateDir + File . separator + PIPELINE_HTEMPLATE );
160
+ Template tm = ve .getTemplate (templateDir + "/" + PIPELINE_HTEMPLATE );
161
161
StringWriter sw = new StringWriter ();
162
162
tm .merge (context , sw );
163
163
try (PrintWriter writer = new PrintWriter (file .getParentFile ().getAbsolutePath ()
164
- + File . separator + file .getName ().replace (".cpp" , ".h" ), "UTF-8" )) {
164
+ + "/" + file .getName ().replace (".cpp" , ".h" ), "UTF-8" )) {
165
165
writer .println (sw );
166
166
} catch (UnsupportedEncodingException | FileNotFoundException e ) {
167
167
logger .log (Level .SEVERE , "Unable to write to file" , e );
0 commit comments