Coder Social home page Coder Social logo

ci.maven's Introduction

ci.maven Build Status Maven Central Latest

Collection of Maven plugins and archetypes for managing WebSphere Application Server Liberty Profile and applications.

Build

Use Maven 2.x or 3.x to build the Liberty plugins and archetypes.

  • mvn install : builds the plugin and the archetype.
  • mvn install -Poffline-its -DwlpInstallDir=<liberty_install_directory> : builds the plugin, archetype and runs the integration tests by providing an existing installation.
  • mvn install -Ponline-its -DwlpVersion=<liberty_version> -DwlpLicense=<liberty_license_code> : builds the plugin, archetype and runs the integration tests by downloading a new server.
    • Liberty versions and their respective link to the license code can be found in the index.yml file. You can obtain the license code by reading the current license and looking for the D/N: line.

Plugins

liberty-maven-plugin

liberty-maven-plugin provides a number of goals for managing Liberty Profile server and applications.

Configuration

To enable liberty-maven-plugin in your project add the following to your pom.xml:

<project>
    ...
    <build>
        <plugins>
            <!-- Enable liberty-maven-plugin -->
            <plugin>
                <groupId>net.wasdev.wlp.maven.plugins</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>1.2</version>
                <!-- Specify configuration, executions for liberty-maven-plugin -->
                ...
            </plugin>
        </plugins>
    </build>
    ...
</project>

If you are using a snapshot version of liberty-maven-plugin then you will also need to add the following plugin repository to your pom.xml:

<project>
    ...
    <pluginRepositories>
        <!-- Configure Sonatype OSS Maven snapshots repository -->
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    ...
</project>
Liberty installation configuration

liberty-maven-plugin must first be configured with Liberty profile installation information. The installation information can be specified as an existing installation directory, a packaged server, or as a Maven artifact. The liberty-maven-plugin can also download and install Liberty profile server from the Liberty repository or other location using the install parameter. By default, the plugin will install Liberty runtime with the Java EE 7 Web Profile features from the Liberty repository.

Goals

The liberty-maven-plugin provides the following goals.

Goal Description
install-server Installs Liberty profile runtime. This goal is implicitly invoked by all the other plugin goals and usually does not need to be executed explicitly.
create-server Create a Liberty Profile server.
start-server Start a Liberty Profile server in background. The server instance will be automatically created if it does not exist.
run-server Start a Liberty Profile server in foreground. The server instance will be automatically created if it does not exist.
stop-server Stop a Liberty Profile server. The server instance must exist and must be running.
package-server Package a Liberty Profile server.
clean-server Deletes every file in the ${outputDirectory}/logs, ${outputDirectory}/workarea, ${userDirectory}/dropins or ${userDirectory}/apps.
dump-server Dump diagnostic information from the server into an archive.
java-dump-server Dump diagnostic information from the server JVM.
deploy Deploy an application to a Liberty Profile server. The server instance must exist and must be running.
undeploy Undeploy an application to a Liberty Profile server. The server instance must exist and must be running.
install-feature Install a feature packaged as a Subsystem Archive (esa) to the Liberty runtime.
uninstall-feature Uninstall a feature from the Liberty runtime.
install-apps Copy applications specified as Maven compile dependencies to Liberty server's dropins or apps directory.
Common Parameters

Parameters shared by all goals. See common parameters.

Common Server Parameters

Additional parameters shared by all server-based goals. See common server parameters.

Packaging types

liberty-assembly

The liberty-assembly Maven packaging type is used to create a packaged Liberty profile server Maven artifact out of existing server installation, compressed archive, or another server Maven artifact. Any applications specified as Maven compile dependencies will be automatically packaged with the assembled server. Liberty features can also be installed and packaged with the assembled server.

Example:

<project>
    ...
    <groupId>myGroup</groupId>
    <artifactId>myServer</artifactId>
    <!-- Create Liberty profile server assembly -->
    <packaging>liberty-assembly</packaging>
    ...
    <dependencies>
        <!-- Package SimpleServlet.war with server assembly -->
        <dependency>
            <groupId>wasdev</groupId>
            <artifactId>SimpleServlet</artifactId>
            <version>1.0</version>
            <type>war</type>
        </dependency>
    </dependencies>
    ...
    <build>
        <plugins>
            <!-- Enable liberty-maven-plugin -->
            <plugin>
                <groupId>net.wasdev.wlp.maven.plugins</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>1.2</version>
                <extensions>true</extensions>
                <configuration>
                    <installDirectory>/opt/ibm/wlp</installDirectory>
                    <serverName>test</serverName>
                    <features>
                        <acceptLicense>true</acceptLicense>
                        <feature>mongodb-2.0</feature>
                    </features>
                </configuration>
            </plugin>
        </plugins>
    </build>
    ...
</project>

Archetypes

liberty-plugin-archetype

liberty-plugin-archetype is used to generate a basic multi-module project that builds a simple web application, deploys and tests it on the Liberty profile server. It also creates a Liberty profile server package that includes the application.

Usage

mvn archetype:generate \
    -DarchetypeGroupId=net.wasdev.wlp.maven \
    -DarchetypeArtifactId=liberty-plugin-archetype \
    -DwlpPluginVersion=1.2 \
    -DgroupId=test \
    -DartifactId=test \
    -Dversion=1.0-SNAPSHOT

ci.maven's People

Contributors

andham avatar dkirrane avatar fabriziocucci avatar hughesj avatar jahan-paisley avatar jgawor avatar lauracowen avatar mcmorab avatar misaelsalcido avatar nottycode avatar robertosanchezherrera avatar scottkurz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.