Friday, 24 December 2010

XMas for hudson users

Done maven3 support branch in hudson has been merged in master : https://github.com/hudson/hudson .
The maven native plugin will now supports maven 3 builds too.

It will be part of the next release 1.392.

Until it's released you will find a build here : http://people.apache.org/~olamy/hudson/main-maven3-support/hudson.war
To test it it's as simple as :
wget http://people.apache.org/~olamy/hudson/main-maven3-support/hudson.war -O hudson.war

So have Fun and nice XMas !!
--
Olivier

Monday, 20 December 2010

Using gwt sdk 2.1.1 with Gwt Maven Plugin 2.1.0-1

In the last Gwt Maven Plugin, the gwt sdk used is now the one defined in the Maven plugin dependencies.
This means only update your pom dependencies to gwt 2.1.1 won't be enough to compile your project with the last Gwt Sdk version.
To override the Gwt Sdk version used by the Maven plugin, you must add the following configuration :
I'm sure you follow good pratices and have put the version in a property :P

<project>
....
<properties>
<gwt.version>2.1.1</gwt.version>
</properties>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.1.0-1</version>
.....
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
</dependencies>
.....
</project>


Have Fun !

Wednesday, 15 December 2010

Fast update with groovy to use maven 3.0 in Hudson

As you are an early adopter and want to try the maven3 native support branch in hudson.
See previous blog entry Maven 3 support in Hudson Maven Plugin
If you have a maven installation called maven-3.0, just run the simple groovy script in your console :

prjs = hudson.model.Hudson.getInstance().getItems( hudson.maven.MavenModuleSet.class );
prjs.each{module -> println(module.maven= "maven-3.0")}

And that's it all your maven native plugin hudson jobs will use your maven installation called maven-3.0 .

Monday, 13 December 2010

Maven 3 support in Hudson Maven Plugin

You have developped hudson plugins using the maven-plugin or you are an early adopter user : so this blog entry is for you !

Some stuff has been done in a branch called main-maven3-support [1] in github to support maven 3 in the Hudson native maven plugin.
The plugin now supports both maven 2 and maven 3.
Note the pom parsing to detect modules now use the maven 3 apis. (ProjectBuilder maven component [2])
You don't have something to install (just choose the maven version for your maven build) the plugin will detect which maven version is used for the maven build and use differents implementation to "listen" the build.

To test it, you can build it .
First build the embedder (note this will move to github soon)

svn co https://svn.java.net/svn/hudson~svn/trunk/hudson/lib/hudson-maven-embedder
cd hudson-maven-embedder
mvn clean install -DskipTests

Then build hudson from the branch

git clone https://github.com/hudson/hudson.git
git checkout main-maven3-support
mvn clean install -DskipTests

And hudson.war is in war/target/hudson.war

I have pushed builds here : http://olamy.googlecode.com/files/hudson.war

Currently : maven2 build on master node doesn't work (under work !)

We need you for more testing and nice feedback (before merging this to master)

You can follow what's happened in the dedicated jira entry : http://issues.hudson-ci.org/browse/HUDSON-4988

Have Fun !
--
Olivier

[1] https://github.com/hudson/hudson/commits/main-maven3-support
[2] http://maven.apache.org/ref/3.0.1/maven-core/apidocs/org/apache/maven/project/ProjectBuilder.html

Monday, 6 December 2010

Gwt Maven Plugin 2.1.0-1 Released

The Gwt Maven Plugin 2.1.0-1 has been released.

38 issues has been fixed (full changelog).

New features :

* AppEngine Launch
* Css Interface Generator
* More Gwt compiler options : -compileReport, -optimize, -XsoycDetailed, -strict (see the mojo Compile Mojo)
* Compiler Report
* @RemoteServiceRelativePath annotation processing

To use it :

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.1.0-1</version>
</plugin>


Web Site : http://mojo.codehaus.org/gwt-maven-plugin/

Have Fun !
--
Olivier

Friday, 3 December 2010

Gwt Maven Plugin 2.1.0-1 Staged

Yeah ! The Gwt Maven Plugin 2.1.0-1 has been staged (and release vote started [1] )

