Duke
Duke copied to clipboard
Get rid of duke.properties in favour of the manifest
The jar file manifest contains the same information, so there's really no reason to maintain the duke.properties file. However, getting rid of it is a little harder than it seems, because the integration tests need it. Line 163 in IT.java fails if we remove duke.properties:
private Result runjava(String klass, String args) throws IOException {
String jar = "target/duke-" + Duke.getVersion() + ".jar"; // THIS IS LINE 163
String cmd = "java -cp " + jar + " no.priv.garshol.duke." + klass +
" " + args;
return run(cmd);
}
A branch named pull-155 has been created to work on this and the work is completed there except for this one issue.
This file has been causing me issues. I wasn't able to export a runnable JAR and have the duke.properties file included in the main class hierarchy. It got added underneath the resources path instead. I got it to work by opening up the JAR as a zip and just moving the file. Is there something special I need to do to have it included in the JAR export (using eclipse)?