Eskatos’s thoughts on JEE development

A maven plugin to repackage your java archives : jaroverlay-maven-plugin

Posted in jaroverlay-maven-plugin, maven by eskatos on August 3rd, 2008

In the Java EE 5 TutorialDevelopment Roles” chapter we can see the following three roles, from the code to the deployment :

  • Application Component Provider: “The application component provider is the company or person who creates web components, enterprise beans, applets, or application clients for use in Java EE applications.”
  • Application Assembler: “The application assembler is the company or person who receives application modules from component providers and assembles them into a Java EE application EAR file.”
  • Application Deployer and Administrator: “The application deployer and administrator is the company or person who configures and deploys the Java EE application …”

This page says that this is the Application Assembler job to configure the deployment descriptor before packaging the EAR.

Beside that, artifact produced by mavenized enterprise projects are EARs, already packaged. Plus, it often is the developer (or Application Component Provider) that write the packaging configuration.

Next comes the “configuration for deployment” time. Here, if deployment dependant configuration is in deployment descriptors you would have to unpack the EAR and possibly nested java archives (WARs and/or JARs) to get a hand on all deployment descriptors.

This task can be quite cumbersome and time consuming (really dumb too). (more…)

asadmin-maven-plugin-0.2 released

Posted in asadmin-maven-plugin by eskatos on July 20th, 2008

I released the second version of asadmin-maven-plugin today.

It added the following features :

  • Issue#1: support for maven projects with “ejb” packaging
  • support for (un)deploying to remote glassfish instance (thanks to Larry Sanderson that provided the patch)

The following issues were fixed :

  • Issue#2: asadmin is not found when only glassfishHome is specified and glassfishHome/bin not in PATH (thanks to streifi that provided a patch)
  • Issue#3: asadmin:start-domain hangs on windows (thanks again to streifi)

Go to the project’s page for more information.

Tagged with: , ,

Maven plugins for Glassfish ecosystem

Posted in asadmin-maven-plugin by eskatos on March 28th, 2008

This post is only a snapshot of what is available at the time of writing to use Glassfish from maven., seen from the perspective of a simple maven plugin developer (simple plugin or simple developer ?).

Before beginning asadmin-maven-plugin, I searched and tried several ways to use Glassfish from maven. Main use case is simply deployment and undeployment of applications.

There are two ways to do this “programmatically” :

  • using the asadmin command, Glassfish specific,
  • and using the JSR-88 api, app-server agnostic

(more…)

Tagged with: , , ,

A repository for asadmin-maven-plugin

Posted in asadmin-maven-plugin by eskatos on March 26th, 2008

To ease the use of asadmin-maven-plugin I have set up a public repository that you can add to your maven settings / poms / proxies for maven to be able to download the plugin automagically.

The repositories are :

Here is the xml snippet you could add to your pom.xml file :

    <pluginRepositories>
        <pluginRepository>
            <id>asadmin-maven-plugin-releases-repository</id>
            <name>asadmin-maven-plugin-releases-repository</name>
            <url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/releases</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>asadmin-maven-plugin-snapshots-repository</id>
            <name>asadmin-maven-plugin-snapshots-repository</name>
            <url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/snapshots</url>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
    </pluginRepositories>

Plus, if you browse the source tree you’ll find two exemple projects, a WAR and an EAR, that use this plugin.

Tagged with: , , ,

A simple maven plugin for Glassfish: asadmin-maven-plugin

Posted in asadmin-maven-plugin by eskatos on March 24th, 2008

To seamlessly use Glassfish from maven projects, JSR-88 seems to be answer. The cargo maven plugin has JSR-88 support planned but this will take time.

I published some days ago a maven plugin that simply wraps the asadmin command and aims to provide maven integration for starting, stopping glassfish and deploying and undeploying applications and modules.

Go to the Google Code page of asadmin-maven-plugin to download a preview version named asadmin-maven-plugin-0.1-SNAPSHOT : http://code.google.com/p/asadmin-maven-plugin/

The api is designed for easy extensibility so feel free to submit contributions !
(more…)

Tagged with: , ,

Building an EJB3 app using GlassFish v2, Maven2 and NetBeans 6

Posted in Various Links by eskatos on October 10th, 2007

In an article explicitly titled Building an EJB 3.0 application using GlassFish v2, Apache Maven 2 and NetBeans IDE 6.0, Jacek Laskowski explain in detail how Netbeans 6 can be used by maven users willing to use GlassFish as an EJB3 container.

I’m currently doing these type of things with Netbeans 6 but I didn’t know it was feasible with so few command line maven invocations.

Tagged with: , , , , ,