Moving away from Google Maps

Nothing lasts forever and Google Maps free accounts are no exception. They of course have a “free tier” and as long as your usage doesn’t go above a threshold you won’t be charged. I don’t like that risk, so we’re done google maps.

So where to? open street map, the open source equivalent of mapping data. When maps are free, fewer people get lost.

The journey begins. Leaflet.js is a non map specific library which is similar enough to GoogleMaps to make the transition easy. One gotcha I found was that GoogleMaps can automatically handle being resized and it will adjust the internal map center when the map element changes size. Leaflet.js requires calling “map.invalidateSize()” to realign the internal map. Easy fix. Otherwise OSM has been really great. The nice thing is, if something doesn’t exist on the map you can easily go add it.

So long Google Maps, it was fun while it lasted.

Adding Maven to an ANT project

For this addition, I had the following stipulations:

  1. Leave existing structure alone. Source/resource/etc directories must be left alone
  2. This won’t be the primary build method so the output, target, directory can be anywhere
  3. No existing test directory so this can be anywhere

I opted to create a new empty Maven project using IntelliJ and then copied over the existing source directory.

Create new Project

  • groupId“, this is your primary object path. Something like: “com.yourcompany”, “org.mozilla”, or “org.apache.maven.plugins”
  • artifactId“, this is the name of the project. Apache’s compiler plugin is “maven-compiler-plugin”.

This will generate an empty project with a src/main/, and src/test directories. This is the default Maven structure and for my project these aren’t going to work. I have to keep the existing object structure so existing scripts will continue to function correctly after this addition. If you open the pom.xml file you’ll see something like this:


Copy Over Source

After the empty project was created I needed to delete the conflicting source directory “src”. Then I copied over the one I has all the important stuff in it.

To use a non default Maven source directory I had to add a build section under project and then two tags to specify the build source and test source directories. The resulting pom.xml file looked like this:



Exclude files from build

It was fairly easy to ignore files and directories once I used the maven compiler plugin. For the regular expressions, the paths are relative to the src directory, so if you want to ignore something in “”, you can put “**”. Here’s the pom addition, note this goes inside “<plugins>” which is inside the “<build>” tag.



  • Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
    • Fixed by removing MAVEN_OPTS environment variable. Reference