You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Sachin Patel <sp...@gmail.com> on 2006/11/03 15:29:19 UTC
Improve 'Geronimo' Development
So since I've been working on Geronimo, one of the most annoying
things developing Geronimo in an IDE is the overhead involved between
modifing code and being able to test the code. For a single line
change you have to rebuild and install the module, rebuild the
assembly, and re-extract and relaunch the server image. This is
needed since Geronimo loads classes from the server repository and
currently cannot from the local m2 repo or from the "target/classes"
directory itself.
Well to ease the developer experience I think we need to change
that. As a first step, I'd like to see if we can hook into geronimo
a "developers module" that the repository code can delegate over to
to load from the m2 repo. That itself would be an improvement and
developers could simply rebuild the module without having to regen a
new assembly. A step beyond that would be the ability to treat the
source tree as a repo, and geronimo load directly from target/
classes, this is tricker since the modules in the source tree don't
follow a groupId/artifact/version/type convention so some sort of
intelligent mapping would have to be done. In theory, this would
give us the ability to simply compile a module (with an IDE compiler
and not maven) and simply re-start the server.
Would this be an effort that would be valuable to the community?
If so, if there are suggestions on how to go about implementing
either the first or second solution, please give your input.
thx
-sachin
Re: Improve 'Geronimo' Development
Posted by Jason Dillon <ja...@planet57.com>.
FYI, some of this can be achieved once we re-organize modules, so
that each tree of modules represents related modules that need to be
built together. Then a set of mvn commands can build parts faster...
for example, if all ActiveMQ related modules were in a top-level
components/activemq module, then one might be able to:
mvn -f components/activemq/pom.xml
mvn -f assemblies/pom.xml
If dependencies are organized correctly then, this should update all
activemq related modules for the server.
But to do more optimizations may be much more work, as it requires
fixing all of the maven plugins, and maybe even some of maven to skip
steps when they are deemed up to date.
--jason
On Nov 6, 2006, at 2:33 AM, Vamsavardhana Reddy wrote:
> Testing code changes in G was and still is a painfully long
> process. Testing changes to admin console is ok(?) to some
> extent. I use Eclipse for development. Some changes could be
> tested quickly while using remote debug, but, you can not be sure
> which ones and once the IDE complains "Hot code replacement failed"
> or you disconnect the debugger, the server needs to be built
> again. Sometimes a build will fail since Eclipse knocks-out xml-
> beans classes and at this stage the only option is to do a
> rebuild. We should also consider some improvements to the build
> process so that the module that is modified can be specified as a
> parameter to the build command and it will build only those modules/
> configs that need to be built for the changes to get reflected in
> the server. IMHO, any improvement in this aspect of G (to be able
> to test changes quickly) will have a dramatic improvement in the
> productivity of G Developers.
>
> --vamsi
>
> On 11/3/06, Sachin Patel <sp...@gmail.com> wrote:
> So since I've been working on Geronimo, one of the most annoying
> things developing Geronimo in an IDE is the overhead involved
> between modifing code and being able to test the code. For a
> single line change you have to rebuild and install the module,
> rebuild the assembly, and re-extract and relaunch the server
> image. This is needed since Geronimo loads classes from the server
> repository and currently cannot from the local m2 repo or from the
> "target/classes" directory itself.
>
> Well to ease the developer experience I think we need to change
> that. As a first step, I'd like to see if we can hook into
> geronimo a "developers module" that the repository code can
> delegate over to to load from the m2 repo. That itself would be an
> improvement and developers could simply rebuild the module without
> having to regen a new assembly. A step beyond that would be the
> ability to treat the source tree as a repo, and geronimo load
> directly from target/classes, this is tricker since the modules in
> the source tree don't follow a groupId/artifact/version/type
> convention so some sort of intelligent mapping would have to be
> done. In theory, this would give us the ability to simply compile
> a module (with an IDE compiler and not maven) and simply re-start
> the server.
>
> Would this be an effort that would be valuable to the community?
>
> If so, if there are suggestions on how to go about implementing
> either the first or second solution, please give your input.
>
> thx
>
> -sachin
>
>
>
Re: Improve 'Geronimo' Development
Posted by Vamsavardhana Reddy <c1...@gmail.com>.
Testing code changes in G was and still is a painfully long process.
Testing changes to admin console is ok(?) to some extent. I use Eclipse for
development. Some changes could be tested quickly while using remote debug,
but, you can not be sure which ones and once the IDE complains "Hot code
replacement failed" or you disconnect the debugger, the server needs to be
built again. Sometimes a build will fail since Eclipse knocks-out xml-beans
classes and at this stage the only option is to do a rebuild. We should
also consider some improvements to the build process so that the module that
is modified can be specified as a parameter to the build command and it will
build only those modules/configs that need to be built for the changes to
get reflected in the server. IMHO, any improvement in this aspect of G (to
be able to test changes quickly) will have a dramatic improvement in the
productivity of G Developers.
--vamsi
On 11/3/06, Sachin Patel <sp...@gmail.com> wrote:
>
> So since I've been working on Geronimo, one of the most annoying things
> developing Geronimo in an IDE is the overhead involved between modifing code
> and being able to test the code. For a single line change you have to
> rebuild and install the module, rebuild the assembly, and re-extract and
> relaunch the server image. This is needed since Geronimo loads classes from
> the server repository and currently cannot from the local m2 repo or from
> the "target/classes" directory itself.
> Well to ease the developer experience I think we need to change that. As
> a first step, I'd like to see if we can hook into geronimo a "developers
> module" that the repository code can delegate over to to load from the m2
> repo. That itself would be an improvement and developers could simply
> rebuild the module without having to regen a new assembly. A step beyond
> that would be the ability to treat the source tree as a repo, and geronimo
> load directly from target/classes, this is tricker since the modules in the
> source tree don't follow a groupId/artifact/version/type convention so some
> sort of intelligent mapping would have to be done. In theory, this would
> give us the ability to simply compile a module (with an IDE compiler and not
> maven) and simply re-start the server.
>
> Would this be an effort that would be valuable to the community?
>
> If so, if there are suggestions on how to go about implementing either the
> first or second solution, please give your input.
>
> thx
>
> -sachin
>
>
>
Re: Improve 'Geronimo' Development
Posted by Sachin Patel <sp...@gmail.com>.
To add there are two audiences here.
(1) Our users, and improving the IDE integration with the runtime, so
that they have a better IDE experience when deploying their J2EE
applications and or Geronimo services to geronimo.
(2) The commmiters and contributes for Geronimo, to improve their
experience developing 'Geronimo' within an IDE.
This targets #2.
On Nov 3, 2006, at 9:29 AM, Sachin Patel wrote:
> So since I've been working on Geronimo, one of the most annoying
> things developing Geronimo in an IDE is the overhead involved
> between modifing code and being able to test the code. For a
> single line change you have to rebuild and install the module,
> rebuild the assembly, and re-extract and relaunch the server
> image. This is needed since Geronimo loads classes from the server
> repository and currently cannot from the local m2 repo or from the
> "target/classes" directory itself.
>
> Well to ease the developer experience I think we need to change
> that. As a first step, I'd like to see if we can hook into
> geronimo a "developers module" that the repository code can
> delegate over to to load from the m2 repo. That itself would be an
> improvement and developers could simply rebuild the module without
> having to regen a new assembly. A step beyond that would be the
> ability to treat the source tree as a repo, and geronimo load
> directly from target/classes, this is tricker since the modules in
> the source tree don't follow a groupId/artifact/version/type
> convention so some sort of intelligent mapping would have to be
> done. In theory, this would give us the ability to simply compile
> a module (with an IDE compiler and not maven) and simply re-start
> the server.
>
> Would this be an effort that would be valuable to the community?
>
> If so, if there are suggestions on how to go about implementing
> either the first or second solution, please give your input.
>
> thx
>
> -sachin
>
>
-sachin
Re: Improve 'Geronimo' Development
Posted by Paul McMahan <pa...@gmail.com>.
On 11/3/06, Sachin Patel <sp...@gmail.com> wrote:
> So since I've been working on Geronimo, one of the most annoying things
> developing Geronimo in an IDE is the overhead involved between modifing code
> and being able to test the code. For a single line change you have to
> rebuild and install the module, rebuild the assembly, and re-extract and
> relaunch the server image. This is needed since Geronimo loads classes from
> the server repository and currently cannot from the local m2 repo or from
> the "target/classes" directory itself.
Testing changes to some parts of the server like the admin console
don't require quite so many steps since a redeploy suffices. But
that's still a multistep process and I agree that testing changes to
most parts of the server can be tedious. Sometimes I get around this
by just rebuilding the affected jar, copying it into repo, and
recycling server.
> Well to ease the developer experience I think we need to change that. As a
> first step, I'd like to see if we can hook into geronimo a "developers
> module" that the repository code can delegate over to to load from the m2
> repo. That itself would be an improvement and developers could simply
> rebuild the module without having to regen a new assembly. A step beyond
> that would be the ability to treat the source tree as a repo, and geronimo
> load directly from target/classes, this is tricker since the modules in the
> source tree don't follow a groupId/artifact/version/type convention so some
> sort of intelligent mapping would have to be done. In theory, this would
> give us the ability to simply compile a module (with an IDE compiler and not
> maven) and simply re-start the server.
Both of these ideas sound good and IMO could improve productivity
dramatically for geronimo developers. I think I would prefer using
the m2 repo instead of the target/classes directory because the
location and contents of my m2 repo tend to be more stable than my src
tree. Plus there's lots of stuff in my m2 repo that I don't actually
have the source/classes for, and I want geronimo to be able to load
that stuff too. Like when a pom changes and maven slurps over a new
jar. Also, it just seems like a simpler and cleaner design to me.
However, I can appreciate the fact that using target/classes would
allow the IDE to update the geronimo runtime directly without
requiring maven. But maybe maven's eclipse plugin could help with
that?
In my mind one questionable aspect of either design is how file
locking might affect development on windows.
> Would this be an effort that would be valuable to the community?
Yes, I think so!
> If so, if there are suggestions on how to go about implementing either the
> first or second solution, please give your input.
org.apache.geronimo.management.geronimo.J2EEServer has an API that the
console sometimes uses to look for stuff in the repo :
/**
* Gets the Repositories associated with this J2EEServer.
*/
public ListableRepository[] getRepositories();
Notice that it returns an *array* of repositories, but AFAIK we
usually only ever expect a single element in that array. I didn't
look into how one might go about adding to that array, nor how the
rest of the server might respond if that happens. Maybe someone
watching this thread might know. If I can help by digging into this a
little further then just let me know.
Best wishes,
Paul
Re: Improve 'Geronimo' Development--WORDY RESPONSE
Posted by Tim McConnell <ti...@gmail.com>.
Hi Sachin, this is a very good question and I've been dwelling on it for a number of weeks
now after looking at the Geronimo deployment code, and the integration steps required for
JSF 1.2. Being the new kid on the block in the community I feel there is another side to
this problem that also has some room for improvement. Two of the things that first struck
me about Geronimo when I joined the team were how little code there is in Geronimo proper
(relatively), and how much a simple user interface with a topology and dependency viewer
would really improve maven. So my three main points are that:
1 -- One of the primary strengths of Geronimo is how configurable it is and how so many
other other services and functions can be integrated into it. I hesitate to use the word
"easily" here though--it might be easy after a steep learning curve but it's not
intuitively easy.
2 -- How there are really no GUI based tools to aid in the tasks required for integration,
configuration, and building of Geronimo
3 -- How much time developers spend doing changes for integration, configuration, and the
maven build, and how little time is spent writing Java code. This point may seem like
somewhat of an exaggeration but I see the all the changes flowing into SVN/SVK everyday
and the Java changes are easily surpassed by the various changes to XML type files
I'm very visually oriented and consume and retain information much easier when it's in
graphical in nature. So it just seems to me that we could easily create a GUI-based tool
to aid in the tasks required for new integrations and configurations--not another IDE for
Java development but maybe an analog such as an Integration and Configuration Environment
(I can think of a very cool acronym here).
So, I'm kinda envisioning a tool with some of the selected capabilities of Eclipse GEF,
Visio, and XMLSpy. I for one would really benefit from a tool with these capabilities:
-- See a hierarchical view of all the POM's required to build Geronimo and the
dependencies between those POM's, and could selectively drill down from the top-most POM
into all the other dependent levels, expand and collapse various trees in the hierarchy,
and easily navigate and traverse the build and dependency topology
-- Change XML in graphical or tabular view (like any XML editor or XMLSpy) such that the
views/forms are created and validated with the appropriate XSD(s) instead of editing XML
using a flat-file editor . This could apply not just to Maven POM XML files, but also
Geronimo-specific deployment plan XML files, etc....
-- Search and display (and create or delete) dependencies and relationships graphically
-- Graphically view all the dependencies and artifacts within a particular Geronimo assembly
-- Graphically view all the dependencies for modules and GBeans
-- Drag and drop dependencies and artifacts from lists to nodes in the topology
-- Use wizards based on best-practices and past experiences for integration of new
functions/services
-- I could go on and on but I hope I've conveyed my thoughts.
Of course, this is just my impression--it just seems we could be more productive if we
could mitigate some of the effort required to configure and integrate new function and/or
services into Geronimo with a GUI based tool (not yet another command line based tool)
such that we could spend more productive time coding and less time
integrating/configuring/building. Obviously, this is not a panacea but I'm wondering what
others in the community think. I'm actually thinking it might be worthwhile for me to plan
to spend some time over the holidays doing a simple staged prototype (e.g., first, display
the maven build topology, then maybe graphically display the Geronimo specific deployment
plans, etc...) and then solicit more feedback/comments. Any thoughts ?? Be brutal--I don't
mind.
Thanks much
Tim
Sachin Patel wrote:
> So since I've been working on Geronimo, one of the most annoying things
> developing Geronimo in an IDE is the overhead involved between modifing
> code and being able to test the code. For a single line change you have
> to rebuild and install the module, rebuild the assembly, and re-extract
> and relaunch the server image. This is needed since Geronimo loads
> classes from the server repository and currently cannot from the local
> m2 repo or from the "target/classes" directory itself.
>
> Well to ease the developer experience I think we need to change that.
> As a first step, I'd like to see if we can hook into geronimo a
> "developers module" that the repository code can delegate over to to
> load from the m2 repo. That itself would be an improvement and
> developers could simply rebuild the module without having to regen a new
> assembly. A step beyond that would be the ability to treat the source
> tree as a repo, and geronimo load directly from target/classes, this is
> tricker since the modules in the source tree don't follow a
> groupId/artifact/version/type convention so some sort of intelligent
> mapping would have to be done. In theory, this would give us the
> ability to simply compile a module (with an IDE compiler and not maven)
> and simply re-start the server.
>
> Would this be an effort that would be valuable to the community?
>
> If so, if there are suggestions on how to go about implementing either
> the first or second solution, please give your input.
>
> thx
>
> -sachin
>
>
Re: Improve 'Geronimo' Development
Posted by Sachin Patel <sp...@gmail.com>.
Hi Aaron,
I think this is different. I'm not talking about developing
applications for Geronimo, but developing Geronimo itself. Yes, I'm
planning to use the in-place support in conjunction with what I plan
for GERONIMO-1526 to improve application development for Geronimo.
On Nov 3, 2006, at 10:00 AM, Aaron Mulder wrote:
> Have you considered using the in-place deployment features to load
> classes from target/classes or something like that? I know for
> example IDEA can generate an exploded WAR on each build which you
> could deploy as an in-place deployment...
>
> Thanks,
> Aaron
>
> On 11/3/06, Sachin Patel <sp...@gmail.com> wrote:
>> So since I've been working on Geronimo, one of the most annoying
>> things
>> developing Geronimo in an IDE is the overhead involved between
>> modifing code
>> and being able to test the code. For a single line change you
>> have to
>> rebuild and install the module, rebuild the assembly, and re-
>> extract and
>> relaunch the server image. This is needed since Geronimo loads
>> classes from
>> the server repository and currently cannot from the local m2 repo
>> or from
>> the "target/classes" directory itself.
>>
>> Well to ease the developer experience I think we need to change
>> that. As a
>> first step, I'd like to see if we can hook into geronimo a
>> "developers
>> module" that the repository code can delegate over to to load from
>> the m2
>> repo. That itself would be an improvement and developers could
>> simply
>> rebuild the module without having to regen a new assembly. A step
>> beyond
>> that would be the ability to treat the source tree as a repo, and
>> geronimo
>> load directly from target/classes, this is tricker since the
>> modules in the
>> source tree don't follow a groupId/artifact/version/type
>> convention so some
>> sort of intelligent mapping would have to be done. In theory,
>> this would
>> give us the ability to simply compile a module (with an IDE
>> compiler and not
>> maven) and simply re-start the server.
>>
>> Would this be an effort that would be valuable to the community?
>>
>> If so, if there are suggestions on how to go about implementing
>> either the
>> first or second solution, please give your input.
>>
>> thx
>>
>>
>> -sachin
>>
>>
-sachin
Re: Improve 'Geronimo' Development
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Have you considered using the in-place deployment features to load
classes from target/classes or something like that? I know for
example IDEA can generate an exploded WAR on each build which you
could deploy as an in-place deployment...
Thanks,
Aaron
On 11/3/06, Sachin Patel <sp...@gmail.com> wrote:
> So since I've been working on Geronimo, one of the most annoying things
> developing Geronimo in an IDE is the overhead involved between modifing code
> and being able to test the code. For a single line change you have to
> rebuild and install the module, rebuild the assembly, and re-extract and
> relaunch the server image. This is needed since Geronimo loads classes from
> the server repository and currently cannot from the local m2 repo or from
> the "target/classes" directory itself.
>
> Well to ease the developer experience I think we need to change that. As a
> first step, I'd like to see if we can hook into geronimo a "developers
> module" that the repository code can delegate over to to load from the m2
> repo. That itself would be an improvement and developers could simply
> rebuild the module without having to regen a new assembly. A step beyond
> that would be the ability to treat the source tree as a repo, and geronimo
> load directly from target/classes, this is tricker since the modules in the
> source tree don't follow a groupId/artifact/version/type convention so some
> sort of intelligent mapping would have to be done. In theory, this would
> give us the ability to simply compile a module (with an IDE compiler and not
> maven) and simply re-start the server.
>
> Would this be an effort that would be valuable to the community?
>
> If so, if there are suggestions on how to go about implementing either the
> first or second solution, please give your input.
>
> thx
>
>
> -sachin
>
>