Adding jars to your OpenShift remote Maven repo

If your OpenShift app has dependencies on other Jars that are not publicly available in the usual maven repos (for example, other Jars from your own projects), you can push them to your remote Maven repo used when your app builds remotely.

Commit the jar in the root of your OpenShift project.

Edit .openshift/action_hooks/pre_build and add the following, updating Jar name etc:

mvn install:install-file --debug -Dfile=../../YourProjectName/runtime/repo/YourJarName.jar
  -DgeneratePom=true -DartifactId=YourArtifactName -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar

Commit your changes and push to OpenShift – the jar will get installed to your remote repo, and now you can add a Maven dependency against it in your project’s pom.xml.

Accessing Glassfish server admin when you’ve forgotten your admin password

For my own development I frequently rotate between different app servers and different versions, Tomcat, JBoss AS, Glassfish, trouble is when you work with one for a while and then go back to one of the others, you forget key things, like what your admin password was when you last installed/configured a server.

Whatever the reason, there’s a few different approaches to working around this issue with Glassfish, like creating a new domain and copy files from the old to the new, but this question on has the best lifesaver response ever… this file has a backup password that you can use for your admin account, even if you have no idea what your original password was – just copy the value from this file:


Running Dropbox on Linux

Given that the Linux version of Dropbox installs itself to .dropbox-dist in your home dir, I often forget where it is (?) or how to start it.

Install instructions – here.

Start service running:

cd .dropbox-dist

Or to run in background:


Leave running after logoff:

nohup ./dropboxd& > dropbox.out