Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make multeval.sh run from arbitrary working directory - via build.xml #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@
<zipfileset src="lib/jannopts.jar" excludes="META-INF/*" />
<zipfileset src="lib/guava-11.0.jar" excludes="META-INF/*" />

<!-- JARs are braindead regarding CLASSPATH
<manifest>
<attribute name="Main-Class"
value="multeval.MultEval"/>
<attribute name="Main-Class"
value="multeval.MultEval"/>
<attribute name="Implementation-Version"
value="${version}"/>
<!-- JARs are braindead regarding CLASSPATH
<attribute name="Class-Path"
value="lib/tercom-0.7.26.jar:lib/meteor-1.2/meteor-1.2.jar"/>
</manifest>
-->
</manifest>

</jar>
</target>
</project>
Expand Down
18 changes: 9 additions & 9 deletions src/multeval/MultEval.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ static int initThreads(final List<Metric<?>> metrics, int threads) {
return threads;
}

private static String loadVersion() throws IOException {
Properties props = new Properties();
FileInputStream in = new FileInputStream("constants");
props.load(in);
in.close();
String version = props.getProperty("version");
return version;
}
// private static String loadVersion() throws IOException {
// Properties props = new Properties();
// FileInputStream in = new FileInputStream("constants");
// props.load(in);
// in.close();
// String version = props.getProperty("version");
// return version;
// }

public static void main(String[] args) throws ConfigurationException, IOException,
InterruptedException {

String version = loadVersion();
String version = MultEval.class.getPackage().getImplementationVersion();
System.err.println(String.format("MultEval V%s\n", version) +
"By Jonathan Clark\n" +
"Using Libraries: METEOR (Michael Denkowski) and TER (Matthew Snover)\n");
Expand Down