users@jersey.java.net

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

From: Imran M Yousuf <imran_at_smartitengineering.com>
Date: Mon, 26 May 2008 13:51:35 +0600

Hi Paul,

I have sometimes faced similar problems in NB6.1 Maven projects. As NB uses
Maven 2.1.0-SNAPSHOT internally it sometime gives ghostly problems. One way
I got around in couple of cases is by using specific versions, especially
for the Compiler, Surefire plugins. It could be a similar problem.

Best regards,

Imran

On Mon, May 26, 2008 at 1:43 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

> Hi Martin,
>
> This looks really good. I agree with merging back to the trunk sooner
> rather than later. 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).
>
> 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?
>
> 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
>
>


-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran_at_smartitengineering.com
Mobile: +880-1711402557