...
<repositories>
<repository>
<id>Sonatype-OSS</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>pl.iogreen.scalapi</groupId>
<artifactId>scalapi-lang</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
</dependencies>
...
Scalapi is my library pimping existing Java APIs (both JDK and popular 3rd parties libraries). Using Scala, I miss the enhancements that Groovy provides with its distribution. I'm using Scalapi in few of my projects and it makes my life easier so far.
Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts
Thursday, November 24, 2011
Scalapi 0.3.0 snapshots are now available in Sonatype repository
I pushed Scalapi 0.3.0 to the OSS sonatype snapshot repository. It makes easier to include snapshots artifacts of the Scalapi in the Maven projects.
Friday, November 18, 2011
How to create public Maven repository for free
I needed QuickFixJ 1.5.1 to be available for Maven dependency resolution. Official QuickFixJ repository doesn't contain the latest version of the projects artifacts. In order to allow the other people to build my QuickFixJ 1.5.1 related project I needed to put QuickFixJ libraries in Maven repository available via the Internet.
So I created my "private public" repository on the Google Code Project SVN server. This is approach I know from the Apache Camel extra project where we put missing dependencies from the 3rd parties this way. This is possible since Google Projects allows you to display the SVN repository of your project via the web browser. Useful and free of charge :) .
So I created my "private public" repository on the Google Code Project SVN server. This is approach I know from the Apache Camel extra project where we put missing dependencies from the 3rd parties this way. This is possible since Google Projects allows you to display the SVN repository of your project via the web browser. Useful and free of charge :) .
Friday, October 14, 2011
Starting up the Android project with android-maven plug-in
For some people (like me) all software projects must be Mavenized. Android projects are no exception from this rule.
The motivation behind using Maven with Android is:
- dependency management
- smooth integration with Maven lifecycle
- support for exisitng tools (Continious Integration, ProGuard obfuscator, Check Style, Find Bugs, JDepend, etc) via Maven plug-ins system
At first I created the Android project from the archetype...
mvn archetype:generate \ -DarchetypeArtifactId=android-quickstart \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion=1.0.6 \ -DgroupId=helloCompany \ -DartifactId=helloAndroid
...and then built it...
hekonsek@Drone:~$ cd tmp/helloAndroid hekonsek@Drone:~/tmp/helloAndroid$ mvn clean install ... [INFO] Installing /home/hekonsek/tmp/helloAndroid/target/helloAndroid-1.0-SNAPSHOT.apk to /home/hekonsek/.m2/repository/helloCompany/helloAndroid/1.0-SNAPSHOT/helloAndroid-1.0-SNAPSHOT.apk [INFO] Installing /home/hekonsek/tmp/helloAndroid/target/helloAndroid-1.0-SNAPSHOT.jar to /home/hekonsek/.m2/repository/helloCompany/helloAndroid/1.0-SNAPSHOT/helloAndroid-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Wed Oct 12 20:47:26 CEST 2011 [INFO] Final Memory: 42M/493M [INFO] ------------------------------------------------------------------------
At first glance everything went fine so we expect to have Android APK artefact packaged and ready to be deployed to the device. However when I try to do the latter I get the following error message:
hekonsek@Drone:~/tmp/helloAndroid$ mvn clean install android:deploy ... [INFO] 279 KB/s (14872 bytes in 0.051s) pkg: /data/local/tmp/helloAndroid-1.0-SNAPSHOT.apk Failure [INSTALL_FAILED_INVALID_APK] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------
I also tried to deploy the APK file manually (using the ADB tool) but Android emulator still claims that the package is broken. I assume then that the current android-quickstart archetype is broken.
My workaround for the broken android artefact is to download zipped samples from the android-maven plug-in site and use Scala example as a template for my new project. As a bonus, Scala sample comes with tests, Scala language support and ProGuard obfuscator configured.
Now just start your Android emulator, go to the directory of the project of yours, build the project and deploy it to the running emulator.
hekonsek@Drone:~$ cd jayway-maven-android-plugin-samples/scala
hekonsek@Drone:~/jayway-maven-android-plugin-samples/scala$ mvn clean install android:deploy
...
[INFO] [android:deploy {execution: default-cli}]
...
[INFO] 170 KB/s (8959 bytes in 0.051s)
pkg: /data/local/tmp/Scala-1.0.0-SNAPSHOT.apk
Success
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------
Now enjoy your new Android application deployed and running on the emulator.
Subscribe to:
Posts (Atom)