You are viewing a plain text version of this content. The canonical link for it is here.
Posted to repository@apache.org by tomdz <to...@apache.org> on 2007/06/27 08:30:11 UTC

Howto publish a JAR that was not generated by Maven to the m2 repo ?

Hi folks,

I want to publish the DdlUtils 1.0 jar to the m2 Maven repository.
Since we're not using Maven at all (plain old Ant :-) ), I have to push 
the artifact manually somehow. FYI, JAR and signature/checksum files are 
here:

/www/www.apache.org/dist/db/ddlutils/ddlutils-1.0/binaries

The Maven 2 POM I was going to use is here

http://svn.apache.org/viewvc/db/ddlutils/tags/1.0/pom.xml?view=markup


Since there is probably no manual way without Maven 2 (or is there 
something like 
http://apache.org/dev/release-publishing.html#repo-step-by-step for the 
Maven 2 repo ?), I think I'll have to use Maven 2 to do the deploy.
But, I'm a newbie when it comes to Maven, so could perhaps a kind soul 
give me some tips ? I figured that I probably have to use the deploy 
plugin, e.g. something like:

mvn deploy:deploy-file -DpomFile=pom.xml \
         -Dfile=DdlUtils-1.0.jar \
         -DrepositoryId=m2-ibiblio-rsync-repository \
         -Durl=http://people.apache.org/repo/m2-ibiblio-rsync-repository

But I'm not sure about that, and also, do I have to do that for all four 
files (jar, jar.asc, jar.md5, jar.sha) ?


cheers,
Tom

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Carlos Sanchez <ca...@apache.org>.
you don't really need to deploy to the m2 repo, the m1 repo is
automatically converted to m2 in the central repository

On 6/26/07, tomdz <to...@apache.org> wrote:
> Hi folks,
>
> I want to publish the DdlUtils 1.0 jar to the m2 Maven repository.
> Since we're not using Maven at all (plain old Ant :-) ), I have to push
> the artifact manually somehow. FYI, JAR and signature/checksum files are
> here:
>
> /www/www.apache.org/dist/db/ddlutils/ddlutils-1.0/binaries
>
> The Maven 2 POM I was going to use is here
>
> http://svn.apache.org/viewvc/db/ddlutils/tags/1.0/pom.xml?view=markup
>
>
> Since there is probably no manual way without Maven 2 (or is there
> something like
> http://apache.org/dev/release-publishing.html#repo-step-by-step for the
> Maven 2 repo ?), I think I'll have to use Maven 2 to do the deploy.
> But, I'm a newbie when it comes to Maven, so could perhaps a kind soul
> give me some tips ? I figured that I probably have to use the deploy
> plugin, e.g. something like:
>
> mvn deploy:deploy-file -DpomFile=pom.xml \
>          -Dfile=DdlUtils-1.0.jar \
>          -DrepositoryId=m2-ibiblio-rsync-repository \
>          -Durl=http://people.apache.org/repo/m2-ibiblio-rsync-repository
>
> But I'm not sure about that, and also, do I have to do that for all four
> files (jar, jar.asc, jar.md5, jar.sha) ?
>
>
> cheers,
> Tom
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by tomdz <to...@apache.org>.
Wendy Smoak wrote:

>> I did a test (deploying to my home directory instead of the repository)
>> and this command works fine except that it did not deploy the signature
>> file. This was with Maven 2.0.6. Do I have to copy it manually or is
>> there some magic command line parameter that tells Maven to also deploy
>> the .asc file ?
> 
> We haven't solved that one yet... http://jira.codehaus.org/browse/MGPG-7
> 
> In the past I've just used a script to walk a local directory
> structure and scp the signatures up to the right place in the repo.

Ah, I wasn't aware that deploy:deploy-file did not actually use the .md5 
and .sha files that I had on my local disk alongside the jar but instead 
generated its own.
Anyway, that's what I ended up doing - copying the .asc file directly to 
the repo folder where the jar is.

thanks,
tom

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Wendy Smoak <ws...@gmail.com>.
On 6/27/07, Thomas Dudziak <me...@tomdz.de> wrote:

> I did a test (deploying to my home directory instead of the repository)
> and this command works fine except that it did not deploy the signature
> file. This was with Maven 2.0.6. Do I have to copy it manually or is
> there some magic command line parameter that tells Maven to also deploy
> the .asc file ?

We haven't solved that one yet... http://jira.codehaus.org/browse/MGPG-7

In the past I've just used a script to walk a local directory
structure and scp the signatures up to the right place in the repo.

-- 
Wendy

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Henning Schmiedehausen <he...@apache.org>.
As Wendy already wrote, I was wrong here. I do remember dimly now that I
copied the signature files by hand. 

	Best regards
		Henning



On Wed, 2007-06-27 at 22:18 -0700, Thomas Dudziak wrote:
> Henning Schmiedehausen wrote:
> 
> > As we build the Velocity code also using straight ant, I used e.g.
> > 
> > mvn -Dfile=anakia-1.0.jar \
> > 	-Drepository.id=apache.releases \
> > 	-DpomFile=pom.xml \
> > 	-Durl=scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
> > 	deploy:deploy-file
> > 
> > to deploy releases. The URL thing obviously sucks and you will need a
> > POM that is derived from the official Apache POM so that the
> > repository.id is defined but apart from that, you will get the POM, the
> > jar and all the checksum and signature files into the repo in one go.
> 
> I did a test (deploying to my home directory instead of the repository) 
> and this command works fine except that it did not deploy the signature 
> file. This was with Maven 2.0.6. Do I have to copy it manually or is 
> there some magic command line parameter that tells Maven to also deploy 
> the .asc file ?
> 
> cheers,
> Tom


Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Thomas Dudziak <me...@tomdz.de>.
Henning Schmiedehausen wrote:

> As we build the Velocity code also using straight ant, I used e.g.
> 
> mvn -Dfile=anakia-1.0.jar \
> 	-Drepository.id=apache.releases \
> 	-DpomFile=pom.xml \
> 	-Durl=scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
> 	deploy:deploy-file
> 
> to deploy releases. The URL thing obviously sucks and you will need a
> POM that is derived from the official Apache POM so that the
> repository.id is defined but apart from that, you will get the POM, the
> jar and all the checksum and signature files into the repo in one go.

I did a test (deploying to my home directory instead of the repository) 
and this command works fine except that it did not deploy the signature 
file. This was with Maven 2.0.6. Do I have to copy it manually or is 
there some magic command line parameter that tells Maven to also deploy 
the .asc file ?

cheers,
Tom

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by tomdz <to...@apache.org>.
Henning Schmiedehausen wrote:

> As we build the Velocity code also using straight ant, I used e.g.
> 
> mvn -Dfile=anakia-1.0.jar \
> 	-Drepository.id=apache.releases \
> 	-DpomFile=pom.xml \
> 	-Durl=scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
> 	deploy:deploy-file
> 
> to deploy releases. The URL thing obviously sucks and you will need a
> POM that is derived from the official Apache POM so that the
> repository.id is defined but apart from that, you will get the POM, the
> jar and all the checksum and signature files into the repo in one go.

Oh nice, thanks a lot, Henning, that looks like what I need.

cheers,
Tom

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Henning Schmiedehausen <he...@apache.org>.
As we build the Velocity code also using straight ant, I used e.g.

mvn -Dfile=anakia-1.0.jar \
	-Drepository.id=apache.releases \
	-DpomFile=pom.xml \
	-Durl=scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
	deploy:deploy-file

to deploy releases. The URL thing obviously sucks and you will need a
POM that is derived from the official Apache POM so that the
repository.id is defined but apart from that, you will get the POM, the
jar and all the checksum and signature files into the repo in one go.

	Best regards
		Henning




On Tue, 2007-06-26 at 23:30 -0700, tomdz wrote:
> Hi folks,
> 
> I want to publish the DdlUtils 1.0 jar to the m2 Maven repository.
> Since we're not using Maven at all (plain old Ant :-) ), I have to push 
> the artifact manually somehow. FYI, JAR and signature/checksum files are 
> here:
> 
> /www/www.apache.org/dist/db/ddlutils/ddlutils-1.0/binaries
> 
> The Maven 2 POM I was going to use is here
> 
> http://svn.apache.org/viewvc/db/ddlutils/tags/1.0/pom.xml?view=markup
> 
> 
> Since there is probably no manual way without Maven 2 (or is there 
> something like 
> http://apache.org/dev/release-publishing.html#repo-step-by-step for the 
> Maven 2 repo ?), I think I'll have to use Maven 2 to do the deploy.
> But, I'm a newbie when it comes to Maven, so could perhaps a kind soul 
> give me some tips ? I figured that I probably have to use the deploy 
> plugin, e.g. something like:
> 
> mvn deploy:deploy-file -DpomFile=pom.xml \
>          -Dfile=DdlUtils-1.0.jar \
>          -DrepositoryId=m2-ibiblio-rsync-repository \
>          -Durl=http://people.apache.org/repo/m2-ibiblio-rsync-repository
> 
> But I'm not sure about that, and also, do I have to do that for all four 
> files (jar, jar.asc, jar.md5, jar.sha) ?
> 
> 
> cheers,
> Tom


Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Henning Schmiedehausen <he...@apache.org>.
Ah, cross-platform I understand. I seem to be too fixated on Linux these
days. :-) 

	Best regards
		Henning


