Wednesday, 26 October 2011

Archiva 1.4-M1 released

The Apache Archiva 1.4-M1 has been released.
Some nice features added:

  • It is now possible to create a staging repository for any managed repository and later merge the results.

  • You can now use REST services to control Archiva or search for artifacts. See REST Services for more information.

  • Database storage for repository metadata has been replaced with a JCR repository based on Apache Jackrabbit by default (other options such as a flat-file storage may be made available in the future).

  • The search interface provide now the capability to search on OSGI metadata (based on the update of the Apache Maven Indexer library).

  • You can now download Maven index content from remote repositories to include artifacts which are not present locally in your search results



Full release notes available here: http://archiva.apache.org/docs/1.4-M1/release-notes.html

Download page: http://archiva.apache.org/download.html

Have Fun and some nice new features will come soon :-)

Apache Archiva, Archiva, Apache Maven, Maven, Apache are trademarks of The Apache Software Foundation.

Friday, 21 October 2011

Apache Tomcat Maven Plugin Features

Recently I posted some informations regarding the move from codehaus to ASF of the Tomcat Maven plugin and about the support of tomcat7 in trunk code.

So now in this post, I'd like to talk of the features I prefer.

Run goal in multi modules with Maven3


Usually with Apache Maven, your application code is splitted in some modules to respect the Separation Of Concern paradigm.
Something like :

root
pom.xml
foo-api
pom.xml
foo-impl
pom.xml
foo-webapp
pom.xml

So to test your webapp module you have to install all other modules first which is time/io consuming.
Now with Apache Maven 3 and the Tomcat Maven Plugin (from Codehaus version 1.1 or now the 2.0-SNAPSHOT from Apache), you can simple use the goal run from the root directory and the plugin will see various modules build output and include those automatically in the embeded tomcat in the webapp class loader.

Build a standalone executable war/jar


You can now build a standalone jar which will contains Apache Tomcat needed classes and your wars.
See documentation.
This will produce a similar jar as for the Jenkins distribution.
At the end you will be able to run the produced jar with a simple:

java -jar yourjar


And that's will start Apache Tomcat without need of any installations !

NOTE: it's very recent feature based on my need :-)
So all issues/feedback or some RFE are really welcome!

Have Fun!
--
Olivier



Apache Maven, Maven, Apache Tomcat, Tomcat, Apache are trademarks of The Apache Software Foundation.

Sunday, 9 October 2011

Tomcat Maven Plugin now supports tomcat7

Hello,
After moving the Tomcat Maven Plugin from Codehaus to Apache in the Tomcat land (see previous post), I have found some time to start hacking on it.
The first feature I wanted to add was support of Apache Tomcat 7.x. So it's now implemented in trunk.
You can test it see how to configure that in your poms: http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html.

NOTE the important changes with the move to Apache and the support of Apache Tomcat 7.x:

  • You know have two "mojos": tomcat6:* and tomcat7:$

  • The groupId is now: org.apache.tomcat.maven

  • All goals are not supported: I will work on that :-)



So you can know use tomcat7 in embedded way within your Apache Maven build with: tomcat7:run.

Feel free to report any issues: https://issues.apache.org/jira/browse/MTOMCAT

Have Fun!

Apache Maven, Maven, Apache Tomcat, Tomcat, Apache are trademarks of The Apache Software Foundation.

Monday, 3 October 2011

New default http(s) transport layer in maven core 3.x

In the current maven core dev trunk, we have recently replace the http(s) transport layer from lightweight wagon (based on default jdk http(s) mechanism) to the wagon http module based on Apache httpclient [1].

See related post.

This change include two improvements:
* connection pool mechanism (to avoid http(s) connection recreation for each artifacts download).
* preemptive authz mechanism which will prevent uploading artifacts twice.

As it's important change in the core distribution, we like to have some feedbacks from users a SNAPSHOT distribution (based on rev 1178324) is available here : http://people.apache.org/~olamy/core/maven-3-r1178324/

mvn -v display: Apache Maven 3.0.4-SNAPSHOT (r1178324; 2011-10-03 10:07:26+0200)

An other way to test it with maven3 is to download the shaded jar [2] and copy it in $M2_HOME/lib/ext.

Feel free to test it and report any issues you will have with this new default http(s) transport layer.


Thanks in advance for your testing time and have fun !
--
Olivier

[1] http://hc.apache.org/httpcomponents-client-ga/index.html
[2] http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.0/wagon-http-2.0-shaded.jar

Thursday, 29 September 2011

Apache Maven Wagon 2.0 released

Apache Maven Wagon 2.0 has been released with some nice fixes/features.
See full changelog

The most important features are :
* using http(s) connection pooling: see my previous post.
* support of preemptive authentication: yes this will prevent your artifacts to be uploaded twice (as it was done until this release)

You can test that now. Download the shaded jar: wagon-http-2.0-shaded.jar and put it in your $M2_HOME/lib/ext (for maven 3+)

Note this version will part of Apache Maven official distribution in the next 3.0.4 release.

Have Fun !
--
Olivier

Apache Maven, Maven, Apache are trademarks of The Apache Software Foundation.

Saturday, 17 September 2011

Maven Download time Improvement

While working a bit on wagon (the api used in Apache Maven to download/upload artifacts), I wanted to reduce the http(s) connection creation number (see WAGON-348).
The current embedded http wagon in Maven Core is the lightweight one based on standard java libraries, this means http(s) connection are created for each download requests. As you know this socket creation can be time and resources consuming.
So as we are working on wagon 2.0 version, I have added a connection pooling mechanism in the wagon http (which is now based on Apache Http Client).
To prevent some classloading issues, the wagon jar to used is a shaded one.
You can test that now (with a maven 3.x version) with adding the jar in $M2_HOME/lib/ext/ :

wget -O wagon-http-2.0-SNAPSHOT-shaded.jar "https://repository.apache.org/content/groups/snapshots-group/org/apache/maven/wagon/wagon-http/2.0-SNAPSHOT/wagon-http-2.0-20110917.172345-31-shaded.jar"
&& cp wagon-http-2.0-SNAPSHOT-shaded.jar $M2_HOME/lib/ext/


Test build available here : http://people.apache.org/~olamy/maven/.

So a little improvement, don't be afraid you still will have time to drink one or two coffee when building a maven project :-).
Note download time will be improved if you use more than one repositories and especially https repositories.

Vote here if you want to have this in next maven core release : http://jira.codehaus.org/browse/MNG-5175.

And all feedbacks will be appreciate :-) (even if it's an issue :-) )

Have Fun !
--
Olivier

Apache Maven, Maven, Apache are trademarks of The Apache Software Foundation.

Thursday, 8 September 2011

Tomcat Maven Plugin New Home at Apache Software Foundation

The Tomcat Maven Plugin has now a new Home at Apache Software Foundation.
The home is located here .
You will find some details on :

  • Sources location

  • Bug Tracker location



Some more cleanups need to be done to finish the Apache Branding.
Next steps (new features) will be :

  • Support of Apache Tomcat7 trough a new mojo : tomcat7:*

  • New mojo to be able to build an executable war with an embedded tomcat inside to be able to do : java -jar mywar.war



All feedbacks will be appreciate.
Have Fun.

Apache Maven, Maven, Apache Tomcat, Tomcat, Apache are trademarks of The Apache Software Foundation.