geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <tim.mcco...@gmail.com>
Subject Re: car-maven-plugin and GEP
Date Thu, 01 Jan 2009 03:37:10 GMT
Hi bongosdude, yes you make a good point. I suppose my answer would depend on 
what exactly you're trying to accomplish. If you want to import existing J2EE 
artifacts into Eclipse my previous instructions obviously apply and will work. 
However, if you want to establish your development environment such that your 
J2EE artifacts will build successfully in both maven and Eclipse you might 
consider an approach that is somewhat similar to what we do for the GEP 
development. For the GEP we maintain both our maven files (e.g., pom.xml) and the 
Eclipse files (i.e., .classpath, .project files) in our SVN repository. This 
allows us to import our development projects into our Eclipse workspace and thus 
we operate directly on the artifacts/files (as they were extracted) from SVN. 
Some of these techniques are documented on our website here:

	-----> 
http://geronimo.apache.org/development-tools.html#DevelopmentTools-DevelopingGEPandGeronimo

These work very well for us, but I'm sure there are other alternatives that might 
work for you possibly using the maven Eclipse plugin that you mention, or maybe 
the m2eclipse plugin which seems to be heavily used. Does this help ??

bongosdude wrote:
> Tim,
> 
> I have verified that those steps you laid out work perfectly. However, my
> question is: there are two environments here that we have to manage: maven
> and GEP. Why does not the command: maven -Dwtpversion=1.5 eclipse:eclipse
> work here? When team members copy/paste sources into imported EAR projects,
> the team lose the synchronization with SVN repository. Or I am missing
> something here?
> 
> Thanks.
> 
> -B
> 
> 
> bongosdude wrote:
>> Tim,
>>
>> I got the latest source from geronimo svn trunk and step 4 works now. I
>> successfully deployed calculator using GEP as you described in step 4.
>>
>> Thanks
>>
>> B 
>>
>> bongosdude wrote:
>>> Tim
>>>
>>> Yes, this is what I am trying to do. 
>>>
>>> - Your step 4: what method should I use to test deploy of calculator.ear
>>> to my local geronimo-2.2-snapshot? It seems that GEP fails to know how to
>>> deploy to geronimo-2.2-snapshot runtime.
>>>
>>> Thanks
>>>
>>> B
>>>
>>> Tim McConnell wrote:
>>>> Hi bongosdude, here are the steps I used to accomplish this for the
>>>> "calculator" 
>>>> sample:
>>>>
>>>> 1.  Ensure that you have a Geronimo server defined in Eclipse (Trunk for
>>>> example)
>>>>
>>>> 2.  Build the 2.1.2 samples in maven
>>>>
>>>> 3.  In Eclipse, import the resulting EAR file from Step #2 (i.e., 
>>>> calculator-ear-2.1.2.ear) and be sure the runtime defined in Step #1 is
>>>> specified 
>>>>   as the target runtime. This will create three projects in Eclipse for
>>>> you: 
>>>> calculator-ear-2.1.2, calculator-ejb-2.1.2, calculator-war-2.1.2.
>>>>
>>>> 4.  Just to ensure that everything is working fine up to this point I
>>>> would go 
>>>> ahead and deploy the EAR file imported from Step #3 to your Geronimo
>>>> server 
>>>> defined in Step #1. Ensure that it deploys and then invoke the WAR file:
>>>>
>>>> 	-----> http://localhost:8080/calculator-war-2.1.2/
>>>>
>>>> 5. Undeploy the EAR file deployed in Step #4, and stop the server
>>>>
>>>> 6. Copy/Paste the three java files in SVN (i.e., in 
>>>> \samples\tags\samples-parent-2.1.2\samples\calculator\calculator-ejb\src\main\java\org\apache\geronimo\samples\slsb\calculator)

