Travis build fails #13

Closed
gbear605 opened this Issue Feb 12, 2016 · 2 comments

Projects

None yet

2 participants

@gbear605

I followed all the instructions in the readme for setting up this for https://github.com/Nashoba-Robotics/2016-Pre-Season-Drivetrain/tree/junit

ant test runs successfully on my computer.

Travis' log is

$ ant test

Buildfile: /home/travis/build/Nashoba-Robotics/2016-Pre-Season-Drivetrain/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/jtools/classloadertask/antlib.xml. It could not be found.

BUILD FAILED
/home/travis/build/Nashoba-Robotics/2016-Pre-Season-Drivetrain/build.xml:33: The following error occurred while executing this line:
/home/travis/build/Nashoba-Robotics/2016-Pre-Season-Drivetrain/lib/wpilib/java/current/ant/build.xml:12: classloader doesn't support the "loader" attribute

@michaelsilver
Member

Thanks for reaching out! The first thing I notice is that your lib folder does not have hamcrest-core-1.3.jar and junit-4.12.jar, which are referenced by the build.xml. Also, you need a test folder if you want to run unit tests (which is what ant test is meant to do). Try adding those jars to the lib folder and adding a test folder. Let me know how it goes!

Alternatively, since I see you don't have a test folder -- if you don't care about testing and only need Travis to compile your code for you, add the following as the last line of your .travis.yml:

script: ant compile

In that case, you won't need to add the jars or make a test folder.

@gbear605

It appears that my gitignore was set to ignore .jar files, which is obviously not the right thing to do with the lib files. This appears to have fixed it. Thanks for the help.

@gbear605 gbear605 closed this Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment