Add Primefaces Elite version to a maven project

UI Components for JSF
Post Reply
User avatar
afterbit
Posts: 100
Joined: 19 Mar 2012, 23:51
Contact:

20 Sep 2022, 16:39

I have a PF Elite account and a maven jsf project (pom.xml) ..
How can I add the PF dependency of my Elite account (in pom.xml) ? (I only see the public version of PF, which is usually some older versions than the Elite)
thanks!

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

20 Sep 2022, 17:50

You will have to add the elite versions to your local / internal Maven repository
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

User avatar
afterbit
Posts: 100
Joined: 19 Mar 2012, 23:51
Contact:

20 Sep 2022, 17:53

ok.. how?

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

21 Sep 2022, 19:02

PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

tony.herstell
Posts: 214
Joined: 29 Nov 2011, 00:40

07 Oct 2022, 00:20

This works really well for me (keep it with the project Guys/Girls)!

I dont know why the fascination with building complicated build systems...

Add a directory into your project at the base level and add these files (update as needed)

local-repo
-> org
-> primefaces
-> atlantis-theme
-> 3.0.0
-> atlantis-theme-3.0.0.jar
-> atlantis-theme-3.0.0.pom
maven-metadata-local.xml
-> primefaces
-> primefaces-10.0.7.jar
-> primefaces-10.0.7.pom
maven-metadata-local.xml

The antlantic-theme-3.0.0.pom:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.primefaces</groupId>
  <artifactId>atlantis-theme</artifactId>
  <version>3.0.0</version>
</project>
The primefaces-10.0.7.pom:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.primefaces</groupId>
  <artifactId>primefaces</artifactId>
  <version>10.0.7</version>
</project>

The maven-metadata-local.xml's

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.primefaces</groupId>
  <artifactId>atlantis-theme</artifactId>
  <versioning>
    <release>3.0.0</release>
    <versions>
      <version>3.0.0</version>
    </versions>
    <lastUpdated>202105110000</lastUpdated>
  </versioning>
</metadata>

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.primefaces</groupId>
  <artifactId>primefaces</artifactId>
  <versioning>
    <release>10.0.7</release>
    <versions>
      <version>10.0.7</version>
    </versions>
    <lastUpdated>202110160000</lastUpdated>
  </versioning>
</metadata>


In your pom.xml

Code: Select all

		<primefaces.version>10.0.7</primefaces.version>
		<version.com.primefaces.atlantis>3.0.0</version.com.primefaces.atlantis>

Code: Select all

		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>${primefaces.version}</version>
		</dependency>
		<!-- Primefaces Theme -->
		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>atlantis-theme</artifactId>
			<version>${version.com.primefaces.atlantis}</version>
		</dependency>

Code: Select all

	<repositories>
		<repository>
			<id>primefaces-local-repo</id>
			<url>file://${basedir}/local-repo</url>
		</repository>
	</repositories>

This works in all projects and even in the new Quarkus projects...
For this you need to add the extension...

Code: Select all

		<myfaces.version>2.3-next-M6</myfaces.version>
** This is now 2.3-next-M7!

Code: Select all

                
                <dependency>
			<groupId>org.apache.myfaces.core.extensions.quarkus</groupId>
			<artifactId>myfaces-quarkus</artifactId>
			<version>${myfaces.version}</version>
		</dependency>
Sorry things are a little out of date.. been busy!
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

tony.herstell
Posts: 214
Joined: 29 Nov 2011, 00:40

07 Oct 2022, 00:36

BTW.
Adding the theme to a the maven project and "just using it" is non trivial.
Takes a lot of ferkeling...
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

huss_medien
Posts: 5
Joined: 21 Sep 2020, 09:04

06 Jan 2023, 12:39

afterbit wrote:
20 Sep 2022, 16:39
I have a PF Elite account and a maven jsf project (pom.xml) ..
How can I add the PF dependency of my Elite account (in pom.xml) ? (I only see the public version of PF, which is usually some older versions than the Elite)
thanks!
I am using the old school artifactory version 3.2.0 and upload the Elite API (source, lib and doc) and include the artifactory in my maven project.
It's really quite simple. Primefaces itself does not offer such a repository.

Steven

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests