hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: publishing sources to the maven-repo
Date Sat, 09 Jun 2007 15:06:16 GMT
On Sat, 2007-06-09 at 16:03 +0200, Daniel Mueller wrote:
> Hi folks,
> 
> It would be nice if you'd publish the source jars to the maven-repo as well.
> This enables IDEs which evaluate the dependencies in a pom to download the
> sources for dependencies and you can quickly help fixing bugs or simply
> study the code at leisure.
> 
> To achieve this you can use the maven-source-plugin[1]. You have basically
> three ways to go about it:
> 
>    - If you generate the distribution by hand you can simply add an
>    additional target when building as described in the maven guide to
>    repository uploading[2] (as detailed in step 2 of the guide, eg. 'mvn clean
>    source:jar javadoc:jar deploy' (I haven't used repository:bundle-create
>    before and it seems it can only be invoked on leaf projects)).
>    - If you want to incorporate it into your pom you can copy the
>    <profile> section of the first example in [3]. You'd then have to build your
>    sources with either -P release-profile (see [4] for more) or
>    -DperformRelease at the end of your build command.
>    - If you want to be able to do it handsfree, then you can simply add
>    the <plugins> section to the project/build element (but this adds time to
>    every build, which is at least for the javadoc unnecessary).
> 
> If you have an automated build it doesn't matter too much which one you use.
> 
> The proposed change makes the build.xml at least partially obsolete. But I
> take it you still need it to put together the source distribution for the
> apache.org download site and also because the development is easier without
> an IDE [5]?
> 

Hi Daniel,

We are basically using Ant scripts for those development tasks where
speed really matters (compile / run test cycle) and Maven2 for more
complex tasks such as cutting and deploying releases. Two build systems
can coexist in parallel as long as both are maintained. 

> I have only checked httpcomponents-core, but I assume this applies to the
> other httpcomponent projects as well. If you change a pom I propose to
> change the org.apache.httpcomponents:project pom, because then every
> subcomponent inherits the changes. The changes to the build process should
> be also for every project.
> 
> This post is pretty extensive, but I saw on the mailinglist that at least
> Roland didn't like Maven too much a year ago [5]. I don't know if this has
> changed, or if I can help with any outstanding issues. I don't consider
> myself to be authorative on maven, but I switched recently all projects at
> our workplace from ant builds to maven. The projects were large'ish and
> included a big hierarchical project with ~50 subcomponents, each built by
> its own ant build script. In the end we had practically built our own maven
> with ant, which was the point to reconsider. The transition went without
> major problems beside the usual 'Doh, how am I gonna solve this one'... I'm
> not saying maven solved everything nicely but in the end it was a net-gain.
> 

I was a long time Maven skeptic and only recently started warming up to
it. To me Maven really shines at reducing costs of splitting complex
libraries into multiple single purpose modules, which in its turn helps
reduce the number of requisite external dependencies for the upstream
users. It was also my experience that maintaining a large number of
sub-modules using Ant tended to be significantly more laborious and
error-prone.

So, please do feel free to go ahead and submit patches for proposed
changes. I hope Roland will not veto it.

Cheers

Oleg


> 
> Thanks and keep up the good work
> Dan
> 
> [1] http://maven.apache.org/plugins/maven-source-plugin/
> [2] http://maven.apache.org/guides/mini/guide-central-repository-upload.html
> [3] http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
> [4]
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
> [5]
> http://www.mail-archive.com/httpclient-dev@jakarta.apache.org/msg04234.html


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message