>>>> into the Eclipse package org.apache.geronimo.samples.slsb.calculator for
>>>> the 
>>>> calculator-ejb-2.1.2 project. This package should have been created for
>>>> you 
>>>> during the import in Step #3; if not, go ahead and create it yourself
>>>> prior to 
>>>> the Copy/Paste.
>>>>
>>>> 7.  For the calculator-war-2.1.2 project create this package: 
>>>> org.apache.geronimo.samples.calculator
>>>>
>>>> 8.  Copy/Paste the single java file in SVN (i.e., 
>>>> \samples\tags\samples-parent-2.1.2\samples\calculator\calculator-war\src\main\java\org\apache\geronimo\samples\calculator\
>>>> CalculatorServlet.java) into the package created in Step #7
>>>>
>>>> 9.  In Eclipse, add the calculator-ejb-2.1.2 project to the build path
>>>> for the 
>>>> calculator-war-2.1.2 project to ensure that everything builds
>>>>
>>>> 10.  To demonstrate that you can debug the source code, set a breakpoint
>>>> on line 
>>>> 56 of the CalculatorServlet.java source file
>>>>
>>>> 11.  Start the Geronimo server in "debug mode"
>>>>
>>>> 12.  Redeploy the calculator-ear-2.1.2 to Geronimo server
>>>>
>>>> 13.  Ensure that it deploys and then invoke the WAR file again:
>>>>
>>>> 	-----> http://localhost:8080/calculator-war-2.1.2/
>>>>
>>>> 14.  Finally, click the "add" or "multiple" Operation button on
>>>> resulting web 
>>>> page and the Eclipse debugger should stop at the breakpoint you set in
>>>> Step #10
>>>>
>>>> That's it !! Is this the information you're looking for though ?? If
>>>> not, please 
>>>> let me know. Thanks much and good luck !!
>>>>
>>>> bongosdude wrote:
>>>>> Tim,
>>>>>
>>>>> I would like to rephrase my question: How can I do to import the
>>>>> samples
>>>>> calculator into eclipse IDE and use GEP to debug, deploy and test? 
>>>>> (repository at
>>>>> https://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.1.2)?
>>>>>
>>>>> I can use maven outside eclipse to build, install the sample to local
>>>>> repository and deploy from console or from gshell. But I still do not
>>>>> know
>>>>> how I can import samples / projects that are set up with
>>>>> car-maven-plugin
>>>>> into eclipse?
>>>>>
>>>>> Thanks
>>>>> -B
>>>>>
>>>>>
>>>>> bongosdude wrote:
>>>>>> Hi Tim,
>>>>>>
>>>>>> I setup my project using maven car-maven-plugin (i.e. I looked at
the
>>>>>> sample calculator). To create eclipse plugin I ran the command
>>>>>>
>>>>>> mvn -Dwtpversion=1.5 eclipse:eclipse
>>>>>>
>>>>>> and then import the newly created eclipse project into eclipse IDE.
>>>>>> However, it seems that my eclipse GEP does not know how that those
>>>>>> projects are geronimo J2EE projects.
>>>>>>
>>>>>> Can you start from the geronimo  sample (bank, calculator...) and
show
>>>>>> us
>>>>>> how to import those sample into eclipse IDE, run a debug with WTP
>>>>>> local
>>>>>> server....
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> -B
>>>>>>
>>>>>> Tim McConnell wrote:
>>>>>>> Hi bongosdude, in the Trunk and 2.1.4 versions of the GEP there
has
>>>>>>> been
>>>>>>> a lot to 
>>>>>>> work to support Geronimo server plugins and custom assembles.
Some of
>>>>>>> these 
>>>>>>> capabilities have been documented below. You should be able to
do all
>>>>>>> your 
>>>>>>> development in the GEP and not have to maintain dual environments.
>>>>>>> From
>>>>>>> the GEP 
>>>>>>> you'll be able to create custom server assemblies and export
your
>>>>>>> Eclipse
>>>>>>> J2EE 
>>>>>>> projects as Geronimo plugins. Could you read the following and
>>>>>>> comment on
>>>>>>> whether 
>>>>>>> this meets your needs ?? If not, we need to determine what doesn't
>>>>>>> meet
>>>>>>> your 
>>>>>>> needs and analyze according. Thanks again.
>>>>>>>
>>>>>>> -----> 
>>>>>>> http://cwiki.apache.org/GMOxDOC22/convert-applications-into-plugins-using-gep.html
>>>>>>>
>>>>>>> bongosdude wrote:
>>>>>>>> I have learned quite a lot for the last two weeks about Geronimo.
>>>>>>>> Developing
>>>>>>>> J2EE applications has so many aspects and setting up environment
for
>>>>>>>> development, QA and deployment are 3 main areas that really
concerns
>>>>>>>> any
>>>>>>>> J2EE developers. I have followed steps by steps of many GEP
samples
>>>>>>>> and
>>>>>>>> tutorials through GEP eclipse plugin. Then I just learned
last week
>>>>>>>> from
>>>>>>>> this forum on how to setup J2EE projects with Maven using
>>>>>>>> car-maven-plugin.
>>>>>>>> I felt very confident toward Geronimo as my next J2EE platform.
>>>>>>>> Today I
>>>>>>>> would hope that someone can give me some guidance again on
how to
>>>>>>>> make
>>>>>>>> GEP
>>>>>>>> works with car-maven-plugin
>>>>>>>>
>>>>>>>> 1. I have successfully setup my J2EE projects by mimicking
and
>>>>>>>> looking
>>>>>>>> at
>>>>>>>> geronimo sample calculator. I have successfully deployed
my project
>>>>>>>> tomcat
>>>>>>>> plugin to my local geronimo server. I love maven and its
dependency
>>>>>>>> management.
>>>>>>>>
>>>>>>>> 2. However, now GEP does not know that my project is targeted
for
>>>>>>>> geronimo
>>>>>>>> local server. I can go to each of my sub project (war, ejb)
and turn
>>>>>>>> on
>>>>>>>> its
>>>>>>>> project facets and runtime settings for geronimo. But it
is quite
>>>>>>>> tedious
>>>>>>>> and that also means that I have to take care of two environments:
>>>>>>>> GEP
>>>>>>>> vs.
>>>>>>>> car-maven-plugin
>>>>>>>>
>>>>>>>> So my question is: "While it is good to setup maven J2EE
using
>>>>>>>> car-maven-plugin which is quite helpful for more real J2EE
projects,
>>>>>>>> developer would still love to use eclipse IDE to develop,
test
>>>>>>>> through
>>>>>>>> GEP?
>>>>>>>> Can car-maven-plugin be able to generate eclipse metadata
to target
>>>>>>>> its
>>>>>>>> sub
>>>>>>>> projects for geronimo runtime?"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks again for any helps.
>>>>>>>>
>>>>>>>> -B
>>>>>>>>
>>>>>>>> -----
>>>>>>>> B Amigo:super:
>>>>>
>>>>> -----
>>>>> B Amigo:super:
>>>>
>>>
>>
> 
> 
> -----
> B Amigo:super:

Mime
View raw message