Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Travis CI with Java without using ANT or Maven?

I have a very simple project, with just 8 Java files and a few images. No build tools, I just do javac in terminal. Is it possible to just build those? Otherwise, how would I convert my project to ANT or Maven? I'm confused, thanks.

like image 754
HiWorld Avatar asked Nov 08 '22 11:11

HiWorld


1 Answers

Build them to what? Does Travis create an executable JAR as the package?

I use Jenkins; not familiar with Travis. Any CI tool will need a script to execute.

Is it possible to just build those?

Yes, of course. If you want to ask Travis to run javac for you, by all means do so using whatever hooks it provides for you.

Otherwise, how would I convert my project to ANT or Maven?

If you're confused, start with Ant. You'd create a build.xml with the <javac> task. You won't have to change anything with your current project.

I'd recommend Maven, except for the fact that you're confused. Maven will help you with dependency management and lifecycle. You'd have to rearrange your project to conform to the Maven standard directory structure and create a pom.xml.

like image 125
duffymo Avatar answered Nov 14 '22 21:11

duffymo