You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hohl, Gerrit" <g....@aurenz.de> on 2016/05/13 07:05:50 UTC

Create own Maven repository

Hallo everyone,

 

today it's about creating your own Maven repository as plain file
structure on a webserver.

 

My problem: I have a project and Sourceforge (Please no pro and con sf
discussion :P ).

I want to offer my library also via a Maven repository - snapshots as
well as releases.

 

So I deployed my files into a directory which I upload into a
sub-directory on the webspace of my sf project.

I used the following VM argument:

-DaltDeploymentRepository=snapshot-repo::default::file:C:/Users/myuser/D
esktop/snapshots

Afterwards I uploaded it to the webspace of my sf project into a sub
folder and added a corresponding "proxy repository" in Nexus.

But that somehow doesn't work: Nexus is not able to access the
repository - means it doesn't find anything  (unfortunately we still
have Nexus 2.6.2 here in the company).

 

I also created the archetype-catalog.xml in the root directory of the
snapshots repository.

Didn't change much.

 

Finally I created an index using the nexus-indexer-3.0.4-cli.jar:

java -jar nexus-indexer-3.0.4-cli.jar -r snapshots -i snapshots/.index
-d snapshots/.index -n myproject -s -t full

Now Nexus gets the structure and files the first time it requests the
repository.

But it doesn't get any updates of the snapshots repository.

Somehow it doesn't figure out the difference between the last update and
the next update.

I also created 2 scheduled tasks in Nexus: One "Update Repositories
Index" task and one "Download Indexes" task for that repository.

But when I run them it doesn't change anything.

 

Any ideas how to solve that problem?

 

Regards

Gerrit

 


Re: Create own Maven repository

Posted by Barrie Treloar <ba...@gmail.com>.
On 13 May 2016 at 22:33, Ron Wheeler <rw...@artifact-software.com> wrote:

> Small technical correction on military notation.
>
> Are you sure that you did not mean FUBARed rather than SNAFU?\


This is Maven we are talking about, its definitely SNAFU.

Re: Create own Maven repository

Posted by Barrie Treloar <ba...@gmail.com>.
On 13 May 2016 at 22:33, Ron Wheeler <rw...@artifact-software.com> wrote:

> Small technical correction on military notation.
>
> Are you sure that you did not mean FUBARed rather than SNAFU?

Re: Create own Maven repository

Posted by Ron Wheeler <rw...@artifact-software.com>.
Small technical correction on military notation.

Are you sure that you did not mean FUBARed rather than SNAFU?

Ron

On 13/05/2016 3:16 AM, Barrie Treloar wrote:
> A snapshot repository won't behave how you think it will behave.
> I recommend not providing one.
>
> As a developer you want your code base to be in a known configured state.
> Having a snapshot repository will mean that Maven will pull in a new
> snapshot occasionally (you have some control over when they might be) and
> if that snapshot is SNAFU then you have just stopped that developer from
> being productive. If a developer wants a snapshot let them pull your code
> down and built it themselves, then if the code is SNAFU they can choose a
> previous revision from source control to use instead.
>
> Since you are talking about a sourceforge project then you are providing an
> open source, so you are better off deploying your releases to central.
> Your users will thank you for not slowing their build times down with your
> custom repo.
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


Re: Create own Maven repository

Posted by Manfred Moser <ma...@simpligility.com>.
I totally agree with that. If you run into any problems with that please reach out to me and I can help in detail as I wrote most of the linked docs and also created a video series with tips and just recently did a fully automated setup with Atlassian Pipelines for example.

http://www.sonatype.org/nexus/2016/05/24/sonatype-automated-deployments-with-atlassian-bitbucket-pipelines/

Manfred



Jeff Jensen wrote on 2016-05-13 05:13:

>>
>> I want to offer my library also via a Maven repository - snapshots as well
>> as releases.
> 
> 
> Use Sonatype's free OSS repo hosting [0].  It also provides the easiest and
> fastest path for deploying artifacts into Central.
> 
> Essentially:
> 1. Deploy snapshots and releases to it.
> 2. Promote successful releases from it to Central when desired.
> 
> 
> [0] http://central.sonatype.org/pages/ossrh-guide.html
> 
> 
> On Fri, May 13, 2016 at 2:16 AM, Barrie Treloar <ba...@gmail.com> wrote:
> 
>> A snapshot repository won't behave how you think it will behave.
>> I recommend not providing one.
>>
>> As a developer you want your code base to be in a known configured state.
>> Having a snapshot repository will mean that Maven will pull in a new
>> snapshot occasionally (you have some control over when they might be) and
>> if that snapshot is SNAFU then you have just stopped that developer from
>> being productive. If a developer wants a snapshot let them pull your code
>> down and built it themselves, then if the code is SNAFU they can choose a
>> previous revision from source control to use instead.
>>
>> Since you are talking about a sourceforge project then you are providing an
>> open source, so you are better off deploying your releases to central.
>> Your users will thank you for not slowing their build times down with your
>> custom repo.
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Create own Maven repository

Posted by Jeff Jensen <je...@upstairstechnology.com>.
>
> I want to offer my library also via a Maven repository - snapshots as well
> as releases.


Use Sonatype's free OSS repo hosting [0].  It also provides the easiest and
fastest path for deploying artifacts into Central.

Essentially:
1. Deploy snapshots and releases to it.
2. Promote successful releases from it to Central when desired.


[0] http://central.sonatype.org/pages/ossrh-guide.html


On Fri, May 13, 2016 at 2:16 AM, Barrie Treloar <ba...@gmail.com> wrote:

> A snapshot repository won't behave how you think it will behave.
> I recommend not providing one.
>
> As a developer you want your code base to be in a known configured state.
> Having a snapshot repository will mean that Maven will pull in a new
> snapshot occasionally (you have some control over when they might be) and
> if that snapshot is SNAFU then you have just stopped that developer from
> being productive. If a developer wants a snapshot let them pull your code
> down and built it themselves, then if the code is SNAFU they can choose a
> previous revision from source control to use instead.
>
> Since you are talking about a sourceforge project then you are providing an
> open source, so you are better off deploying your releases to central.
> Your users will thank you for not slowing their build times down with your
> custom repo.
>

Re: Create own Maven repository

Posted by Barrie Treloar <ba...@gmail.com>.
A snapshot repository won't behave how you think it will behave.
I recommend not providing one.

As a developer you want your code base to be in a known configured state.
Having a snapshot repository will mean that Maven will pull in a new
snapshot occasionally (you have some control over when they might be) and
if that snapshot is SNAFU then you have just stopped that developer from
being productive. If a developer wants a snapshot let them pull your code
down and built it themselves, then if the code is SNAFU they can choose a
previous revision from source control to use instead.

Since you are talking about a sourceforge project then you are providing an
open source, so you are better off deploying your releases to central.
Your users will thank you for not slowing their build times down with your
custom repo.