RE: Searching for good j2ee example
Ok, my in my project i use ejb3, jboss 4.2.*, jsf. My request is for migrate from netbeans to maven. I have a lot of difficult to do this migration and a sea of dubt. I know I need to mudularize my project but i don't know how exactly. Martin Gainty wrote: it would be helpful to know what the ear is supposed to accomplish web-service? connection-pooling? also which AppServer ar you deploying to? WebLogic? JBoss? Websphere? Resin? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 3 Dec 2008 17:26:57 + Subject: Re: Re: Searching for good j2ee example From: [EMAIL PROTECTED] To: users@maven.apache.org Hi Mario, What specific examples are you after/what information do you need? What have you tried so far? Happy to help, but I don't see much point in just sending over a whole bunch of poms and associated configuration files. Cheers, Martijn On Dec 3, 2008 4:02pm, Mario Alsini [EMAIL PROTECTED] wrote: Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 -- View this message in context: http://n2.nabble.com/Searching-for-good-j2ee-example-tp1609248p1612769.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: Searching for good j2ee example
Hi Mario, We personally use Jboss 4.3.0.GA and a small amount of EJB2.1 and lots of Spring configured POJOs, we also have a servlet or two (WAR), JCA connectors (RAR) and a service archive that we're trying to phase out (SAR). The first thing you must have clear in your mind/layout is that Maven produces one artifact per POM. So we for example have a separate pom for the JAR, WAR, RAR, EAR etc. Start by building a project that builds your POJOs and their associated unit tests. Then take a look at the WAR plugin to see how you can take the JSF etc and build a WAR. Then take a look at the EAR plugin to see how you can bring it all together. Remember a separate pom for each of these. Definitely Read: http://books.sonatype.com/maven-book/ and BetterBuildsWithMaven.pdf (just search for this via Google) They're both relatively short documents that provide a massive amount of help and understanding. Then look at the appropriate plugins on the Maven site, eg ear, war, assembly. Their documentation is fairly clear. Good luck! On Dec 4, 2008 9:00am, Mario Alsini [EMAIL PROTECTED] wrote: Ok, my in my project i use ejb3, jboss 4.2.*, jsf. My request is for migrate from netbeans to maven. I have a lot of difficult to do this migration and a sea of dubt. I know I need to mudularize my project but i don't know how exactly. Martin Gainty wrote: it would be helpful to know what the ear is supposed to accomplish web-service? connection-pooling? also which AppServer ar you deploying to? WebLogic? JBoss? Websphere? Resin? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 3 Dec 2008 17:26:57 + Subject: Re: Re: Searching for good j2ee example From: [EMAIL PROTECTED] To: users@maven.apache.org Hi Mario, What specific examples are you after/what information do you need? What have you tried so far? Happy to help, but I don't see much point in just sending over a whole bunch of poms and associated configuration files. Cheers, Martijn On Dec 3, 2008 4:02pm, Mario Alsini wrote: Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 -- View this message in context: http://n2.nabble.com/Searching-for-good-j2ee-example-tp1609248p1612769.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: Searching for good j2ee example
Hi Martin, can you please give me which your project is? So I can study a real example. I already read the 2 books bat for me it isn't simple. With a real exsample it'll be better. martijnverburg wrote: Hi Mario, We personally use Jboss 4.3.0.GA and a small amount of EJB2.1 and lots of Spring configured POJOs, we also have a servlet or two (WAR), JCA connectors (RAR) and a service archive that we're trying to phase out (SAR). The first thing you must have clear in your mind/layout is that Maven produces one artifact per POM. So we for example have a separate pom for the JAR, WAR, RAR, EAR etc. Start by building a project that builds your POJOs and their associated unit tests. Then take a look at the WAR plugin to see how you can take the JSF etc and build a WAR. Then take a look at the EAR plugin to see how you can bring it all together. Remember a separate pom for each of these. Definitely Read: http://books.sonatype.com/maven-book/ and BetterBuildsWithMaven.pdf (just search for this via Google) They're both relatively short documents that provide a massive amount of help and understanding. Then look at the appropriate plugins on the Maven site, eg ear, war, assembly. Their documentation is fairly clear. Good luck! On Dec 4, 2008 9:00am, Mario Alsini [EMAIL PROTECTED] wrote: Ok, my in my project i use ejb3, jboss 4.2.*, jsf. My request is for migrate from netbeans to maven. I have a lot of difficult to do this migration and a sea of dubt. I know I need to mudularize my project but i don't know how exactly. Martin Gainty wrote: it would be helpful to know what the ear is supposed to accomplish web-service? connection-pooling? also which AppServer ar you deploying to? WebLogic? JBoss? Websphere? Resin? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 3 Dec 2008 17:26:57 + Subject: Re: Re: Searching for good j2ee example From: [EMAIL PROTECTED] To: users@maven.apache.org Hi Mario, What specific examples are you after/what information do you need? What have you tried so far? Happy to help, but I don't see much point in just sending over a whole bunch of poms and associated configuration files. Cheers, Martijn On Dec 3, 2008 4:02pm, Mario Alsini wrote: Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008 -- View this message in context: http://n2.nabble.com/Searching-for-good-j2ee-example-tp1609248p1612769.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http
Re: Re: RE: Searching for good j2ee example
I'll post this to everyone as people can search this archive and maybe get some help from it. Disclaimer: I am NOT a Maven expert, I'm sure there are several best practices that I'm breaking here, so take this with a grain of salt please. OK, let's start with the basics, you'll need a project layout something similar to this: projectname /ejb /environment /jar /war /ear distribution.xml pom.xml project.properties Each of those sub directories will be maven projects in their own right. The pom.xml at the root of the project is a parent pom that can wrap it all together and provide some environmentalisation for it. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdorg.martijnverburg/groupId artifactIdmartijnverburg-parent/artifactId version0.0.1/version packagingpom/packaging namemartijnverburg : Parent Project/name modules modulejar/module moduleejb/module modulewar/module moduleear/module /modules build plugins plugin artifactIdmaven-assembly-plugin/artifactId configuration finalNamemartijnverburg-${server}-${env}/finalName filters filterproject.properties/filter filterenvironment/${server}/${env}/environment.properties/filter /filters descriptors descriptordistribution.xml/descriptor /descriptors /configuration /plugin /plugins /build /project A Couple of Notes: 1,) project.properties is a hint to you that you need to think about have environmentalised builds. A file like project.properties is a _very_ simple step towards this. Normally you would use build profiles or (as we do) use several environment properties files (we reference which ones we want by passing in -D parameter on the command line, as you can see we pass in the $server and $env variables). You may not need this. 2,) distribution.xml is used for assembly purposes, see the maven:assembly plugin for details. We use this as we not only distribute an EAR but also several configuration files as part of out project. You may not need this. In the next post I'll go through the jar project/pom, for dealing with your POJOs Cheers, Martijn On Dec 4, 2008 1:53pm, Mario Alsini [EMAIL PROTECTED] wrote: Hi Martin, can you please give me which your project is? So I can study a real example. I already read the 2 books bat for me it isn't simple. With a real exsample it'll be better.
Re: Re: Re: RE: Searching for good j2ee example
OK, the directory structure of you project under the jar directory will probably look something like this: src/main/java src/main/resources src//test/java src/test/resources OK, the next part, a POM for your POJOs ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmartijnverburg/groupId artifactIdmartijnverburg-jar/artifactId packagingjar/packaging version0.0.1/version namemartijnverburg : jar/name build !-- We want to do some filtering on our config files -- resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource /resources filters !-- The filters live here -- filter../../project.properties/filter filter../module.properties/filter /filters plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.0/version /plugin /plugins /build dependencies !-- Logging library -- dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.14/version scopeprovided/scope /dependency /dependency .. .. .. Lots more dependencies /dependencies /project Our real POM is actually massive with all sorts of code coverage plugins, test plugins, reporting plugins, developer and license info etc etc. But you can pick up most of that from the maven docs on the website. Right, Have a go at build that first and let us know how you get on. We can then walk through the WAR and EAR poms/projects. Cheers, Martijn On Dec 4, 2008 2:17pm, [EMAIL PROTECTED] wrote: I'll post this to everyone as people can search this archive and maybe get some help from it. Disclaimer: I am NOT a Maven expert, I'm sure there are several best practices that I'm breaking here, so take this with a grain of salt please. OK, let's start with the basics, you'll need a project layout something similar to this: projectname /ejb /environment /jar /war /ear distribution.xml pom.xml project.properties Each of those sub directories will be maven projects in their own right. The pom.xml at the root of the project is a parent pom that can wrap it all together and provide some environmentalisation for it. http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; 4.0.0modelVersion org.martijnverburggroupId martijnverburg-parent 0.0.1 pom martijnverburg : Parent Project jar ejb war ear maven-assembly-plugin martijnverburg-${server}-${env} project.propertiesfilter environment/${server}/${env}/environment.properties/filter distribution.xmldescriptor A Couple of Notes: 1,) project.properties is a hint to you that you need to think about have environmentalised builds. A file like project.properties is a _very_ simple step towards this. Normally you would use build profiles or (as we do) use several environment properties files (we reference which ones we want by passing in -D parameter on the command line, as you can see we pass in the $server and $env variables). You may not need this. 2,) distribution.xml is used for assembly purposes, see the maven:assembly plugin for details. We use this as we not only distribute an EAR but also several configuration files as part of out project. You may not need this. In the next post I'll go through the jar project/pom, for dealing with your POJOs Cheers, Martijn On Dec 4, 2008 1:53pm, Mario Alsini [EMAIL PROTECTED] wrote: Hi Martin, can you please give me which your project is? So I can study a real example. I already read the 2 books bat for me it isn't simple. With a real exsample it'll be better.
Searching for good j2ee example
Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Searching for good j2ee example
What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini [EMAIL PROTECTED] wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Searching for good j2ee example
Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini [EMAIL PROTECTED] wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Searching for good j2ee example
Hi Mario, What specific examples are you after/what information do you need? What have you tried so far? Happy to help, but I don't see much point in just sending over a whole bunch of poms and associated configuration files. Cheers, Martijn On Dec 3, 2008 4:02pm, Mario Alsini [EMAIL PROTECTED] wrote: Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Searching for good j2ee example
it would be helpful to know what the ear is supposed to accomplish web-service? connection-pooling? also which AppServer ar you deploying to? WebLogic? JBoss? Websphere? Resin? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 3 Dec 2008 17:26:57 + Subject: Re: Re: Searching for good j2ee example From: [EMAIL PROTECTED] To: users@maven.apache.org Hi Mario, What specific examples are you after/what information do you need? What have you tried so far? Happy to help, but I don't see much point in just sending over a whole bunch of poms and associated configuration files. Cheers, Martijn On Dec 3, 2008 4:02pm, Mario Alsini [EMAIL PROTECTED] wrote: Is not important the domani of the j2ee project. I need a project with several module. In my project, for example, for now in netbeans form, i use ejb, jsf war, plain text client ... Thank you! karianna wrote: What sort of things are you after? We build several EARs in our project (which contain SAR, RAR, WAR, HAR, SAR etc) On Dec 3, 2008 3:21pm, Mario Alsini wrote: Hello, i need to see an example of medium j2ee project well done with maven. -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20814960.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Searching-for-good-j2ee-example-tp20814960p20815798.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008