Red Hat Enterprise Application Platform 6 comes with Maven repository, meaning customers can now easily migrate from JBoss Application Server 7 to Red Hat JBoss Enterprise Application Platform 6. The Maven repository best practices can be used by many Maven-based projects and should be considered as they enable easy upgrades and migrations regardless of using Red Hat JBoss Enterprise Application Platform, Red Hat JBoss SOA Platform, or Red Hat JBoss Data Grid.
In this session, Max Rydahl Andersen will discuss these best practices and their benefits, as well as:
How the Maven repository came to be
What concerns the repository addresses
How a user can best utilize Maven repository
21. • Pervasive Build and Dependency Management Tool
• Gives a common language to express project
structure and which artifacts a project needs and
which it produces
• Perfect for examples, sharing, teams, continuos
integration, …
Maven
Saturday 15 June 13
22. What is a Maven Repository
Saturday 15 June 13
23. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
Saturday 15 June 13
24. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
Saturday 15 June 13
25. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
• Group org.richfaces.core
Saturday 15 June 13
26. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
• Group org.richfaces.core
• Artifact richfaces-api.jar
Saturday 15 June 13
27. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
• Group org.richfaces.core
• Artifact richfaces-api.jar
• Version 4.0.2
Saturday 15 June 13
28. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
• Group org.richfaces.core
• Artifact richfaces-api.jar
• Version 4.0.2
• Metadata for dependencies between artifacts
Saturday 15 June 13
45. Project Wolf!
• Enterprise Maven Repository
• Every jar, javadoc, source, etc.
available with unique GAV
• BOM POM for stacks
• Across All JBoss Enterprise
Middleware
• EAP 6/WFK 2/JDG 6
• .zip distribution
• ...and...
Saturday 15 June 13
47. How to use ?
• Add http://maven.repository.redhat.com/techpreview/all to
~/.m2/settings.xml
• enterprise=true on archetypes/JBoss Central
• http://jboss.org/developer
Saturday 15 June 13
48. How Enterprise Maven
Repo Works
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
49. How Enterprise Maven
Repo Works
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
50. How Enterprise Maven
Repo Works
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
51. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
52. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
53. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
54. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
55. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
Saturday 15 June 13
56. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
Saturday 15 June 13
57. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
Saturday 15 June 13
58. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Saturday 15 June 13
59. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Which richfaces-api.jar ?
Saturday 15 June 13
60. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Which richfaces-api.jar ?
richfaces-api.jar
Saturday 15 June 13
61. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Which richfaces-api.jar ?
richfaces-api.jar
richfaces-api.jar
Saturday 15 June 13
62. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Which richfaces-api.jar ?
richfaces-api.jar
richfaces-api.jar
Saturday 15 June 13
63. How Enterprise Maven
Repo Works
Maven Central
JBoss.org
~/.m2/
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
pom.xml
:
maven.repository.jboss.com
richfaces-api.jar
Which richfaces-api.jar ?
richfaces-api.jar
richfaces-api.jar
Company X
Saturday 15 June 13
64. Project Wolf “Rules”
1. Unique Group-Artifact-Version (GAV)
2. Community version + -redhat-<id>
• hibernate-validator-4.2.0.Final-redhat-1
• richfaces-api-4.0.0.Final-redhat-3
3. BOM POM’s for the stack(s)
Saturday 15 June 13
67. What is there today ?
http://maven.repository.redhat.com
QuickStarts/Archetypes
JBoss Developer Framework
The JBoss Way
JBoss Developer Studio
Forge
Arquillian
OpenShift
Saturday 15 June 13