This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Upload to Central repo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Upload to Central repo" Watch "Upload to Central repo" New topic
Author

Upload to Central repo

Petr parsentev
Greenhorn

Joined: Jan 19, 2013
Posts: 2
Hello, I am wondering, How can I share my maven artifact,
I have read the article http://maven.apache.org/guides/mini/guide-central-repository-upload.html
and there are said that I can not use external repositories. But I use it in my artifact.

Could anybody help me with this problems?

Yours faithfully.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

If you upload your artifact to Maven Central, and that artifact relies on other artifacts that are not in Maven Central, how will other people access those artifacts?

Most development teams solve this on one of two ways:

a) The development team establishes their own repository (using Nexus or Arifactory) and places their artifacts into that repository but does not make that repository available on the internet. This works well for teams that want to share artifacts with team other but not with the world (and i crucial in proprietary environments). This is what we do at work.

b) Same as "a", but the repository is made available on the internet. This way anyone can make use of those artifacts but the control of the repository remains in the hands of the development team. An example is the JBoss Maven repository.



JBoss In Action
Petr parsentev
Greenhorn

Joined: Jan 19, 2013
Posts: 2
Thanks. This is clear. But I would like to add more details, because I don't want to use special servers for this task. We develop an e-commercial product. It supports to add extensions. I need to build the atricaft, It helps to develop new extensions, but it should be used the core lib of this product. For this reason I have pushed this library in GitHub repo and made some settings that it can be the dependency of any maven artifact. The next task, which I want to solve, is to share this artifact. I mean the external repo has public access.

Is it possibly to do with this conditions?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I believe you can do this, provided the GitHub repo follows the Maven repository protocol (I never worked with it so I don't know). You need to document to your customers that are creating extensions that they need to add a <repository> entry in their POMs to access your artifact.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Upload to Central repo