Release Notes : http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11860&version=16878

Staging repo : https://nexus.codehaus.org/content/repositories/orgcodehausmojo-047/

Documentation site : http://mojo.codehaus.org/gwt-maven-plugin

What's new in this release : http://mojo.codehaus.org/gwt-maven-plugin/whats_new.html

If you have any trouble please load an issue in jira : http://jira.codehaus.org/browse/MGWT .

Have Fun and push a +1 !

[1] http://goo.gl/DeJue

Friday, 26 November 2010

What's new in the coming Gwt Maven Plugin 2.1.1

The coming Gwt Maven Plugin 2.1.1 will have new features.

This stuff is currently available as 2.1.1-SNAPSHOT in the codehaus repo : https://nexus.codehaus.org/content/groups/snapshots-group/

Running your application in debug mode with AppEngine Launcher

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.1.1-SNAPSHOT</version>
<configuration>
<server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
</configuration>
</plugin>
</plugins>
</build>


See appengine-launcher

Css Interface Generator

See Css Interface Generator

More Gwt compiler options
-compileReport, -optimize, -XsoycDetailed, -strict (see Documentation )

Compiler Report
To have link to the Gwt compiler report in your Maven generated web site
See Compiler Report

Full changelog

Do not hesitate to test and send feedback.
Thanks !

Friday, 5 November 2010

Release Maven Gwt Plugin 2.1.0 (gwt 2.1.0 compatible)

Hi Folks,
The gwt maven plugin version 2.1.0 has been released.
The major change is to be gwt 2.1.0 compatible.

Release Notes - Maven 2.x GWT Plugin - Version 2.1.0

New Feature
  • [MGWT-181] -Add support for GWT compilers -workDir option
  • [MGWT-190] - support GWT 2.1
  • [MGWT-218] - Support for setting the -runStyle parameter for gwt:test
Sub-task
  • [MGWT-191] - gwt:run runs Hosted Mode instead of Dev Mode for GWT 2.1.0.M1
Bug

  • [MGWT-110] - Generated interface not identical to interface generated by GWT tooling
  • [MGWT-111] - gwt:run - Multi-module projects with custom start page not well supported
  • [MGWT-118] - GWT Compile fails with IBM JDK
  • [MGWT-129] - Multi module projects doesn't work properly in HostedMode.
  • [MGWT-142] - java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler when running plugin on Mac
  • [MGWT-147] - GWT modules with inherited entry point are never compiled
  • [MGWT-149] - generateAsync fails with ParseException (ignoring servicePattern?)
  • [MGWT-151] - skip compile when model file not contain entry point.
  • [MGWT-152] - Incorrect documenation on the Maven site
  • [MGWT-155] - Documentation on GWTTesting is incorrect/Broken link
  • [MGWT-161] - gwt-maven-plugin does not work with spaces in project location on Linux
  • [MGWT-164] - Inheriting module does not inherit its <entry-point> or <servlet> definitions
  • [MGWT-165] - scanning for .gwt.xml files doesn't take into account all source roots
  • [MGWT-171] - ServicePattern is ignored
  • [MGWT-183] - Cannot compile a module that inherits a module with entry points
  • [MGWT-186] - Generic Interface is not generated correctly
  • [MGWT-187] - "utility module" detection is incorrect
  • [MGWT-189] - .class files get copied into WEB-INF/classes without package structure
  • [MGWT-198] - AbstractGwtShellMojo hides failure information when executing the compiler process
  • [MGWT-201] - Sources directories in inherited modules are ignored
  • [MGWT-223] - i18n fails under Eclipse with m2eclipse
  • [MGWT-228] - When running with GWT 2.1.0 the plugin require gwt-dev-<platform> jars
Improvement

  • [MGWT-62] - Possibly bind gwt:compile to the 'prepare-package' phase by default in 'war' projects (maven 2.1)
  • [MGWT-76] - Solution for multi module builds and hosted mode
  • [MGWT-88] - Add mergedWebXml parameter to MergeWebXmlMojo
  • [MGWT-128] - Allow specifying custom environment variables for run/debug goals
  • [MGWT-146] - Explicit setup mode setting
  • [MGWT-148] - Compile also when GWT module file has changed
  • [MGWT-154] - GenerateAsync generate files with unused imports
  • [MGWT-162] - Support for server=n
  • [MGWT-169] - support devmode for multiple modules
  • [MGWT-170] - Find source jars and add them to the classpath when executing the GWT compiler
  • [MGWT-172] - generateAsync suporting "com.google.gwt.http.client.Request" return objects
  • [MGWT-178] - No messages if a module doesn't contain entry points
  • [MGWT-180] - Add Option for bindAddress
  • [MGWT-194] - Update documentation for /war in GWT 2.0.x
  • [MGWT-195] - create documentation for 'comfortable GWT debugging'
  • [MGWT-225] - Update BCEL dependency to fix the broken pom.
Task
  • [MGWT-188] - Update FAQ re: "NoSuchMethodError"
Have Fun !
--
Olivier Lamy on behalf of the The Maven Team

PS : pushing open source release is fun The famous song :-)

Monday, 1 November 2010

Open Source song :-)

The famous french singer jcfrog has made a nice song on Open Source :-)


Check out the other one on twitter : http://www.youtube.com/watch?v=oetmdgPRyqw

I hope we will have one for ASF

Have Fun !

-Olivier

Thursday, 21 October 2010

Apache Maven Site Plugin 3.0-beta-3 for maven 3

The Maven team is pleased to announce the release of the Maven Site Plugin, version 3.0-beta-3 for Maven 3.
This version is intended to be the version of the Maven Site Plugin for Maven 3.

The Site Plugin is used to generate a site for the project.

You should specify the version in the section of your project's POM:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>
</plugin>

Release Notes - Maven 3.x Site Plugin - Version 3.0-beta-3


Bug
  • [MSITE-500] - Warning message about missing report plugin version shows null instead of plugin groupId:aritfactId
  • [MSITE-504] - Maven site fails to run due to non-report goals
  • [MSITE-505] - Unable to use SVN SCM wagon to upload a site
  • [MSITE-506] - Maven3 conflict with plexus-archiver
  • [MSITE-507] - report plugin doesn't have dependencies section coming from build section configuration
  • [MSITE-508] - attach-descriptor goals leaks file handlers, causing sporadic build failures when gpg tries to sign descriptor during release
  • [MSITE-512] - [Regression] Configuration of m-javadoc-p at reportSet level is not taken into account

Task
  • [MSITE-513] - use release final maven 3.0 artifacts

Have Fun !
--
Olivier Lamy on behalf of the The Maven Team

Monday, 18 October 2010

Maven Selenium Plugin 1.1 (Maven 3 compatible)

Hi,
The Maven Selenium Plugin 1.1 version has been released.
The most important fix is the Maven 3 compatibility !

Improvement
Don't miss to update the version in your pom

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.1</version>
</plugin>

Have Fun !

Saturday, 9 October 2010

Tomcat Maven Plugin 1.1 Released

Tomcat Maven Plugin 1.1 has been released.
Site documentation : http://mojo.codehaus.org/tomcat-maven-plugin/.

Here the release notes :

Bug
  • [MTOMCAT-55] - Can't shutdown tomcat started with tomcat:run with fork=true
  • [MTOMCAT-57] - Secondary war files deployed with incorrect context path
Improvement
  • [MTOMCAT-63] - Make isWar() check consistent with MTOMCAT-23
  • [MTOMCAT-64] - Document how to change the Embedded Tomcat Version
  • [MTOMCAT-65] - Upgrade Tomcat to 6.0.29

Have Fun !

Sunday, 3 October 2010

Hudson Maven Dependency Update Trigger : First Hudson plugin with maven 3 apis

I have made the first release of the Maven Dependency Update Trigger hudson plugin.
Wiki page here : http://wiki.hudson-ci.org//x/jgfDAg
This plugin will check according to the cron expression if your SNAPSHOT dependencies has been updated and (optionnaly) check if your plugins SNAPSHOT has been updated too. And trigger a build if necessary.
This is usefull if you have project dependencies not in the same hudson instance or using an other continuous integration tool.
Note this plugin use maven 3 apis to build maven projects and check dependencies.
Hudson 1.379 is required to use this plugin.



