Skip to content

Commit d1ee081

Browse files
author
Alexis Resendiz A.
committed
Updated project documentation to include build, installation and usage
of the archetypes and target POMs.
1 parent 8001638 commit d1ee081

3 files changed

Lines changed: 250 additions & 30 deletions

File tree

README.md

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,58 @@
11
ci.maven.tools
22
==============
33

4-
Collection of Maven archetypes and target pom's for developing Java EE and OSGi applications targetting the WebSphere Application Server Liberty Profile within the WDT Eclipse IDE.
4+
ci.maven.tools is a collection of Maven archetypes and target POMs for developing Java EE and OSGi applications targeting WebSphere Application Server Liberty within the WDT Eclipse IDE.
55

6-
## Maven Target Pom's
6+
##Projects
77

8-
### liberty-target
8+
There are provided two different projects to be used in Maven environments: [Maven Target POMs](#maven-target-poms), a set of convenience POMs that groups WebSphere Liberty dependencies; and [Maven archetypes](#archetypes), to create new Maven projects with recommended configurations and dependencies targeting WebSphere Liberty.
99

10-
#### Usage: Add the following dependency to your application pom.xml to represent the Liberty and spec API libraries
10+
### [Maven Target POM's](/docs/target-poms.md)
1111

12-
<dependency>
13-
<groupId>net.wasdev.maven.tools</groupId>
14-
<artifactId>liberty-target</artifactId>
15-
<version>LATEST</version>
16-
<type>pom</type>
17-
<scope>provided</scope>
18-
</dependency>
19-
20-
### liberty-target-impl
12+
Project containing convenience POMs that groups a set of WebSphere Liberty APIs/SPIs, java specifications and third-party dependencies provided by the runtime.
2113

22-
#### Usage: Add the following dependency to your application pom.xml to represent the Liberty 3rd Party implementation API libraries
14+
Following are the provided modules for this project:
2315

24-
<dependency>
25-
<groupId>net.wasdev.maven.tools</groupId>
26-
<artifactId>liberty-target-impl</artifactId>
27-
<version>LATEST</version>
28-
<type>pom</type>
29-
<scope>provided</scope>
30-
</dependency>
16+
* [liberty-target](/docs/target-poms.md#liberty-target) - Creates a POM that provides references to all modules (APIs/SPIs, java specifications and third-party implementations).
17+
* [liberty-apis](/docs/target-poms.md#liberty-apis) - Creates a POM with Liberty API dependencies.
18+
* [liberty-spis](/docs/target-poms.md#liberty-spis) - Creates a POM with Liberty SPI dependencies.
19+
* [java-specs](/docs/target-poms.md#java-specs) - Creates a POM with Java specification dependencies that a Liberty installation provides in the `dev/api/spec` and `/dev/spi/spec` folders.
20+
* [third-party](/docs/target-poms.md#third-party) - Creates a POM with third-party dependencies that a Liberty installation provides in the `dev/api/third-party` and `/dev/spi/third-party` folders.
3121

32-
## Archetypes
22+
### [Archetypes](/docs/archetypes.md)
23+
24+
Project with Maven archetypes for creating new Java EE and OSGi projects targeting WebSphere Liberty within the WDT Eclipse IDE.
25+
26+
#### Java EE archetypes
27+
28+
Archetype | Project type
29+
----------------------- | ------------
30+
ejb-jee5-liberty | EJB 3.0 project
31+
ejb-jee6-liberty | EJB 3.1 project
32+
ejb-jee7-liberty | EJB 3.2 project
33+
webapp-jee5-liberty | Web 2.5 project
34+
webapp-jee6-liberty | Web 3.0 project
35+
webapp-jee7-liberty | Web 3.1 project
36+
37+
#### OSGi Enterprise archetypes
38+
39+
Archetype | Project type
40+
----------------------- | ------------
41+
osgi-ejb30-liberty | OSGi EJB 3.0 project
42+
osgi-ejb31-liberty | OSGi EJB 3.1 project
43+
osgi-liberty | OSGi project
44+
osgi-web25-liberty | OSGi Web 2.5 project
45+
osgi-web30-liberty | OSGi Web 3.0 project
46+
osgi-web31-liberty | OSGi Web 3.1 project
47+
48+
##How to build
49+
50+
To build and install the whole project in your local Maven repository, locate in the root folder and then execute one of the following commands in a Maven terminal.
51+
52+
* `mvn install`: installs the archetypes and target POMs into your local Maven repository.
53+
* `mvn install -DskipTests`: installs the archetypes and target POMs into your local Maven repository without executing testing.
3354

34-
### liberty-ejb31-archetype - Creates EJB 3.1 Module Project targeting Liberty profile
35-
### liberty-ejb32-archetype - Creates EJB 3.2 Module Project targeting Liberty profile
36-
### liberty-osgi-ejb30-archetype - Creates OSGi with EJB 3.0 Bundle Project targeting Liberty profile
37-
### liberty-osgi-ejb31-archetype - Creates OSGi with EJB 3.1 Bundle Project targeting Liberty profile
38-
### liberty-osgi-web30-archetype - Creates OSGi with Servlet 3.0 Web Application Bundle Project targeting Liberty profile
39-
### liberty-osgi-web31-archetype - Creates OSGi with Servlet 3.1 Web Application Bundle Project targeting Liberty profile
40-
### liberty-web30-archetype - Creates Servlet 3.0 Web Application Module Project targeting Liberty profile
41-
### liberty-web31-archetype - Creates Servlet 3.1 Web Application Module Project targeting Liberty profile
55+
Notice:
4256

57+
* Require of Apache Maven 2.x or later.
58+
* There's an Apache Maven issue related to archetype testing in Maven 3.3.x versions. You can workaround this, by creating a copy of "mvn.cmd" named "mvn.bat" in MAVEN_HOME/bin. For more details, see: https://issues.apache.org/jira/browse/ARCHETYPE-488

docs/archetypes.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Archetypes
2+
==========
3+
4+
This multi-module project contains archetypes to develop new Maven Java EE and OSGi projects with recommended configurations and dependencies targeting WebSphere Liberty.
5+
6+
*Note: Usage of following archetypes is recommended with WAS Developer Tools (WDT) for Eclipse IDE.*
7+
8+
##Project structure
9+
10+
archetypes/ - Parent POM to build all archetypes
11+
pom.xml
12+
ejb-jee5-liberty/ - EJB 3.0 archetype module
13+
pom.xml
14+
ejb-jee6-liberty/ - EJB 3.1 archetype module
15+
pom.xml
16+
ejb-jee7-liberty/ - EJB 3.2 archetype module
17+
pom.xml
18+
osgi-ejb30-liberty/ - OSGi EJB 3.0 archetype module
19+
pom.xml
20+
osgi-ejb31-liberty/ - OSGi EJB 3.1 archetype module
21+
pom.xml
22+
osgi-liberty/ - OSGI archetype module
23+
pom.xml
24+
osgi-web25-liberty/ - OSGi Web 2.5 archetype
25+
pom.xml
26+
osgi-web30-liberty/ - OSGi Web 3.0 archetype
27+
pom.xml
28+
osgi-web31-liberty/ - OSGi Web 3.1 archetype
29+
pom.xml
30+
webapp-jee5-liberty/ - Web 2.5 archetype
31+
pom.xml
32+
webapp-jee6-liberty/ - Web 3.0 archetype
33+
pom.xml
34+
webapp-jee7-liberty/ - Web 3.1 archetype
35+
pom.xml
36+
37+
##Archetypes list
38+
39+
Following is the list of provided archetypes. The Archetypes groupId is `net.wasdev.maven.tools.archetypes`
40+
41+
### Java EE archetypes
42+
43+
Archetype artifactId | Project type
44+
----------------------- | ------------
45+
ejb-jee5-liberty | EJB 3.0 project
46+
ejb-jee6-liberty | EJB 3.1 project
47+
ejb-jee7-liberty | EJB 3.2 project
48+
webapp-jee5-liberty | Web 2.5 project
49+
webapp-jee6-liberty | Web 3.0 project
50+
webapp-jee7-liberty | Web 3.1 project
51+
52+
### OSGi Enterprise archetypes
53+
54+
Archetype artifactId | Project type
55+
----------------------- | ------------
56+
osgi-ejb30-liberty | OSGi EJB 3.0 project
57+
osgi-ejb31-liberty | OSGi EJB 3.1 project
58+
osgi-liberty | OSGi project
59+
osgi-web25-liberty | OSGi Web 2.5 project
60+
osgi-web30-liberty | OSGi Web 3.0 project
61+
osgi-web31-liberty | OSGi Web 3.1 project
62+
63+
##Usage information
64+
65+
You can use the provided archetypes by using WDT for Eclipse IDE and by CLI.
66+
67+
###Usage with WDT for Eclipse IDE
68+
69+
1. Open the New Project Wizard by selecting **File/New/Other...** menu.
70+
2. In the Filter textbox type **Maven Project** and press **Next** button.
71+
3. Press again **Next** button and then ensure the **All Catalogs** option is selected in the **Catalog** combo box.
72+
4. In the **Filter** textbox type **net.wasdev.maven.tools.archetypes**.
73+
5. Select one of the provided archetypes and then follow the Wizard.
74+
6. Once completed, wait until all processes conclude and WDT for Eclipse IDE will install project facets and configure your Maven project in base of the archetype you chose at step 5.
75+
76+
###Usage by CLI
77+
78+
Open a Maven terminal and then execute following command to generate a new Maven project:
79+
80+
`mvn archetype:generate -DarchetypeArtifactId=<archetype_artifact_id> -DarchetypeGroupId=net.wasdev.maven.tools.archetypes`
81+
82+
After executing the command the interactive mode will be asked for some values like your artifactId, groupId and version for your project before finishing.
83+
84+
##How to build
85+
86+
*Before building this project in your machine, ensure you have installed the [target POMs project](../docs/target-poms.md) as archetypes use net.wasdev.maven.tools.targets:liberty-target:RELEASE dependency*.
87+
88+
To build the whole archetypes project locate in the `archetypes/` folder and execute following command in a Maven terminal:
89+
90+
`mvn install`: builds and install all archetypes in the local repository.
91+
92+
If you need to build one of the modules, just locate in the module folder you want and execute the previous command.

docs/target-poms.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
Maven target POMs
2+
=================
3+
4+
This project contains all convenience POMs that list WebSphere Liberty dependencies aligned to the latest release of Liberty to develop Java EE and OSGi applications.
5+
6+
Dependencies are grouped in following modules:
7+
8+
* liberty-target - All WebSphere Liberty dependencies (APIs/SPIs, java specifications and third-party implementations)
9+
* liberty-apis - WebSphere Liberty APIs dependencies
10+
* liberty-spis - WebSphere Liberty SPIs dependencies
11+
* java-specs - Java specifications dependencies
12+
* third-party - Third-party implementations
13+
14+
## Project structure
15+
16+
targets/ - Parent to build all modules
17+
pom.xml
18+
java-specs/ - Java specifications module
19+
pom.xml
20+
liberty-apis/ - WebSphere Liberty APIs module
21+
pom.xml
22+
liberty-spis/ - WebSphere Liberty SPIs module
23+
pom.xml
24+
liberty-target/ - Aggregator of all modules
25+
pom.xml
26+
third-party/ - Third-party dependencies module
27+
pom.xml
28+
29+
##Usage information
30+
31+
Following modules add WebSphere Liberty dependencies to your project. Add the dependency snippet to your Maven project to reference all dependencies automatically.
32+
33+
It's important to notice that the version of the `liberty-target`, `liberty-apis` and `liberty-spis` are aligned to the release of WebSphere Liberty, so you can use older versions by changing the version of those artifacts.
34+
35+
###liberty-target
36+
37+
This project aggregates all other modules that references WebSphere Liberty APIs/SPIs, java specifications and third-party implementations dependencies to compile your project.
38+
39+
Dependency snippet:
40+
41+
<dependency>
42+
<groupId>net.wasdev.maven.tools.targets</groupId>
43+
<artifactId>liberty-target</artifactId>
44+
<version>RELEASE</version>
45+
<type>pom</type>
46+
<scope>provided</scope>
47+
</dependency>
48+
49+
###liberty-apis
50+
51+
WebSphere Liberty API's dependencies. This POM satisfies all APIs libraries that a Liberty installation provides in the `dev/api/ibm` folder.
52+
53+
Dependency snippet:
54+
55+
<dependency>
56+
<groupId>net.wasdev.maven.tools.targets</groupId>
57+
<artifactId>liberty-apis</artifactId>
58+
<version>RELEASE</version>
59+
<type>pom</type>
60+
<scope>provided</scope>
61+
</dependency>
62+
63+
###liberty-spis
64+
65+
WebSphere Liberty SPI's dependencies. This POM satisfies all SPIs libraries that a Liberty installation provides in the `dev/spi/ibm` folder.
66+
67+
Dependency snippet:
68+
69+
<dependency>
70+
<groupId>net.wasdev.maven.tools.targets</groupId>
71+
<artifactId>liberty-spis</artifactId>
72+
<version>RELEASE</version>
73+
<type>pom</type>
74+
<scope>provided</scope>
75+
</dependency>
76+
77+
###java-specs
78+
79+
Java specification dependencies. This POM satisfies all Java specification libraries that a Liberty installation provides in the `dev/api/spec` and `dev/spi/spec` folders.
80+
81+
Dependency snippet:
82+
83+
<dependency>
84+
<groupId>net.wasdev.maven.tools.targets</groupId>
85+
<artifactId>java-specs</artifactId>
86+
<version>RELEASE</version>
87+
<type>pom</type>
88+
<scope>provided</scope>
89+
</dependency>
90+
91+
92+
###third-party
93+
94+
Third-party implementation dependencies. This POM satisfies all third-party libraries that a Liberty installation provides in the `dev/api/third-party` and `dev/spi/third-party` folders.
95+
96+
Dependency snippet:
97+
98+
<dependency>
99+
<groupId>net.wasdev.maven.tools.targets</groupId>
100+
<artifactId>third-party</artifactId>
101+
<version>RELEASE</version>
102+
<type>pom</type>
103+
<scope>provided</scope>
104+
</dependency>
105+
106+
##How to build
107+
108+
To build the whole target POMs project locate in the `targets/` folder and execute following command in a Maven terminal:
109+
110+
`mvn install`: builds and install all target POMs in the local repository.
111+
112+
If you need to build one of the modules, just locate in the module folder you want and execute the previous command.

0 commit comments

Comments
 (0)