The revision number gets defined by the build script in the "revision-number" target, which gets invoked whenever you run a build. Ultimately it just calls "svnversion" and uses that output as its input. So if you're not getting a version number, that probably means "svnversion" isn't working or available on your computer.
PS. I fixed the typo now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does the "build/REVISION" file exist ? If not, make sure that you ran the ANT build script, as I don't think Eclipse will run that by default. (I always build and test from the ANT script myself.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It doesn't exist if I build the project imported as noted above. It does if I manually run the ant-script but this seems to break the project (have to delete and recreate it for being able to run it) "main class koopa.app.Koopa not found" (the build directory stays empty [despite of the ]).
I've cleaned everything and started again, now with "New Java Project from an Ant Buildfile". First error: the project always try to find the files relative to the current workspace (can not be found) instead of the koopa root dir. This looks like an error to me but I don't know anything about ant files.
So starting again with a new workspace one above the koopa root. Result: error "existing with a different case" (the checkout was koopa but he wants Koopa). Another approach after changing the case results in a new project, when running the ant script getting "
D:\Entwicklung\Koopa\build.xml:29: Directory D:\Entwicklung\Koopa\build creation was not successful for an unknown reason"...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, but I think this is an Eclipse issue, or something about the way you import it into Eclipse.
Can you doublecheck that running ant clean build run-tests from the command line (in the root folder of koopa) works ? If so, then your problem is unlikely to lie with ANT.
(FYI. I didn't create my Eclipse workspace with the "from ANT buildfile" option. Just a regular Java project from an existing location. And I do full rebuilds from the command line, just because I find that easier. But if it's imported correctly you should be able to run the above targets through Eclipse as well. Just don't rely on the Eclipse's auto-build too much; that never worked reliably for me with all the intermediate code generation Eclipse knows nothing about.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can I suggest to add the information"import existing java project" and "build from command line via ant ..." to the developer part in the README (and close the ticket afterwards)?
Last edit: Simon Sobisch 2016-07-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The revision number gets defined by the build script in the "revision-number" target, which gets invoked whenever you run a build. Ultimately it just calls "svnversion" and uses that output as its input. So if you're not getting a version number, that probably means "svnversion" isn't working or available on your computer.
PS. I fixed the typo now.
svnversion works fine:
What I did:
svn checkout https://svn.code.sf.net/p/koopa/code/trunk D:\Entwicklung\koopa
%USERDATA%\workspace
)D:\Entwicklung\koopa
(added as koopa-new)Last edit: Simon Sobisch 2016-07-11
Does the "build/REVISION" file exist ? If not, make sure that you ran the ANT build script, as I don't think Eclipse will run that by default. (I always build and test from the ANT script myself.)
It doesn't exist if I build the project imported as noted above. It does if I manually run the ant-script but this seems to break the project (have to delete and recreate it for being able to run it) "main class koopa.app.Koopa not found" (the build directory stays empty [despite of the ]).
I've cleaned everything and started again, now with "New Java Project from an Ant Buildfile". First error: the project always try to find the files relative to the current workspace (can not be found) instead of the koopa root dir. This looks like an error to me but I don't know anything about ant files.
So starting again with a new workspace one above the koopa root. Result: error "existing with a different case" (the checkout was
koopa
but he wantsKoopa
). Another approach after changing the case results in a new project, when running the ant script getting "D:\Entwicklung\Koopa\build.xml:29: Directory D:\Entwicklung\Koopa\build creation was not successful for an unknown reason"...
I'm sorry, but I think this is an Eclipse issue, or something about the way you import it into Eclipse.
Can you doublecheck that running
ant clean build run-tests
from the command line (in the root folder of koopa) works ? If so, then your problem is unlikely to lie with ANT.(FYI. I didn't create my Eclipse workspace with the "from ANT buildfile" option. Just a regular Java project from an existing location. And I do full rebuilds from the command line, just because I find that easier. But if it's imported correctly you should be able to run the above targets through Eclipse as well. Just don't rely on the Eclipse's auto-build too much; that never worked reliably for me with all the intermediate code generation Eclipse knows nothing about.)
Results in
Setting
JAVA_HOME
before running the script from console works, but only if I change the active directory to koopa main before running the script.Well, as it says, you need a JDK installed. Right now you're using a JRE, which does not include the Java compiler.
Can I suggest to add the information"import existing java project" and "build from command line via ant ..." to the developer part in the README (and close the ticket afterwards)?
Last edit: Simon Sobisch 2016-07-11
Sure; next time I have to setup Eclipse I'll take notes for the README.