HiWorld
HiWorld

Reputation: 73

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.

Upvotes: 5

Views: 342

Answers (1)

duffymo
duffymo

Reputation: 308813

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.

Upvotes: 1

Related Questions