EAP 6 comes with a Maven Repository - this means that you can now easily migrate from JBoss AS 7 to EAP 6 if your project follows good
best practices concerning use of Maven dependencies. But it is about much more than just easy migration.
The best practices we applied to the use of Enterprise Maven Repository is some that many jboss.org projects could and should consider using since it allows the projects to be easily available for productization and be easy to consume by users in tools like JBoss Tools, Forge and the many Quickstarts built around the Maven best practices.
In this talk I'll present how the Maven repository came to be, what concerns we wanted to address, how you as a user utilizes this maven repository best and how jboss.org projects can benefit from its best practices too.
20. Tools/IDE
Migrations Documentation
Upgrades
Standards/Guidelines
Platform JBoss
Quality
Candidate Enterprise
Assurance
Release Middleware
Support Getting Started
Books Examples
Builds
Trainings
Friday 29 June 12
21. Maven
• 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, …
Friday 29 June 12
23. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
Friday 29 June 12
24. What is a Maven Repository
• A directory of artifacts (jar, doc, source, zip,
etc.)
• All with a unique GAV ID
Friday 29 June 12
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
Friday 29 June 12
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
Friday 29 June 12
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
Friday 29 June 12
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
Friday 29 June 12
29. How Maven Works...
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
30. How Maven Works...
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
31. How Maven Works...
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
32. How Maven Works...
Maven
~/.m2/ Central
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
33. How Maven Works...
Maven
~/.m2/ Central
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
34. How Maven Works...
Maven
~/.m2/ Central
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
35. How Maven Works...
Maven
~/.m2/ Central
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version>
</dependency>
Friday 29 June 12
36. How Maven Works...
Maven
~/.m2/ Central
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
Friday 29 June 12
37. How Maven Works...
Maven
~/.m2/ Central
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
Friday 29 June 12
38. How Maven Works...
Maven
~/.m2/ Central
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
Friday 29 June 12
39. How Maven Works...
Maven
~/.m2/ Central
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
Friday 29 June 12
40. How Maven Works...
Maven
~/.m2/ Central
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
richfaces-api.jar
Friday 29 June 12
41. How Maven Works...
Maven
~/.m2/ Central
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0</version> Company X
</dependency>
Which richfaces-api.jar ?
richfaces-api.jar
Friday 29 June 12
42. jsf-api.jar
richfaces-api.jar
Friday 29 June 12
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...
Friday 29 June 12
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
Friday 29 June 12
48. How Enterprise Maven
Repo Works
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
49. How Enterprise Maven
Repo Works
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
50. How Enterprise Maven
Repo Works
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
51. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
52. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
53. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
54. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
55. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version>
</dependency>
Friday 29 June 12
56. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
Friday 29 June 12
57. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
Friday 29 June 12
58. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
Friday 29 June 12
59. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
Which richfaces-api.jar ?
Friday 29 June 12
60. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
Which richfaces-api.jar ?
Friday 29 June 12
61. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
richfaces-api.jar
Which richfaces-api.jar ?
Friday 29 June 12
62. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
richfaces-api.jar
Which richfaces-api.jar ?
Friday 29 June 12
63. How Enterprise Maven
Repo Works
Maven Central
~/.m2/
pom.xml richfaces-api.jar JBoss.org
:
<dependency>
richfaces-api.jar
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
<version>4.0.0-redhat-1</version> maven.repository.jboss.org
</dependency>
richfaces-api.jar
Which richfaces-api.jar ?
Company X
Friday 29 June 12
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)
Friday 29 June 12
68. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12
69. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12
70. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12
71. What is there today ?
http://maven.repository.redhat.com JBoss Developer Studio
QuickStarts/Archetypes Forge
JBoss Developer Framework Arquillian
The JBoss Way OpenShift
Friday 29 June 12
88. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12
89. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12
90. Getting in...
• CDI Enable your programming model
• Transitive Closure of Dependencies in Maven Central
• Maven Archetypes
• Provide a single BOM’s for your framework
• Create Quickstarts
• Tooling
• Path to product
• OpenShift
• Mobile
Friday 29 June 12