Android SDK error: Debug Certificate expired

If you get this error while attempting to start an app on your Android Emulator from the Android SDK in Eclipse:

Error generating final archive: Debug Certificate expired on [date/time]

…delete this file: ~/.android/debug.keystore – clean the app and redeploy. The Android SDK Eclipse plugin will regenerate the file when your app is rebuilt.

More info here.

Java EE7 Maven Dependency against Glassfish 4.x snapshot builds

Since upcoming changes and new features for EE7 are not yet published to Maven Central, you can build against the snapshot builds in the java.net repository. Add this to your pom.xml to add a reference to the java.net repo:

<repositories>
<repository>
<id>snapshot-repository.java.net</id>
<name>Java.net Snapshot Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>

To add dependencies against EE7 features, add a dependency to a latest Glassfish 4.0-x snapshot build which already includes early versions for some of the new EE7 features:

<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>javaee-api</artifactId>
<version>4.0-b33</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>javax.ejb</artifactId>
<version>4.0-b33</version>
</dependency>