aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven, Ant and GJC - a gripe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven, Ant and GJC - a gripe" Watch "Maven, Ant and GJC - a gripe" New topic
Author

Maven, Ant and GJC - a gripe

Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

Today I needed to install Maven on my Raspberry PI (running Debian). I have used Ant for many many years but I know little or nothing about Maven so I decided to take the easy approach and install it using

sudo apt-get install maven

This looks to be valid but the list of dependencies is enormous and I noticed that one dependency is on GJC ! I hate GJC and make sure it is never installed. Now Maven depends on Ant and it turns out that the GJC dependency actually comes from Ant being installed! Why the heck should Ant depend by default on GJC ?

Anyway - some searching found http://blog.tube42.se/?p=254 which shows how to make Ant not depend on GJC and from that it is a simple extrapolation to

sudo apt-get --no-install-recommends install ant

which seems to work.

I feel a bit better having got that off my chest.






Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10265
    
168

For me the simplest approach for installing Java related things on Linux has always been downloading the .zip binaries from their download sites and just extracting them.

Specifically for Maven, I don't remember having any problem with the installation. From what I remember, it didn't even ask me for an Ant installation.

[My Blog] [JavaRanch Journal]
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

Jaikiran Pai wrote:For me the simplest approach for installing Java related things on Linux has always been downloading the .zip binaries from their download sites and just extracting them.

I normally do this but with simple Java packages I know what I am doing. Maven is a big beast and it seemed easiest to me just use the 'deb' package.

Specifically for Maven, I don't remember having any problem with the installation. From what I remember, it didn't even ask me for an Ant installation.

It doesn't single out Ant. It just gives a list of dependencies one of which happens to be Ant.

Looks like I'm going to have to spend some time learning about Maven since that is the way the world seems to be going.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16246
    
  21

I am a big fan of OS package managers. So big, in fact, that I have Maven create installable RPMs of my webapps.

However, when it comes to Java components and libraries such as Tomcat, Maven, and Ant, I avoid the OS packages like the plague and simply download and unzip.

The Maven zipfile is virtually self-contained. All it requires is an installed JDK and settings for JAVA_HOME and MAVEN_HOME. And, of course, enough room in your home directory to hold the cached dependencies as Maven pulls them in.

My bigger concern about doing Maven builds on a Raspberry Pi, isn't Maven, it's Java. Java is a pig and while the Pi packs a respectable amount of RAM for a computer that's practically cheap enough to hand out as party favors, it's not a speed machine. So while I expect it should all work, you may need some patience. Or, alternatively, do your development on a faster machine and download the finished artefacts into the Pi.


Customer surveys are for companies who didn't pay proper attention to begin with.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

Tim Holloway wrote:
However, when it comes to Java components and libraries such as Tomcat, Maven, and Ant, I avoid the OS packages like the plague and simply download and unzip.


For the most part, me too. I do install Tomcat using the package manager but then patch the installation so as to use my manually installed JDK.


The Maven zipfile is virtually self-contained. All it requires is an installed JDK and settings for JAVA_HOME and MAVEN_HOME. And, of course, enough room in your home directory to hold the cached dependencies as Maven pulls them in.

My bigger concern about doing Maven builds on a Raspberry Pi, isn't Maven, it's Java. Java is a pig and while the Pi packs a respectable amount of RAM for a computer that's practically cheap enough to hand out as party favors, it's not a speed machine.

I'm installing a Java GPIO library from source using the Maven and I could not see now to cross compile the JNI components on XUbuntu . Yes it took ages to build and yes it took a load of SD card memory but I won't be using the Pi as a general Java development machine.

Some time ago I ran Netbeans on the PI ! Boy was that painful !


So while I expect it should all work, you may need some patience. Or, alternatively, do your development on a faster machine and download the finished artefacts into the Pi.

All my Java development for the Pi is done on my Linux box with the Pi mounted through NFS and the jars pushed directly to the Pi from Netbeans. Works well !
 
Consider Paul's rocket mass heater.
 
subject: Maven, Ant and GJC - a gripe