On Sat, 2007-06-30 at 16:10 +0100, Steve Loughran wrote:
> On 30/06/07, Henning Schmiedehausen <he...@apache.org> wrote:
> > On Sat, 2007-06-30 at 12:12 +0100, Steve Loughran wrote:
> >
> > Just out of interest: What can VMWare images do that build roots can
> > not? I use for that kind of testing build roots for ages, which can
> > simply be untarred and later discarded. I know of at least two major
> > Linux vendors (one now defunct) that build their release systems using
> > build roots.
> >
> 
> 1. let people on the windows boxes cut releases
> 2. let us do these things without worrying about license management
> (for the OSS platforms)
> 3. let us test on a broad farm of systems (RHEL4+5, ubuntu, solaris,
> windows XP, vista, server 2003) without having to maintain that many
> machines
> 
> what we cant do is test on a vm mac image, which irritates me. We need
> a mac on the network, and its owner gets irate when I do bad things to
> it.


Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Steve Loughran <st...@gmail.com>.
On 30/06/07, Henning Schmiedehausen <he...@apache.org> wrote:
> On Sat, 2007-06-30 at 12:12 +0100, Steve Loughran wrote:
>
> Just out of interest: What can VMWare images do that build roots can
> not? I use for that kind of testing build roots for ages, which can
> simply be untarred and later discarded. I know of at least two major
> Linux vendors (one now defunct) that build their release systems using
> build roots.
>

1. let people on the windows boxes cut releases
2. let us do these things without worrying about license management
(for the OSS platforms)
3. let us test on a broad farm of systems (RHEL4+5, ubuntu, solaris,
windows XP, vista, server 2003) without having to maintain that many
machines

what we cant do is test on a vm mac image, which irritates me. We need
a mac on the network, and its owner gets irate when I do bad things to
it.

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Henning Schmiedehausen <he...@apache.org>.
On Sat, 2007-06-30 at 12:12 +0100, Steve Loughran wrote:

Just out of interest: What can VMWare images do that build roots can
not? I use for that kind of testing build roots for ages, which can
simply be untarred and later discarded. I know of at least two major
Linux vendors (one now defunct) that build their release systems using
build roots.

[...]

> To test the production RPMs I need two vmware images, one to check out
> and build the RPMs from the repository on an untainted system, then,
> another vm where we scp the rpms and sshexec the install instructions.
> VM#2 doesnt have the user who created the RPMs, and I have to parse
> the output of the rpm --install -vv operation to verify that no
> warnings about unknown users are created, then running the installed
> programs on the remote box and verifying the version strings are
> correct.  That's the kind of thing that has kept me busy yesterday:
> http://jira.smartfrog.org/jira/browse/SFOS?report=com.atlassian.jira.plugin.ext.subversion:subversion-project-tab
> 
> I cant imagine how people did this without vmware/xen

