PrimeFaces in Maven central repo

UI Components for JSF
tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

26 Oct 2011, 17:19

IMO it's not mandatory for users to add it to the central repo but it would be easier!
On the other hand, as oleg said, it's a requirement for the extensions project that PrimeFaces exists in the central repo!
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

26 Oct 2011, 18:12

Large company and banks (read money) often put some restrictions and it is a real burden to make them register a new repository
True 100%.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

27 Oct 2011, 10:24

Looked just now in Maven central repo. MyFaces, Mojarra, ICEFaces, PrettyFaces, Trinidad, Ajax4JSF, ... - all in Maven central repo.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Oct 2011, 11:18

Can't these large banks download it from primefaces.org and do mvn install:file? It should take less than 5 min.

nicolasr
Posts: 32
Joined: 08 Dec 2010, 00:26
Location: France
Contact:

27 Oct 2011, 11:53

Generally they can't either download jars so easily too... (there are strict fw policy)

mario_anta
Posts: 24
Joined: 25 Oct 2011, 09:57

27 Oct 2011, 11:58

Indeed, I do my downloads at home then bring them in the office. Not exactly convenient and it's also circumventing the official policy - real bad thing actually. But what can one do otherwise?
Anyway - is there any argument AGAINST publishing it in the Maven repo?
Tomcat 7, MyFaces 2.1.9, PF 3.4.1, PFE 0.6.1, STS 3.1, Java 1.7, W7x64

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

27 Oct 2011, 12:11

Cagatay, mvn install:install-file installs into the local repository only. It's good if you a single developer :-) We have a company wide repo too, but I'm not permitted to deploy artefacts into this. When I need something from other repos and artefact is not in Maven central, I run to the responsible person and pray, pray, pray to him to deploy this artefact into company wide repo. In 2-3 days I have that.

I have deployed yearsteday 3 artefacts into Maven central repo (just wanted to share with PrimeFaces one great Maven plugin, will write today-tomorrow about it). It takes less than 5 min. After that I recieved a confirmation from Sonatype "Central sync is activated for org.primefaces, it runs about every 2 hours." So, it's even much easier now. But if you don't allow us to deploy released versions there, we accept your opinion and will look for another possiblities. It's your project, you are boss.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

27 Oct 2011, 12:15

I do my downloads at home then bring them in the office
Extreme :shock:
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Oct 2011, 13:09

Will central sync artifacts with prime repo then?

Don't get me wrong, I'm not against this, we just don't have the know how or the time to get the know-how to make it available.

Oleg I appreciate your major contribution here. So last thing I wonder is if central syncs with prime repo so whenever I put a GA or a snapshot will they also be available in central after 2 hours?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

27 Oct 2011, 14:55

Cagatay, I can understand you, often I don't have time as well to look deeper into some things and need a quick introduction. I try to explain major steps. You can find a detailed explaination in this offcial document https://docs.sonatype.org/display/Repos ... sage+Guide

First of all - this is a service from Sonatype OSS Repository Hosting Service for open source projects. Sonatype doesn't synchronize any repos with Maven central repo. You can deploy snapshots and releases to Sonatype. Only released versions go to Maven central (central repo doesn't have snapshots at all). Sonatype synchronizes released versions with Maven central. Snapshots stay in Sonatype OSS repo. I suggest to deploy only released versions of PrimeFaces. You can still deploy snaphsots to Prime repo (time to time). Prime repo is okey for snapshots and it dosn't hurt. Of course you are free to deploy released versions to Prime repo as well (if it makes sense).

1) The first step is a Sonatype JIRA account if you don't have already one. Such account can be got here https://issues.sonatype.org/ and it takes max. 5 min. You just create a JIRA ticket with your small project description (see the mentioned above document what you should input there).

2) The second step is a preparation of your pom.xml. You already have almost all nessesary tags (except 3-4, see the mentioned above document). The most important thing is this section in your (master) pom.

Code: Select all

<project>
  ...
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  ...
</project>
3) The third step is a PGP installation and generation of public / private keys. This step have to be done just once. Artefact will be signed with private key. Artifact signing is only necessary when it's time to release project. I suggest to use a Maven PGP plugin which does all work automatically. Here is an offcial document how to do this step https://docs.sonatype.org/display/Repos ... With+Maven

4) The last step is to call

Code: Select all

mvn -Prelease release:clean
mvn -Prelease release:prepare
mvn -Prelease release:perform -Darguments=-Dgpg.passphrase=<your passphrase you input when created PGP keys>
That's all. These calls create a SVN tag for released version, update project version (you will be asked), transfer files to your SVN, Sonatype, checkin/out and do all work. After that you have to go to Sonatype Nexus https://oss.sonatype.org/index.html#welcome, log in and press Close / Release button for the uploaded (staged) in the step 4 artefact (chapter 8 in the first mentioned document). In 2 hour you have it in Maven central repo. Yesterday deployed by me artefacts were available today morning http://search.maven.org/#search|ga|1|pr ... extensions :-)

BTW, I have a Sonatype account and could do this job quickly for you if you want. After PF release. Probably I will write yet a blog post with all details soon. Hope it will help you to make a right decision. Thanks for your effort.

P.S. You know, this is a nice to have thing, PrimeFaces works without that of course. But it's a good style to do that. For instance, Java code can be either formatted or can stay unformatted. The program is still working, but formatted code looks nicer, more readable and is a big plus for project owner. PrimeFaces in Maven central repo would be a very big plus for your great project.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests