users@jersey.java.net

Re: [Jersey] Mavenizing Jersey - first steps done - contribs and helloworld samples

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Mon, 26 May 2008 11:38:13 +0200

On Mon, 2008-05-26 at 09:43 +0200, Paul Sandoz wrote:
> Hi Martin,
>
> This looks really good. I agree with merging back to the trunk sooner
> rather than later.
What prevents us from doing this right now?

> In the interim period we just need to make sure we
> can produce the same bits directly using ant [*] (i am currently
> depending on the NB ant project for development).
What do you mean with "produce the same bits directly using ant?

As I read in Adam Bien's blog [1] integration of maven into NB is really
smooth. Did you try to open the mavenized jersey project from the branch
with NB?


>
> Re: the use of PackagesResourceConfig. I thought this would be the
> case :-) I wonder if there is anything we could do with respect to
> maven to simply the configuration, e.g. a Jersey maven plugin that
> executes using say the Grizzly container?
Perhaps a grizzly-maven-plugin would be sufficient, if one could specify
appropriate configuration...?

Cheers,
Martin


[1] http://www.adam-bien.com/roller/abien/entry/netbeans_stairway_to_maven

>
> Paul.
>
> [*] BTW when i run the spring-contrib unit tests on the command line
> things work fine, but when i run them in NBs some fail, i have no
> idea why...
>
>
> On May 25, 2008, at 5:45 PM, Martin Grotzke wrote:
>
> > Hi,
> >
> > the first steps of mavenising jersey are done: I created a new branch
> > [1] and changed the main project structure:
> > |-- jersey
> > |-- repo
> > `-- www
> >
> > The jersey folder represents the parent jersey project that
> > contains the
> > modules "contrib", "jersey" and "samples". One can invoke `mvn
> > install`
> > to build and install the whole project with all modules.
> >
> > The directory structure and maven groupId/artifactId below trunk/
> > jersey
> > looks like this:
> >
> > |-- contribs
> > | |-- pom.xml (groupId=com.sun.jersey, artifactId=jersey-contribs)
> > | `-- spring
> > | |-- pom.xml (groupId=com.sun.jersey, artifactId=jersey-spring)
> > |-- jersey
> > | |-- maven
> > | | |-- pom.xml (groupId=com.sun.jersey, artifactId=jersey)
> > |-- pom.xml (groupId=com.sun.jersey, artifactId=jersey-project)
> > `-- samples
> > |-- helloworld
> > | |-- pom.xml (groupId=com.sun.jersey.samples,
> > artifactId=helloworld)
> > |-- helloworld-webapp
> > | |-- pom.xml (groupId=com.sun.jersey.samples,
> > artifactId=helloworld-webapp)
> > `-- pom.xml (groupId=com.sun.jersey.samples, artifactId=jersey-
> > samples)
> >
> > The jersey-project pom.xml is not really complete, information like
> > scm,
> > reporting, distributionManagement etc. is still missing.
> >
> > I decided not to rename jersey to modules, IMHO this should be done
> > when
> > jersey is split into several modules.
> >
> > The helloworld sample is the example taken from
> > jersey/examples/HelloWorld, I only copied java classes and
> > README.html.
> > For beeing able to the helloworld Main class with the exec-maven-
> > plugin
> > I had to change Main.java to create an HttpHandler with an appropriate
> > PackagesResourceConfig.
> > The helloworld app now can be run via `mvn compile exec:java`, I
> > updated
> > README.html accordingly.
> >
> > The helloworld-webapp sample is the example taken from
> > jersey/examples/HelloWorldWebApp, I only copied the
> > HelloWorldResource.java, web.xml and README.html.
> > I extended web.xml with the PackageResourceConfig.
> > The helloworld-webapp can be run via `mvn jetty:run`, I updated
> > README.html to reflect this change.
> >
> > This should be a good start to convert examples to a maven build.
> >
> > To keep these changes in sync with upcoming commits (for jersey)
> > IMHO it
> > would be the best to merge changes back into the trunk. Then all
> > examples can be mavenized under samples, after that jersey/examples
> > can
> > be removed.
> >
> > Once this is finished we can start breaking up jersey into modules.
> >
> > What do you think?
> >
> > Cheers,
> > Martin
> >
> >
> > [1] https://jersey.dev.java.net/svn/jersey/branches/mavenize-jersey
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net