You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Jencks <da...@yahoo.com> on 2009/07/11 00:26:30 UTC
Mavenized tomcat build
I am well aware that the tomcat developers regard ant as the one true
build system, so please note that I am not suggesting that tomcat
adopt maven. However I think it is just barely conceivable that other
projects are facing the same sort of problems as geronimo and might
find this mavenization technique useful or that the tomcat developers
might want to address some of the difficulties I encountered.
Backgound...
More than two years ago the tomcat community accepted a proposal I
made to make annotation processing more flexible and work better with
the geronimo integration, and applied it to trunk. I naively thought
that this meant it would eventually get released in a 6.x tomcat.
Since then geronimo has been shipping with patched tomcat jars that
are based on a released tomcat 6.0.x version with the annotation
processing changes patched in. However our process for producing
these jars broke and our method for distributing the jars creates a
lot of problems with maven infrastructure. The cleanest solution
appears to be for geronimo to set up a maven build that produces the
tomcat jars we need under a geronimo groupId.
Problem...
Geronimo needs a repeatable process for getting tomcat source code
into a maven project preserving svn history so we can then apply
patches and know what we are building.
Results....
I wrote a maven archetype to set up the basic structure of a mavenized
tomcat build and a bunch of bash scripts to svn cp the tomcat source
from a tag into this maven project framework. The contents of the
maven subprojects attempts to follow the contents of the jars shipped
by tomcat, although this is not completely possible (see below).
Archetype:
source
https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-archetype
snapshot
https://repository.apache.org/content/repositories/snapshots/org/apache/geronimo/ext/tomcat/tomcat-parent-archetype/1.0-SNAPSHOT
Sample result projects, patched with what I think are the annotation
handling changes:
https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-parent-6.0.18
https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-parent-6.0.20
snapshot
https://repository.apache.org/content/repositories/snapshots/org/apache/geronimo/ext/tomcat/
Difficulties...
One of the great features of an ant build such as that used by tomcat
where all the classes are compiled at once and then distributed into
jars is that the contents of the resulting jars can be completely
randomized and have circular dependencies so that they all have to be
loaded in the same classloader. AFAICT Tomcat has taken full
advantage of this impressive feature with the catalina and coyote
jars; at any rate I couldn't figure out how to disentangle them. So I
combined them in the mavenized project.
:-)
well, seriously, you might want to look into fixing this in tomcat 7.
I don't know of any practical way to enforce or check this other than
using a maven like project layout whether you use maven, ant, ivy, or
something else. Maybe an ant expert can come up with something.
thanks
david jencks
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
One way to maintain a tomcat fork built with maven (was: Mavenized tomcat build)
Posted by David Jencks <da...@yahoo.com>.
I'd like to apologize for the miscommunication engendered by this
thread. It's very clear to me that what I thought I was communicating
did not get through. This attempt to clarify will probably not fare
any better :-(
I don't expect tomcat to consider changing its build system and
certainly don't want to participate in any discussion of the tomcat
build system.
I don't expect tomcat to release anything from trunk or any branch in
particular.
I do suspect that there are projects that, like geronimo, use maven
and are faced with maintaining a tomcat fork. For such projects, (NOT
TOMCAT ITSELF) the tools we developed at geronimo might be useful.
Once again, this is NOT a proposal for tomcat to use maven. If you
guys happen to decide you want to I'd be happy to give advice, but I'm
not proposing it and don't want to talk about whether it would be a
good idea.
On Jul 11, 2009, at 8:38 AM, Costin Manolache wrote:
> I think there are few separate issues:
>
> 1, If there is a patch that needs to be applied by geronimo to use
> tomcat or they are blocked by missing something from a release - we
> should review this again. I think we can do a tomcat-geronimo release
> specifically for them as worse case ( well, we did it for j2ee ref
> impl in the old days - all we need is a branch ), or make sure it gets
> in the next release,
Personally, since geronimo now has a working method of maintaining a
fork of the 6.0 branch including the needed patches from trunk, I
would prefer to see any development effort expended on servlet 3.0
features. If tomcat 7 supports servlet 3.0 and is based on trunk
geronimo won't need a fork any more.
>
> 2. For Maven support - if maven can support building tomcat, I don't
> see any problem. But moving the code around and changing code just so
> we can be built by maven - I don't like that. The current patch is
> even worse - it seems to create 2 different source trees for tomat,
> and since maven can also checkout the source and people may use the
> maven-source...
Once again, this was never intended to be about the tomcat build system.
>
> 3. For having maven-like 'modules' with strict build and runtime
> dependencies - been there. There are plenty of large projects using
> tomcat approach - i.e. allow circular dependencies between packages
> and build either one big jar or few jars. I think the benefits of more
> reuse and code sharing are bigger than the problems - i.e. mostly not
> able to break into many directories and build with maven, and arcane
> ways to break circular dependencies.
I'm still mystified by this. I have no problems with circular package
dependencies within a single jar but I really don't understand why
you'd have 2 jars neither of which can be used without the other.
Wouldn't it be simpler for everyone to just have one jar?
>
> Costin
>
> On Fri, Jul 10, 2009 at 11:43 PM, Mladen Turk<mt...@apache.org> wrote:
>> Filip Hanik - Dev Lists wrote:
>>>
>>> If Geronimo needs a better way to download and integrate Tomcat's
>>> JAR's
>>> lets focus on that, and not make this into another Maven vs ANT
>>> topic, cause
>>> I don't think that was the intention.
>>>
>>
>> Agreed.
>> However we should really find a way to deal with eclipse
>> repository since they tend to change the download system
>> quite often (only external dependency).
>> Since we cannot copy that to the ASF due to license issue
>> we could reuse the backup system on tomcat.heanet.ie (like we did
>> for Tomcat Native until ASF resolved the crypto software issues)
>> to allow the historic builds.
>> I somehow doubt Maven can solve this problem anyhow, and
>> downloading a repo with 10+ eclipse JDT's would be insane
>> just to build eg. 6.0.20 in 5 years from now.
????? maven only downloads the dependencies you require, not entire
repos. Probably I don't understand what you are saying.
>> Other things is trivial, just testing the dist.apache.org
>> with archive.apache.org as fallback for the remaining
>> dependencies.
I didn't mention this before either but I don't understand why tomcat
is rebuilding the eclipse code. The released eclipse jdt jar
available from maven central seems to work fine.
thanks
david jencks
>>
>>
>> Regards
>> --
>> ^(TM)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Costin Manolache <co...@gmail.com>.
I think there are few separate issues:
1, If there is a patch that needs to be applied by geronimo to use
tomcat or they are blocked by missing something from a release - we
should review this again. I think we can do a tomcat-geronimo release
specifically for them as worse case ( well, we did it for j2ee ref
impl in the old days - all we need is a branch ), or make sure it gets
in the next release,
2. For Maven support - if maven can support building tomcat, I don't
see any problem. But moving the code around and changing code just so
we can be built by maven - I don't like that. The current patch is
even worse - it seems to create 2 different source trees for tomat,
and since maven can also checkout the source and people may use the
maven-source...
3. For having maven-like 'modules' with strict build and runtime
dependencies - been there. There are plenty of large projects using
tomcat approach - i.e. allow circular dependencies between packages
and build either one big jar or few jars. I think the benefits of more
reuse and code sharing are bigger than the problems - i.e. mostly not
able to break into many directories and build with maven, and arcane
ways to break circular dependencies.
Costin
On Fri, Jul 10, 2009 at 11:43 PM, Mladen Turk<mt...@apache.org> wrote:
> Filip Hanik - Dev Lists wrote:
>>
>> If Geronimo needs a better way to download and integrate Tomcat's JAR's
>> lets focus on that, and not make this into another Maven vs ANT topic, cause
>> I don't think that was the intention.
>>
>
> Agreed.
> However we should really find a way to deal with eclipse
> repository since they tend to change the download system
> quite often (only external dependency).
> Since we cannot copy that to the ASF due to license issue
> we could reuse the backup system on tomcat.heanet.ie (like we did
> for Tomcat Native until ASF resolved the crypto software issues)
> to allow the historic builds.
> I somehow doubt Maven can solve this problem anyhow, and
> downloading a repo with 10+ eclipse JDT's would be insane
> just to build eg. 6.0.20 in 5 years from now.
> Other things is trivial, just testing the dist.apache.org
> with archive.apache.org as fallback for the remaining
> dependencies.
>
>
> Regards
> --
> ^(TM)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Mladen Turk <mt...@apache.org>.
Filip Hanik - Dev Lists wrote:
>
> If Geronimo needs a better way to download and integrate Tomcat's JAR's
> lets focus on that, and not make this into another Maven vs ANT topic,
> cause I don't think that was the intention.
>
Agreed.
However we should really find a way to deal with eclipse
repository since they tend to change the download system
quite often (only external dependency).
Since we cannot copy that to the ASF due to license issue
we could reuse the backup system on tomcat.heanet.ie (like we did
for Tomcat Native until ASF resolved the crypto software issues)
to allow the historic builds.
I somehow doubt Maven can solve this problem anyhow, and
downloading a repo with 10+ eclipse JDT's would be insane
just to build eg. 6.0.20 in 5 years from now.
Other things is trivial, just testing the dist.apache.org
with archive.apache.org as fallback for the remaining
dependencies.
Regards
--
^(TM)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
On 07/10/2009 06:19 PM, David Jencks wrote:
>
> On Jul 10, 2009, at 5:01 PM, Filip Hanik - Dev Lists wrote:
>
>> On 07/10/2009 05:19 PM, Yoav Shapira wrote:
>>> On Fri, Jul 10, 2009 at 6:26 PM, David
>>> Jencks<da...@yahoo.com> wrote:
>>>
>>>> I am well aware that the tomcat developers regard ant as the one
>>>> true build
>>>>
>>>
>>> Having now used Maven 2.x for a couple of years, it Works. +1 for
>>> trying it for Tomcat.
>>>
>> -1, my lunch is not long enough to download the internet ;)
>> This discussion has been had many times, I've tried to look at it
>> from many different perspectives, but have yet not seen a reason to
>> switch.
>>
>> but we do publish our JARs to the Maven repo for other projects that
>> are using Maven
>> http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tomcat/
>>
>>
>> If Geronimo needs a better way to download and integrate Tomcat's
>> JAR's lets focus on that, and not make this into another Maven vs ANT
>> topic, cause I don't think that was the intention.
>
> I thought I made it pretty clear.... we need you to make a release
> from trunk. Like I said its been more than 2 years since tomcat
> "accepted" the annotations patch with no trunk release but general
> agreement that the patch couldn't go into the 6.0.x branch.
not as clear as you think, given the subject line :)
>
> david jencks
>
>>
>> Filip
>>
>>> Yoav
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Costin Manolache <co...@gmail.com>.
On Fri, Jul 10, 2009 at 5:19 PM, David Jencks<da...@yahoo.com> wrote:
>
> On Jul 10, 2009, at 5:01 PM, Filip Hanik - Dev Lists wrote:
>
>> On 07/10/2009 05:19 PM, Yoav Shapira wrote:
>>>
>>> On Fri, Jul 10, 2009 at 6:26 PM, David Jencks<da...@yahoo.com>
>>> wrote:
>>>
>>>> I am well aware that the tomcat developers regard ant as the one true
>>>> build
>>>>
>>>
>>> Having now used Maven 2.x for a couple of years, it Works. +1 for
>>> trying it for Tomcat.
>>>
>> -1, my lunch is not long enough to download the internet ;)
>> This discussion has been had many times, I've tried to look at it from
>> many different perspectives, but have yet not seen a reason to switch.
>>
>> but we do publish our JARs to the Maven repo for other projects that are
>> using Maven
>>
>> http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tomcat/
>>
>> If Geronimo needs a better way to download and integrate Tomcat's JAR's
>> lets focus on that, and not make this into another Maven vs ANT topic, cause
>> I don't think that was the intention.
>
> I thought I made it pretty clear.... we need you to make a release from
> trunk. Like I said its been more than 2 years since tomcat "accepted" the
> annotations patch with no trunk release but general agreement that the patch
> couldn't go into the 6.0.x branch.
I'm not familiar with the patch and the risks - but if a project
depends on this and there are no
good alternatives - maybe it can be revisited.
I really don't get the point of your maven change - you seem to just
move sources around in a separate repository with history, and the
only reason is that maven doesn't support our layout ?
I don't think ant is the only or best tool - I don't mind having maven
build files - or Makefiles, jam or any other build tool as long as it
doesn't force us to organize the source in its own way.
Interdependencies and circular dependencies between packages can be
better than all the breakups and duplication and tricks done to avoid
them.
Costin
>
> david jencks
>
>>
>> Filip
>>
>>> Yoav
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by David Jencks <da...@yahoo.com>.
On Jul 10, 2009, at 5:01 PM, Filip Hanik - Dev Lists wrote:
> On 07/10/2009 05:19 PM, Yoav Shapira wrote:
>> On Fri, Jul 10, 2009 at 6:26 PM, David
>> Jencks<da...@yahoo.com> wrote:
>>
>>> I am well aware that the tomcat developers regard ant as the one
>>> true build
>>>
>>
>> Having now used Maven 2.x for a couple of years, it Works. +1 for
>> trying it for Tomcat.
>>
> -1, my lunch is not long enough to download the internet ;)
> This discussion has been had many times, I've tried to look at it
> from many different perspectives, but have yet not seen a reason to
> switch.
>
> but we do publish our JARs to the Maven repo for other projects that
> are using Maven
> http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tomcat/
>
> If Geronimo needs a better way to download and integrate Tomcat's
> JAR's lets focus on that, and not make this into another Maven vs
> ANT topic, cause I don't think that was the intention.
I thought I made it pretty clear.... we need you to make a release
from trunk. Like I said its been more than 2 years since tomcat
"accepted" the annotations patch with no trunk release but general
agreement that the patch couldn't go into the 6.0.x branch.
david jencks
>
> Filip
>
>> Yoav
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
On 07/10/2009 05:19 PM, Yoav Shapira wrote:
> On Fri, Jul 10, 2009 at 6:26 PM, David Jencks<da...@yahoo.com> wrote:
>
>> I am well aware that the tomcat developers regard ant as the one true build
>>
>
> Having now used Maven 2.x for a couple of years, it Works. +1 for
> trying it for Tomcat.
>
-1, my lunch is not long enough to download the internet ;)
This discussion has been had many times, I've tried to look at it from
many different perspectives, but have yet not seen a reason to switch.
but we do publish our JARs to the Maven repo for other projects that are
using Maven
http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tomcat/
If Geronimo needs a better way to download and integrate Tomcat's JAR's
lets focus on that, and not make this into another Maven vs ANT topic,
cause I don't think that was the intention.
Filip
> Yoav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
Re: Mavenized tomcat build
Posted by Yoav Shapira <yo...@apache.org>.
On Fri, Jul 10, 2009 at 6:26 PM, David Jencks<da...@yahoo.com> wrote:
> I am well aware that the tomcat developers regard ant as the one true build
Having now used Maven 2.x for a couple of years, it Works. +1 for
trying it for Tomcat.
Yoav
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Mavenized tomcat build
Posted by Henri Gomez <he...@gmail.com>.
A big +1.
I tried to do a maven build from thé current layout and it was a
nightmare, the pom used a this time turning more in an ant than a
maven one. Also it prevent to make a good use of m2eclipse with tc.
I second David in this, Tomcat 7 could be the first to use a maven
build chain and I could help on this.
Evolution, not revolution.
Le 11 juil. 2009 à 00:26, David Jencks <da...@yahoo.com> a
écrit :
> I am well aware that the tomcat developers regard ant as the one
> true build system, so please note that I am not suggesting that
> tomcat adopt maven. However I think it is just barely conceivable
> that other projects are facing the same sort of problems as geronimo
> and might find this mavenization technique useful or that the tomcat
> developers might want to address some of the difficulties I
> encountered.
>
> Backgound...
>
> More than two years ago the tomcat community accepted a proposal I
> made to make annotation processing more flexible and work better
> with the geronimo integration, and applied it to trunk. I naively
> thought that this meant it would eventually get released in a 6.x
> tomcat. Since then geronimo has been shipping with patched tomcat
> jars that are based on a released tomcat 6.0.x version with the
> annotation processing changes patched in. However our process for
> producing these jars broke and our method for distributing the jars
> creates a lot of problems with maven infrastructure. The cleanest
> solution appears to be for geronimo to set up a maven build that
> produces the tomcat jars we need under a geronimo groupId.
>
> Problem...
>
> Geronimo needs a repeatable process for getting tomcat source code
> into a maven project preserving svn history so we can then apply
> patches and know what we are building.
>
> Results....
> I wrote a maven archetype to set up the basic structure of a
> mavenized tomcat build and a bunch of bash scripts to svn cp the
> tomcat source from a tag into this maven project framework. The
> contents of the maven subprojects attempts to follow the contents of
> the jars shipped by tomcat, although this is not completely possible
> (see below).
>
> Archetype:
> source
> https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-archetype
> snapshot
> https://repository.apache.org/content/repositories/snapshots/org/apache/geronimo/ext/tomcat/tomcat-parent-archetype/1.0-SNAPSHOT
>
> Sample result projects, patched with what I think are the annotation
> handling changes:
> https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-parent-6.0.18
> https://svn.apache.org/repos/asf/geronimo/external/trunk/tomcat-parent-6.0.20
> snapshot
> https://repository.apache.org/content/repositories/snapshots/org/apache/geronimo/ext/tomcat/
>
> Difficulties...
> One of the great features of an ant build such as that used by
> tomcat where all the classes are compiled at once and then
> distributed into jars is that the contents of the resulting jars can
> be completely randomized and have circular dependencies so that they
> all have to be loaded in the same classloader. AFAICT Tomcat has
> taken full advantage of this impressive feature with the catalina
> and coyote jars; at any rate I couldn't figure out how to
> disentangle them. So I combined them in the mavenized project.
> :-)
>
> well, seriously, you might want to look into fixing this in tomcat
> 7. I don't know of any practical way to enforce or check this other
> than using a maven like project layout whether you use maven, ant,
> ivy, or something else. Maybe an ant expert can come up with
> something.
>
> thanks
> david jencks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org