With build roots, cp and chroot? ;-)

	Best regards
		Henning




Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Xavier Hanin <xa...@gmail.com>.
On 6/30/07, Steve Loughran <st...@gmail.com> wrote:
>
> On 28/06/07, Xavier Hanin <xa...@gmail.com> wrote:
> > On 6/28/07, tomdz <to...@apache.org> wrote:
> >
> > > Steve Loughran wrote:
> > >
> > > > This is something I have to write up, maybe we can extend Ivy to
> make
> > > > it easier.
> > > >
> > > > Right now here is my build file to create an izpack installer, rpms
> > > > and publish artifacts to a maven2 compatible repository:
> > > >
> > > >
> >
> http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup
> > > >
> > > >
> > > > The pom files and md5s are done elsewhere; every jar has a template
> > > > pom that is copied with ant property expansion (one of the
> properties
> > > > includes a comment that creates an audit trail of who created the
> pom
> > > > and when), then <checksum> is used to create the md5 signatures.
> These
> > > > are all scp'd up to the target server.
> > >
> > > Mhmm, this seems to be quite complex a thing to do with Ant (even if
> not
> > > generating an izpack installer or an rpm). An Ivy task would certainly
> > > be a nice thing to have for this.
> >
> > We already have a task for publishing artifacts to a repository, in
> these
> > artifacts you can have a pom. So it shouldn't be too hard to work on
> > something which would make it dead simple for Ant+Ivy users. For now
> using
> > maven for this seems to be pretty straightforward, so no problem :-)
>
> One thing we could do with an ivy task would be to do the resolution
> of all artifacts/versions at build time and upload a POM with a
> complete dependency graph as calculated by ivy, rather than leaving it
> to maven. I'm not 100% sure if that is a good idea, because you lose
> some of the audit trail (if an app includes, say jaxen and xom 1.0,
> does it really need jaxen or because Xom needs it, and if I update to
> xom1.1 will the dependency on jaxon go away (yes it will, as the
> classes get embedded). At the same time I like the idea of preserving
> the complete closure of build-time-dependencies (including SHA1
> checksums), even if (unlike the .NET assembly model) people have the
> right to override it with their own dependency data.


Yes, you already suggested the idea of having the complete dependency
closure in the published metadata. This could be a good improvement for
easier build reproducibility and easier integration between dependency
managers. We could avoid the lose of audit trail if the audit trail was
included with the dependency closure (something very similar to the content
of an xml Ivy report). But this means changing the format of metadata. The
solution to alter the dependencies to put all dependencies as direct
dependencies doesn't require any change in the metadata format, but you lose
too much information IMO (not only for audit trail, but also for conflict
management, the dependency depth is used to compute conflicts).

BTW, I think the initial request is just to be able to publish artifacts to
a maven repository with ease, without speaking about metadata consolidation.
For this using the Ivy publish task is pretty easy, but using maven seems to
be even easier. The main advantage I see of using Ivy for this is to avoid
installing Maven for Ant users who don't already use it. Maybe another
advantage would be to avoid the signature files copying by hand... I'll
study that more deeply when we'll publish Ivy to the maven repository.

Xavier

Can I add. that compared to testing that you have good RPMs, working
> with POMs is much easier. We could test the ivy task by running them
> past maven.
>
> To test the production RPMs I need two vmware images, one to check out
> and build the RPMs from the repository on an untainted system, then,
> another vm where we scp the rpms and sshexec the install instructions.
> VM#2 doesnt have the user who created the RPMs, and I have to parse
> the output of the rpm --install -vv operation to verify that no
> warnings about unknown users are created, then running the installed
> programs on the remote box and verifying the version strings are
> correct.  That's the kind of thing that has kept me busy yesterday:
>
> http://jira.smartfrog.org/jira/browse/SFOS?report=com.atlassian.jira.plugin.ext.subversion:subversion-project-tab
>
> I cant imagine how people did this without vmware/xen
>
> -steve
>



-- 
Xavier Hanin - Independent Java Consultant
Creator of Ivy, xooki and xoocode.org
More about me: http://xhab.blogspot.com/

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Steve Loughran <st...@gmail.com>.
On 28/06/07, Xavier Hanin <xa...@gmail.com> wrote:
> On 6/28/07, tomdz <to...@apache.org> wrote:
>
> > Steve Loughran wrote:
> >
> > > This is something I have to write up, maybe we can extend Ivy to make
> > > it easier.
> > >
> > > Right now here is my build file to create an izpack installer, rpms
> > > and publish artifacts to a maven2 compatible repository:
> > >
> > >
> http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup
> > >
> > >
> > > The pom files and md5s are done elsewhere; every jar has a template
> > > pom that is copied with ant property expansion (one of the properties
> > > includes a comment that creates an audit trail of who created the pom
> > > and when), then <checksum> is used to create the md5 signatures. These
> > > are all scp'd up to the target server.
> >
> > Mhmm, this seems to be quite complex a thing to do with Ant (even if not
> > generating an izpack installer or an rpm). An Ivy task would certainly
> > be a nice thing to have for this.
>
> We already have a task for publishing artifacts to a repository, in these
> artifacts you can have a pom. So it shouldn't be too hard to work on
> something which would make it dead simple for Ant+Ivy users. For now using
> maven for this seems to be pretty straightforward, so no problem :-)

