Menu

#63 Update README with dev setup info (was: revision unkown)

v1.0 (example)
open
nobody
None
5
2016-08-01
2016-07-11
No

Despite of the typo (should be revision unknown): How to fix this (it's a fresh svn checkout)?

Discussion

  • KrisDS

    KrisDS - 2016-07-11

    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.

     
  • Simon Sobisch

    Simon Sobisch - 2016-07-11

    svnversion works fine:

    D:\Entwicklung\koopa>svnversion
    347M
    

    What I did:

    • svn checkout https://svn.code.sf.net/p/koopa/code/trunk D:\Entwicklung\koopa
    • started eclipse (workspace is %USERDATA%\workspace)
    • Import existing project D:\Entwicklung\koopa (added as koopa-new)
    • clicked on "run" -> Java Application-> Koopa
     

    Last edit: Simon Sobisch 2016-07-11
  • KrisDS

    KrisDS - 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.)

     
  • Simon Sobisch

    Simon Sobisch - 2016-07-11

    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"...

     
  • KrisDS

    KrisDS - 2016-07-11

    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.)

     
    • Simon Sobisch

      Simon Sobisch - 2016-07-11

      Results in

      Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.0_91\lib\tools.jar
      Buildfile: D:\Entwicklung\Koopa\build.xml
           [echo] 
           [echo]         Please make sure JAVA5_BOOTCLASSES is set to a valid Java 5 bootstrap classpath.
           [echo]         You may get builds which are not compatible with java 5 otherwise.
           [echo]     
      
      clean:
         [delete] Deleting directory D:\Entwicklung\Koopa\build
      
      clean:
      
      core-build:
          [mkdir] Created dir: D:\Entwicklung\Koopa\build
      
      revision-number:
      
      core-compile:
           [echo] Compiling Koopa's core...
      
      BUILD FAILED
      D:\Entwicklung\Koopa\build.xml:34: Unable to find a javac compiler;
      com.sun.tools.javac.Main is not on the classpath.
      Perhaps JAVA_HOME does not point to the JDK.
      It is currently set to "C:\Program Files\Java\jre1.8.0_91"
      
      Total time: 0 seconds
      

      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.

       
      • KrisDS

        KrisDS - 2016-07-11

        Well, as it says, you need a JDK installed. Right now you're using a JRE, which does not include the Java compiler.

         
  • Simon Sobisch

    Simon Sobisch - 2016-07-11

    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
    • KrisDS

      KrisDS - 2016-07-11

      Sure; next time I have to setup Eclipse I'll take notes for the README.

       
  • KrisDS

    KrisDS - 2016-08-01
    • summary: revision unkown --> Update README with dev setup info (was: revision unkown)
     

Log in to post a comment.