I'm trying to compile MRL.

I've downloaded ant and added to my path, same for ivy (which doesn't have a bin directory, but I've added the apache-ivy directory to the path).

Running ant dist starts to compile, but it outputs this error:

Also is there a wat to compile again from the stopped point? Running ant dist the compilations starts from scratch.

Thanks

kwatters

6 years 7 months ago

Hi scognito!

  It looks like you're on the path to building and installing from the master branch (manticore release)

So, a couple comments. 

1. the "javadoc" errors that you are seeing are really just warnings about missing or improper documentation on the java classes.  You can ignore those as they are not real errors.

2. the error you are seeing is actually with a unit test that was running.  The compilation succeeded and it failed to run the ApiFactoryTest.  I'm not sure why that failed, however if you look in the build directory you should see some testing artifacts/log files, in particular the one for the ApiFactoryTest.  If you open that file you might find some clues about what failed.

3. You can ignore a test by adding the annotation @Ignore (import org.junit.Ignore) to the junit test class.  There are a few other examples of this.

4. the ivy jar file would normally be placed in the directory where you installed "ant" in the <ant_install>/lib directory, but it looks like you've got that working (I suspect)

 

Some comments going forward.

We only use the master branch for patches and emergency fixes for the Manticore release.  All new work is happening on the "develop" branch.  The "develop" branch now builds using "maven"

So, if you do a 

"git checkout develop"  you should switch to the develop branch.. at that point , if you've installed maven and it's in your path, you should be able to run

"mvn clean install"   this will produce a Nixie build for you.  The build file will be located at target/myrobotlab.jar

If you want to skip the tests when producing the build you can run

"mvn clean install -DskipTests"  

 

Note, the "develop" branch no longer needs the "repo" checked out, you only need the myrobotlab project.  When importing the project to eclipse, make sure you "import existing maven projects",  this will find the "pom.xml" file and it should import everything and set up your eclipse environment "magically" for you.

 

Good luck & welcome to the myrobotlab developer club!

-Kevin

 

GroG

6 years 7 months ago

git clone https://github.com/MyRobotLab/myrobotlab.git
git clone https://github.com/MyRobotLab/repo.git

cd myrobotlab

ant jar

 

     [copy] Copying 1143 files to /home/gperry/mrl.test/master/myrobotlab/build/classes/resource
      [jar] Building jar: /home/gperry/mrl.test/master/myrobotlab/build/lib/myrobotlab.jar
 
BUILD SUCCESSFUL
Total time: 17 seconds
 

The 4 commands worked for me on Linux with OpenJDK after installing the javafx component with 

sudo apt-get install openjfx

If you using Oracle's JDK this comes automatically.

 

 

scognito

6 years 7 months ago

In reply to by GroG

Thank you both.

I decided to switch to develop branch: it compiles fine.

When running (I'm starting from target directory) it fails with "ImportError: No module named datetime" and other import problem.

 

Also, do I need each time I modify a java source run mvn clean ? Is there a faster way to compile without clean?

Thanks

tests might be failing - I think kwatters fixed this particular one ...
if you want to try the latest - do a pull

git pull

you can run maven and skip the tests 

mvn -DskipTests package