So I Don't Forget and Other Great Stories of Whoa

You might notice that the tags for this post are drastically different than my usual JS related posts (or the occasional video game post). It‘s that season where I sit at my desk and pontificate as I work. So I’m trying to capture some stuff and blogging. Welcome back to the blogosphere, self!

New Stuff'z

That's right android. Whoa. I love it. It‘s like I’m getting to wear the daddy pants after years of AS3 and JS. Real life threading, compiling, and build processes that aren‘t just some kid’s toy (That's right JS people TOYS.) Working with build engineers and getting an app to a finished, launchable sellable product is a major thrill. But these days I find myself googling a lot and surfing Stach Exchange even more.

Don't Forget This

Our project seems unique for an Android project for 2 main reasons: 1) we‘re using Intellij IDEA instead of Eclipse and 2) we’re using Maven instead of ANT for build management and dependency management. I did all the tuts and walkthroughs on google for Eclipse and ANT, and I‘ve got to say, I won’t go back&ellip; unless I‘m stuck on a future project that’s already gone done some other path for their own good reasons.

Like I said I keep googling some of the same old stuff lately. Particularly as it relates to Maven. So here's a handy reminder of a common task I find myself doing lately.

Installing a Local Maven Dependency

Maven has it‘s own dependency repo you can query (quite easy in Intellij if you know what you’re looking for and it‘s in the repo), we also have our own Artifactory host too. That’s another post one day. Right now, I just want to document how I downloaded a JAR from somewhere and added it to my local Maven repository and the project's pom.xml.

  1. Download the jar. We‘re adding Adobe Marketing Cloud (I think that’s right name. It's formerly Omniture. Go figure.)
  2. In the terminal:
1
2
//Some of these settings will depend on where the jar is and what your project's needs are.
mvn install:install-file -Dfile=admsAppLibrary.jar -Dgroup=com.adobe.adms -DartifactId=admsAppLibrary -Dversion=3.2.1 -Dpackaging=jar
  1. Add the new dependency to pom.xml
1
2
3
4
5
6
7
<!-- Make sure these values match the values used in the mvn install:install-file command -->
<dependency>
    <groupId>com.adobe.adms</groupId>
    <artifactId>admsAppLibrary</artifactId>
    <version>3.2.1</version>
    <scope>compile</scope>
</dependency>