Skip to main content

Maven Archetype Creation/Updation

The OpenESB archetypes are in Bitbucket under openesb-eclipse-soa repository, if you can add or modify functionalities, then use the links to execute pipeline to update archetypes in nexus. When the deployment is finished, if you change the version number you shall change the information archetypes on nexus https://nexus.vico.org/#browse/browse:openesb-premium-archetype-catalog:archetype-catalog.xml

Generic BPEL Archetype

Generic CA Archetype

This is the documentation of the firs archetypes created by, we need generic becouse clients decide the repositories to use and distribution management.

User Guide for Creating, Modifying, and Deploying a Maven Archetype for BPEL and CA.

This guide provides step-by-step instructions for creating a Maven archetype from an existing project, modifying it, and deploying it using Maven. Follow the steps below to successfully prepare and deploy your archetype.

Prerequisites

  • Ensure you have Apache Maven installed on your system.

  • Verify your Maven installation by running:

mvn –version

  • Download the template BPEL and Composite application folder and files provided.

Repeat below steps for BPEL and Composite Application.

Step 1: Create an Archetype from the Existing Project

  1. Navigate to Your Project Directory:
    Open a terminal and change to the directory of your existing Maven project.

bash

cd /path/to/your/project

  1. Create the Archetype:

Update the version in the pom.xml file
Run the following command to create an archetype from your project:

bash

mvn archetype:create-from-project -s PATH_TO_SETTINGS.XML

This command generates the archetype in the target/generated-sources/archetype directory.

Step 2: Navigate to the Generated Archetype

  1. Change Directory:
    Move into the generated archetype directory:

bash

cd target/generated-sources/archetype

  1. Build the Archetype:
    Clean and install the archetype:

bash

mvn clean install

Step 3: Modify the Archetype to include nexus related repository paths.

  1. Edit the POM File:
    Open the pom.xml file located in target/generated-sources/archetype and add any necessary Nexus-related plugins. Here's an example of how to add a Nexus plugin:

xml

<![CDATA[<repositories>

                                        <repository>

                                                            <id>nexus-releases</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-releases/</url>

                                        </repository>

                                        <repository>

                                                            <id>nexus-snapshots</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-snapshots/</url>

                                                            <snapshots />

                                        </repository>

                    </repositories>

                    <distributionManagement>

                                        <repository>

                                                            <id>nexus-releases</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-releases/</url>

                                        </repository>

                                        <snapshotRepository>

                                                            <id>nexus-snapshots</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-snapshots/</url>

                                        </snapshotRepository>

                    </distributionManagement>

                    <pluginRepositories>

                                        <pluginRepository>

                                                            <id>nexus-snapshots</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-snapshots/</url>

                                                            <releases>

                                                                                <enabled>false</enabled>

                                                            </releases>

                                                            <snapshots>

                                                                                <updatePolicy>always</updatePolicy>

                                                            </snapshots>

                                        </pluginRepository>

                                        <pluginRepository>

                                                            <id>nexus-releases</id>

                                                            <url>https://nexus.vico.org:8443/repository/maven-releases/</url>

                                                            <releases>

                                                            </releases>

                                                            <snapshots>

                                                                                <enabled>false</enabled>

                                                            </snapshots>

                                        </pluginRepository>

                    </pluginRepositories>]]>
  1. Add Additional Configuration:
    Customize other configurations as needed, such as properties or dependencies.

Step 4: Deploy the Archetype

  1. Deploy to Nexus:
    After modifying the pom.xml, deploy your archetype using the following command:

bash

mvn clean deploy

This command will package your archetype and deploy it to your configured Nexus repository.