One thing we could do with an ivy task would be to do the resolution
of all artifacts/versions at build time and upload a POM with a
complete dependency graph as calculated by ivy, rather than leaving it
to maven. I'm not 100% sure if that is a good idea, because you lose
some of the audit trail (if an app includes, say jaxen and xom 1.0,
does it really need jaxen or because Xom needs it, and if I update to
xom1.1 will the dependency on jaxon go away (yes it will, as the
classes get embedded). At the same time I like the idea of preserving
the complete closure of build-time-dependencies (including SHA1
checksums), even if (unlike the .NET assembly model) people have the
right to override it with their own dependency data.

Can I add. that compared to testing that you have good RPMs, working
with POMs is much easier. We could test the ivy task by running them
past maven.

To test the production RPMs I need two vmware images, one to check out
and build the RPMs from the repository on an untainted system, then,
another vm where we scp the rpms and sshexec the install instructions.
VM#2 doesnt have the user who created the RPMs, and I have to parse
the output of the rpm --install -vv operation to verify that no
warnings about unknown users are created, then running the installed
programs on the remote box and verifying the version strings are
correct.  That's the kind of thing that has kept me busy yesterday:
http://jira.smartfrog.org/jira/browse/SFOS?report=com.atlassian.jira.plugin.ext.subversion:subversion-project-tab

I cant imagine how people did this without vmware/xen

-steve

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Xavier Hanin <xa...@gmail.com>.
On 6/28/07, tomdz <to...@apache.org> wrote:
>
> Steve Loughran wrote:
>
> > This is something I have to write up, maybe we can extend Ivy to make
> > it easier.
> >
> > Right now here is my build file to create an izpack installer, rpms
> > and publish artifacts to a maven2 compatible repository:
> >
> >
> http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup
> >
> >
> > The pom files and md5s are done elsewhere; every jar has a template
> > pom that is copied with ant property expansion (one of the properties
> > includes a comment that creates an audit trail of who created the pom
> > and when), then <checksum> is used to create the md5 signatures. These
> > are all scp'd up to the target server.
>
> Mhmm, this seems to be quite complex a thing to do with Ant (even if not
> generating an izpack installer or an rpm). An Ivy task would certainly
> be a nice thing to have for this.


We already have a task for publishing artifacts to a repository, in these
artifacts you can have a pom. So it shouldn't be too hard to work on
something which would make it dead simple for Ant+Ivy users. For now using
maven for this seems to be pretty straightforward, so no problem :-)

Xavier

For now I think I can live with using Maven for the deploy :-)
>
> cheers,
> Tom
>



-- 
Xavier Hanin - Independent Java Consultant
Creator of Ivy, xooki and xoocode.org
More about me: http://xhab.blogspot.com/

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Steve Loughran <st...@gmail.com>.
On 28/06/07, tomdz <to...@apache.org> wrote:
> Steve Loughran wrote:
>
> > This is something I have to write up, maybe we can extend Ivy to make
> > it easier.
> >
> > Right now here is my build file to create an izpack installer, rpms
> > and publish artifacts to a maven2 compatible repository:
> >
> > http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup
> >
> >
> > The pom files and md5s are done elsewhere; every jar has a template
> > pom that is copied with ant property expansion (one of the properties
> > includes a comment that creates an audit trail of who created the pom
> > and when), then <checksum> is used to create the md5 signatures. These
> > are all scp'd up to the target server.
>
> Mhmm, this seems to be quite complex a thing to do with Ant (even if not
> generating an izpack installer or an rpm). An Ivy task would certainly
> be a nice thing to have for this.
> For now I think I can live with using Maven for the deploy :-)

No, its not hard. Automated testing of RPMs, that is hard, and where
VMware comes to help.

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by tomdz <to...@apache.org>.
Steve Loughran wrote:

> This is something I have to write up, maybe we can extend Ivy to make
> it easier.
> 
> Right now here is my build file to create an izpack installer, rpms
> and publish artifacts to a maven2 compatible repository:
> 
> http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup 
> 
> 
> The pom files and md5s are done elsewhere; every jar has a template
> pom that is copied with ant property expansion (one of the properties
> includes a comment that creates an audit trail of who created the pom
> and when), then <checksum> is used to create the md5 signatures. These
> are all scp'd up to the target server.

Mhmm, this seems to be quite complex a thing to do with Ant (even if not 
generating an izpack installer or an rpm). An Ivy task would certainly 
be a nice thing to have for this.
For now I think I can live with using Maven for the deploy :-)

cheers,
Tom

Re: Howto publish a JAR that was not generated by Maven to the m2 repo ?

Posted by Steve Loughran <st...@gmail.com>.
On 27/06/07, tomdz <to...@apache.org> wrote:
> Hi folks,
>
> I want to publish the DdlUtils 1.0 jar to the m2 Maven repository.
> Since we're not using Maven at all (plain old Ant :-) ), I have to push
> the artifact manually somehow. FYI, JAR and signature/checksum files are
> here:
>


This is something I have to write up, maybe we can extend Ivy to make
it easier.

Right now here is my build file to create an izpack installer, rpms
and publish artifacts to a maven2 compatible repository:

http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/release/build.xml?view=markup

The pom files and md5s are done elsewhere; every jar has a template
pom that is copied with ant property expansion (one of the properties
includes a comment that creates an audit trail of who created the pom
and when), then <checksum> is used to create the md5 signatures. These
are all scp'd up to the target server.