So have fun and give me feedbacks.

Wednesday, 22 September 2010

Use maven 3 apis in a hudson plugin

Using maven 3 apis in a hudson needs to change classLoader hierarchy as hudson load some old maven artifacts in the parent classLoader.
So the solution is to use a child first classLoader.
This new classLoader has been introduced in hudson 1.378. (see HUDSON-5360).
So you can now use it to made your plugin dependencies win on hudson core classLoader.
Some steps are needed.
Configuring your hpi plugin

<plugin>
<groupid>org.jvnet.hudson.tools</groupid>
<artifactid>maven-hpi-plugin</artifactid>
<version>1.54</version>
<configuration>
<pluginFirstClassLoader>true</pluginFirstClassLoader>
</configuration>
</plugin>

So now your pluginWrapper.classLoader will be of type PluginFirstClassLoader.

// pluginId is project.artifactId from your plugin pom
PluginWrapper pluginWrapper = Hudson.getInstance().getPluginManager().getPlugin( pluginId );
PluginFirstClassLoader pluginFirstClassLoader = (PluginFirstClassLoader) pluginWrapper.classLoader;


Now everthing is ready but some other tricks are needed :-)

Create a PlexusContainer (note you must use the new "plexus-guice" bridge).
This means you need the following dependency :

<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
<version>1.4.1</version>
</dependency>

And very important you must exclude dependencies from the original plexus-container

<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-connector-wagon</artifactId>
<version>${aetherVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>


To prevent this you can add an enforcer rule which will chech plexus-container-default inclusion

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-beta-1</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
<id>ensure-no-plexus-container</id>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.codehaus.plexus:plexus-container-default</exclude>
</excludes>
<message>
ensure-no-plexus-container doesn't work anymore with maven 3 librairies. you have to add some exclusions.
</message>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>


How to create the PlexusContainer from the PluginFirstClassLoader :

private PlexusContainer getPlexusContainer(PluginFirstClassLoader pluginFirstClassLoader) throws PlexusContainerException {
DefaultContainerConfiguration conf = new DefaultContainerConfiguration();
ClassWorld world = new ClassWorld();
ClassRealm classRealm = new ClassRealm( world, "project-building", pluginFirstClassLoader );
// olamy yup hackish but it's needed for plexus-shim which needs a URLClassLoader and PluginFirstClassLoader is not
for ( URL url : pluginFirstClassLoader.getURLs() )
{
classRealm.addURL( url );
LOGGER.fine( "add url " + url.toExternalForm() );
}
conf.setRealm( classRealm );

return new DefaultPlexusContainer( conf );
}


Then set the current Thread classLoader (don't miss to restore the original one in a finally statement

PlexusContainer plexusContainer = getPlexusContainer( pluginFirstClassLoader );

Thread.currentThread().setContextClassLoader( plexusContainer.getContainerRealm() );


Now you can play with maven 3 apis

ProjectBuilder projectBuilder = plexusContainer.lookup( ProjectBuilder.class );


A first sample is the plugin called : maven-dependency-update-trigger
: sources and Wiki Page (under construction :-) )
You must have a look at the dependencies used.

The plugin will check your project according to a cron expression and schedule a build if a snapshot dependency has changed (dependency and plugin).

It will be released as son as hudson 1.378 will be released.

Note : hpi:run doesn't work yet for this plugin as it needs some changes in the hpi mojo to handle the new PluginFirstClassLoader.

Thursday, 9 September 2010

Searching new challenge

Hi,
I'm currently searching new challenge for my work life.
And why not a kind of new life.
If you don't know me : my work or my opensource life.
You will find a resume here http://people.apache.org/~olamy/resume/.
Note as I'm a opensource/maven addict it's in a maven format.
The license is very flexible.
So feel free to fork or distribute this resume :-).

--
Olivier

Maven site plugin 3.0-beta-2 for maven release

Hi,
A new version of the maven-site-plugin for maven 3 has been released.
See announce [ANN] Release Maven Site Plugin 3.0-beta-2 for maven 3.
It works only with last core beta-3.

Have Fun !
--
Olivier