Giter VIP home page Giter VIP logo

ci.maven's Introduction

ci.maven Maven Central Latest Build Status

The Liberty Maven plugin supports install and operational control of Liberty runtime and servers. Use it to manage your application on Liberty for integration test and to create Liberty server packages.

Usage - TLDR

  • mvn liberty:dev : All-in-one goal: installs Liberty, features, starts server and deploys app. Runs in the background while you develop your application. Applies code and configuration changes (and optionally runs tests) for immediate feedback
  • mvn liberty:help : List Liberty plugin goals
  • mvn liberty:help -Ddetail=true -Dgoal=dev : Detailed information on parameters for goal, e.g. 'dev'

Build

As of version 3.9 of the plugin, you must use Maven 3.8.6 or later to build the Liberty Maven plugin. We conveniently provide the maven-wrapper script, so you do not need to download maven yourself if you are not using it yet.

  • ./mvnw install : builds the plugin, skipping all tests
  • ./mvnw install -Poffline-its -DlibertyInstallDir=<liberty_install_directory> : builds the plugin and runs the integration tests by providing an existing installation.
  • ./mvnw install -Ponline-its -Druntime=<ol|wlp> -DruntimeVersion=<runtime_version> : builds the plugin and runs the integration tests by downloading a new server. Set runtime to ol to run tests using the Open Liberty runtime, or wlp to run tests using the WebSphere Liberty Java EE 7 runtime.

Plugins

Liberty Maven Plugin

The Liberty Maven Plugin provides a number of goals for managing a Liberty server and applications. As of version 3.9 of the plugin, Maven 3.8.6 or later is required to use the Liberty Maven Plugin.

Java Support

The Liberty Maven Plugin is tested with Long-Term-Support (LTS) releases of Java. The plugin, as of release 3.10, supports Java 8, 11, 17 and 21. Versions 3.7 to 3.9.x support Java 8, 11 and 17. Prior to version 3.7, the plugin is supported on Java 8 and 11.

Release 3.0 differences

The new capabilities and behavior differences are summarized in the Liberty Maven Plug-in 3.0 release notes.

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>io.openliberty.tools</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>3.9</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

The Liberty Maven Plugin must first be configured with the Liberty server installation information. The installation information can be specified as:

Installing from a Maven artifact is the default installation method. The default runtime artifact is the latest version of io.openliberty:openliberty-kernel. In order to configure WebSphere Liberty for installation, specify the runtimeArtifact with the com.ibm.websphere.appserver.runtime groupId and the specific artifactId and version that is needed. For a full list of artifacts available, see the Liberty installation configuration documentation.

Example using the runtimeArtifact parameter to install a WebSphere Liberty runtime from a Maven artifact:

<plugin>
    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-maven-plugin</artifactId>
    <version>3.9</version>
    <configuration>
        <runtimeArtifact>
            <groupId>com.ibm.websphere.appserver.runtime</groupId>
            <artifactId>wlp-webProfile8</artifactId>
            <version>23.0.0.9</version>
            <type>zip</type>
        </runtimeArtifact>
    </configuration>
</plugin>

To install an Open Liberty beta runtime, specify the runtimeArtifact with the io.openliberty.beta groupId, open liberty-runtime artifactId and the version that is needed.

Example using the runtimeArtifact parameter to install an Open Liberty beta runtime from a Maven artifact:

<plugin>
    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-maven-plugin</artifactId>
    <version>3.9</version>
    <configuration>
        <runtimeArtifact>
            <groupId>io.openliberty.beta</groupId>
            <artifactId>openliberty-runtime</artifactId>
            <version>23.0.0.10-beta</version>
            <type>zip</type>
        </runtimeArtifact>
    </configuration>
</plugin>

The Liberty Maven Plugin can also download and install a Liberty server from the Liberty repository or other location using the install parameter.

Goals

The Liberty Maven Plugin provides the following goals.

Goal Description
clean Deletes every file in the ${outputDirectory}/logs, ${outputDirectory}/workarea, ${userDirectory}/dropins or ${userDirectory}/apps.
compile-jsp Compile JSPs in the src/main/webapp into the target/classes directory
create Create a Liberty server.
debug Start a Liberty server in debug mode.
deploy Copy applications to the Liberty server's dropins or apps directory. If the server instance is running, it will also verify the applications started successfully.
dev Start a Liberty server in dev mode.*
devc Start a Liberty server in dev mode in a container.*
display-url Display the application URL in the default browser.
dump Dump diagnostic information from the server into an archive.
generate-features Scan the class files of an application and create a Liberty configuration file in the source configuration directory that contains the Liberty features the application requires.*
install-feature Install a feature packaged as a Subsystem Archive (esa) to the Liberty runtime.
install-server Installs the Liberty runtime. This goal is implicitly invoked by all the other plugin goals and usually does not need to be executed explicitly.
java-dump Dump diagnostic information from the server JVM.
package Package a Liberty server.
prepare-feature Prepare a user feature for installation to the Liberty runtime.
run Start a Liberty server in the foreground. The run goal implicitly creates the server, installs features referenced by the server.xml file, and deploys the application before starting the Liberty server.
start Start a Liberty server in the background. The server instance will be automatically created if it does not exist.
status Check a Liberty server status.
stop Stop a Liberty server. The server instance must exist and must be running.
test-start Allows you to bypass automatically starting the server during the pre-integration-test phase with pom configuration or a Liberty-specific command line argument.
test-stop Allows you to bypass automatically stopping the server during the post-integration-test phase with pom configuration or a Liberty-specific command line argument.
undeploy Undeploy an application to a Liberty server. The server instance must exist and must be running.
uninstall-feature Uninstall a feature from the Liberty runtime.

*The dev, devc, and generate-features goals have a runtime dependency on IBM WebSphere Application Server Migration Toolkit for Application Binaries, which is separately licensed under IBM License Agreement for Non-Warranted Programs. For more information, see the license. Note: The dev and devc goals have this dependency only when auto-generation of features is turned on. By default, auto-generation of features is turned off.

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.

Extensions

Extensions improve the compatibility or user experience of third party libraries used with Liberty. The Liberty Maven Plugin provides the following extensions.

Extension Description
configure-arquillian goal Integrates arquillian.xml configuration for the Liberty Managed and Remote Arquillian containers in the Liberty Maven Plugin. Automatically configures required arquillian.xml parameters for the Liberty Managed container.
Spring Boot Support The Liberty Maven Plugin provides support for Spring Boot applications, allowing you to install Spring Boot executable JARs directly to the Liberty runtime.

Packaging types

liberty-assembly

The liberty-assembly Maven packaging type is used to create a packaged Liberty 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. Any application or test code included in the project is automatically compiled and tests run at appropriate unit or integration test phase. Application code is installed as a loose application WAR file if deployPackages is set to all or project and looseApplication is set to true.

The liberty-assembly default lifecycle includes:

Phase Goal
pre-clean liberty:stop
process-resources maven-resources-plugin:resources
compile maven-compiler-plugin:compile
process-test-resources maven-resources-plugin:testResources
test-compile maven-compiler-plugin:testCompile
test maven-surefire-plugin:test
prepare-package liberty:create, liberty:prepare-feature, liberty:install-feature
package liberty:deploy, liberty:package
pre-integration-test liberty:test-start
integration-test maven-failsafe-plugin:integration-test
post-integration-test liberty:test-stop
verify maven-failsafe-plugin:verify
install maven-install-plugin:install
deploy maven-deploy-plugin:deploy

Example:

<project>
    ...
    <groupId>myGroup</groupId>
    <artifactId>myServer</artifactId>
    <!-- Create Liberty 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>io.openliberty.tools</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>3.9</version>
                <extensions>true</extensions>
                <configuration>
                    <installDirectory>/opt/ibm/wlp</installDirectory>
                    <serverName>test</serverName>
                    <features>
                        <acceptLicense>true</acceptLicense>
                        <feature>mongodb-2.0</feature>
                    </features>
                    <looseApplication>true</looseApplication>
                    <deployPackages>all</deployPackages>
                </configuration>
            </plugin>
        </plugins>
    </build>
    ...
</project>

Getting started

There are multiple starters available to generate a package to start developing your first application on Open Liberty.

If you want to use one of the previously published archetypes that we are no longer enhancing, refer to this documentation.

ci.maven's People

Contributors

anjumfatima90 avatar awisniew90 avatar bmarwell avatar cherylking avatar chyt avatar cthigh avatar dblitz avatar dependabot[bot] avatar dnwarnock avatar dshimo avatar ericglau avatar evie-lau avatar gcharters avatar hughesj avatar jgawor avatar jjiwoolim avatar jjvilleg avatar katheris avatar kathrynkodama avatar m-schutte-ohra-nl avatar mattbsox avatar mcmorab avatar misaelsalcido avatar nottycode avatar patricktiu avatar scottkurz avatar stewartfrancis avatar trevcraw avatar turkeylurkey avatar wasdevb1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ci.maven's Issues

Install features as Maven dependencies

Extend install-apps goal (or provide a separate one) to install features expressed as Maven dependencies. Something like:

<dependency>
    <groupId>myGroup</groupId>
    <artifactId>myFeature</artifactId>
    <version>1.0</version>
    <type>esa</type>
</dependency>

Packaging server resources

I want to package a resources directory for a server using a property in the same way that the server.xml, bootstrap.properties etc. can be specified. i.e.

liberty-maven-plugin should work offline

Liberty Maven Plugin should work offline.

Prerequisite:

  • Make sure that you have successfully executed liberty-maven-plugin before so that you have a local copy in the wlp-cache folder in your local Maven repository.

Step by Step:

  • Switch off your network connection (e.g. switch off wifi, remove your network cable, etc)
  • Execute mvn liberty:create-server -o (-o is Maven's offline mode )

Expected result:
The liberty-maven-plugin should successfully use the files stored in the local cache without any network calls.

Actual result:
[ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.1-SNAPSHOT:create-server (create-server) on project test-project: java.net.UnknownHostException: public.dhe.ibm.com: Unknown host public.dhe.ibm.com -> [Help 1]

Comment:
The other goals of the liberty-maven-plugin should also work offline if a local copy exists.

Version used: 1.1-SNAPSHOT

web app sometimes takes too long to start when calling start-server goal

I use maven and the 1.1 liberty-maven-plugin to run integration tests. But sometimes the tests fail because after starting, the liberty server sometimes waits up to 60 seconds to actually deploy the web app. The tests fail because the build gives up waiting for the web app to be deployed.

Even when the tests succeed, sometimes there is a gap of over 10 seconds between the server starting and the web app starting:

[13/11/15 15:41:18:609 EST] 0000001f com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host *  (IPv6) port 53839.
[13/11/15 15:41:48:849 EST] 0000001a com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0012I: The server installed the following features: [jaxws-2.2, localConnector-1.0, json-1.0, jsp-2.2, servlet-3.0, jaxrs-1.1, jaxb-2.2].
[13/11/15 15:41:48:850 EST] 0000001a com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0008I: Feature update completed in 31.616 seconds.
[13/11/15 15:41:48:850 EST] 0000001a com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[13/11/15 15:41:58:257 EST] 00000024 com.ibm.ws.app.manager.AppMessageHelper                      I CWWKZ0018I: Starting application xyz.

Here is my configuration:

            <plugin>
                <groupId>net.wasdev.wlp.maven.plugins</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <install>
                        <licenseCode>...</licenseCode>
                        <version>8.5.+</version>
                    </install>
                    <installDirectory>/path/apps/wlp</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>start-server</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start-server</goal>
                        </goals>
                        <configuration>
                            <applications>xyz</applications>
                            <bootstrapProperties>
                                <httpPort>${dynamicPort}</httpPort>
                                <appLocation>C:/path/to/xyz-0.0.1-SNAPSHOT.war</appLocation>
                            </bootstrapProperties>
                            <jvmOptions>
                                <param>-Xmx768m</param>
                            </jvmOptions>
                        </configuration>
                    </execution>
                    <execution>
                        <id>stop-server</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop-server</goal>
                        </goals>
                        <configuration>
                            <serverStopTimeout>30</serverStopTimeout>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Whenever I deploy the same webapp using the eclipse websphere tools, the webapp is always deployed right away.

Is there some kind of processing or other step that happens before the webapp is deployed?

assemblyArtifact does not exist

The following assemblyArtifact mentioned in the documentation does not exist:

                    <assemblyArtifact>
                        <groupId>net.wasdev.wlp.test</groupId>
                        <artifactId>liberty-test-server</artifactId>
                        <version>1.0</version>
                        <type>zip</type>
                    </assemblyArtifact>

Non-zero return codes from underlying start/stop server commands cause Maven build failures

Consider the following case:
In a pre-clean phase, I want to ensure my Liberty server (residing in the target directory) is stopped. In post-clean, I configure and start my server (again residing in the target directory).

In this instance, on the first run, the pre-clean goal uses the stop-server goal which returns a non-zero return code because the server is not running yet. This causes the mvn build to fail.

Cache installed features

We cache Liberty archive jars that come from the Liberty repository into ~/.m2/repository/wlp-cache so we don't have to download them on every build. This is consistent with how maven downloads and stores dependencies locally in the local repository. But we don't cache additional Liberty features a pom installs. So every subsequent time a build runs, the additional features are downloaded from the Liberty repository. We should be consistent with the feature downloads and put them in some place in the wlp-cache.

The best way to do this would be with the installUtility command. e.g.
installUtility download --location=${settings.localRepository}/wlp-cache/features-<version> <featureName>
where <version> is the product version from the productInfo version command. It's important to put the version in the directory name because 8.5.5.6 feature binaries won't run on 8.5.5.7.
Then doing:
installUtility install --from=${settings.localRepository}/wlp-cache/features
The installUtility download will take care of not re-downloading features.

Enable execution of integration tests in Travis

It would be nice if the integration tests could be performed in the travis build. And also, add support to execute the integration tests by downloading a wlp automatically by just providing the version and the license code.

Install feature fails if already installed, no matter the whenFileExists value

Even if I set <whenFileExists>ignore</whenFileExists>, mvn liberty:install-feature fails with rc=22.

It may not be an error from de plugin: calling

>.\featureManager.bat install --acceptLicense --when-file-exists=xxx --to=usr jaxrs-1.1

with ignore, replace or fail always results in error code 22

This is with 1.1-SNAPSHOT and installing from https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/8.5.5.5/wlp-runtime-8.5.5.5.jar

Liberty plug-in improvements

  1. Add include parameter for package goal.
  2. Change default for cleanStart to false.
  3. Improve server-status goal to use Ant status operation.
  4. Remove old and unnecessary code.
  5. Add support for dump and javadump goals.
  6. Add support for setting userDirectory (WLP_USER_DIR).
  7. Stop server if application failed to start in alloted time in start-server.
  8. Ensure timeouts are consistent and can be set independently.
  9. Add support for setting outputDirectory (WLP_OUTPUT_DIR).
  10. Remove old & unused debug mode code.
  11. Improve install-apps goal to 1) allow version stripping, and 2) specifying a custom application directory.

Add installUtility functionality to install all features for a server

Using the install-feature goal you have to specifically list all of the features you want to install. On a Liberty server you can use installUtility install ExampleServer to install all of the features required for the ExampleServer server.xml. This would be a really useful enhancement to have in the liberty-maven plugin so that if you update your server.xml file you don't have to manually update the build file.

install from repository failing with ClassNotFoundException com.ibm.websphere.ssl.protocol.SSLSocketFactory

[ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.1-SNAPSHOT:create-server (default) on project com.my.company.liberty.server: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [Help 1]

when using IBM JRE 1.7. but works when using IBM JRE 1.8
java version "1.7.0"
Java(TM) SE Runtime Environment (build pwa6470_27sr1ifix-20140713_01(SR1+IX90150
+IX90144+IV60711+IV60971+IV61564+IV62037+IV62044))
IBM J9 VM (build 2.7, JRE 1.7.0 Windows 7 amd64-64 Compressed References 2014070
9_205990 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140709_1757_B205990
JIT - tr.r13.java_20140410_61421.08
GC - R27_Java727_SR1_20140709_1757_B205990_CMPRSS
J9CL - 20140709_205990)
JCL - 20140409_01 based on Oracle 7u55-b13

sample pom:

net.wasdev.wlp.maven.plugins
liberty-maven-plugin
1.1-SNAPSHOT


                        <install> 
                            <licenseCode>L-JTHS-95XRL8</licenseCode>                                                                                      
                        </install>
                        <!-- installDirectory>${basedir}/stage</installDirectory-->                                  
                    </configuration>        

                <goals>
                    <goal>create-server</goal>
                </goals>
                <phase>install</phase>
                </execution>
            </executions>                            
        </plugin>

full stacktrace:

[ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.1-SNAPSHOT:create-server (default) on project com.my.company.liberty.server: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.1-SNAPSHOT:create-server (default) on project com.my.company.liberty.server: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:619)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:137)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at net.wasdev.wlp.ant.install.InstallLibertyTask.execute(InstallLibertyTask.java:50)
at net.wasdev.wlp.maven.plugins.BasicSupport.installFromArchive(BasicSupport.java:372)
at net.wasdev.wlp.maven.plugins.BasicSupport.installServerAssembly(BasicSupport.java:282)
at net.wasdev.wlp.maven.plugins.server.CreateServerMojo.doExecute(CreateServerMojo.java:46)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:122)
... 21 more
Caused by: java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:2)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:9)
at com.ibm.net.ssl.www2.protocol.https.c.createSocket(c.java:168)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:461)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:556)
at com.ibm.net.ssl.www2.protocol.https.c.(c.java:51)
at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:50)
at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:12)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:944)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:42)
at com.ibm.net.ssl.www2.protocol.https.b.connect(b.java:41)
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:660)
at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:579)
at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:569)
Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:147)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:8)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:3)
at javax.net.ssl.HttpsURLConnection.(HttpsURLConnection.java:19)
at com.ibm.net.ssl.www2.protocol.https.b.(b.java:53)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:2)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:10)
at java.net.URL.openConnection(URL.java:983)
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:633)
... 2 more

Add support for <skip>

None of the liberty-maven-plugin Mojos support
Even with skip all goals still run

            <plugin>
                <groupId>net.wasdev.wlp.maven.plugins</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>

Support multiple applications in deploy/undeploy

Hi. Looks like the v1.1 of the plugin does not support several

I have put several applications ( a natural thing to to.. IMHO) in the configuration, but the deploy/undeploy seems to only 'see' the first one.

Is this as designed or a bug ?

If it's designed, I would like to add this as a request....

Improve application deployment/undeployment

Right now applications are deployed/undeployed using the dropins directory. However, it is more preferable to deploy/undeploy the applications by updating the server.xml and adding/removing the element.

1.0 release?

What is the plan for 1.0 release. Is it coming out soon,?

Test the 1.1 release candidate

Once @jgawor has posted the release candidate, we should test with our existing sample repo's that use v1.0 today, to check they work with v1.1. The 12 factor app and the new securems samples would be good. For securems, there is no reactor pom yet, so you need to run mvn install on the apikey* projects inside that repo, in alphabetical order.
@jgawor - please post the snapshot repo site when you're ready. Thanks.

Rename serverHome parameter to installDirectory

serverHome parameter name is not consistent with other names such as userDirectory or outputDirectory. To make it consistent, it will be renamed to installDirectory. The code will still check for serverHome parameter to maintain backwards compability.

Add ability to deploy to a remote full WAS server

We do dev testing against a local Liberty server.

However, sometimes we want to deploy to our pre-production server which has the full WebSphere 8.5.5 edition.

It but it would be nice enhancement if we could deploy to a remote WAS server (full edition) using the liberty maven plguin

Inline bootstrap properties, jvm options

Right now the bootstrap properties and jvm options can be specified in the Liberty plug-in as files. It would be also good to support a way to inline within plugin configuration in pom.xml these settings as well.

Timeouts are inconsistent

Some timeouts are specified in milliseconds and some are specified in seconds. The timeout units should be consistent in the plugin.
Change the timeouts in deploy/undeploy goals to be specified in seconds.

serverEnv setting fails

net.wasdev.wlp.maven.plugins.server.StartDebugMojoSupport fails when setting serverEnv as both setTodir() and setTofile() are called. Please remove setTodir() call.

Change install to be a goal rather than a configuration setting

Currently installation of Liberty happens depending on what configuration properties you set. This means that you have to write a lot more code if you want the user to be able to choose per build whether they supply their own Liberty.

It would be better if we could supply one property e.g. installDir and then if we run the install goal Liberty is installed into installDir and if we don't then the plugin assumes that installDir points to our existing install.

The current way I am getting around this problem is creating profiles for each type of install which is a lot of code and added complexity that I would rather not force upon the user.

Refresh archetype

Specifically:

  • Switch to require Java 7
  • Switch to use webProfile7 runtime - so that it won't require prior installation of Liberty.

Add ability to deploy application to WAS Liberty server.xml file

Add ability to liberty-maven-plugin:deploy goal to allow application deployment to WAS Liberty server.xml file in addition to the dropins directory. Additionally this will allow usage of the shared library feature of Liberty and specify the context root to use.

So example of the resulting deploy plugin execution

                    <execution>
                        <id>deploy-war</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                        <configuration>
                            <contextRoot>some/path</contextRoot>
                            <useGlobalLib>true</useGlobalLib>
                            <appArtifact>
                                <groupId>com.mycompany</groupId>
                                <artifactId>my-war</artifactId>
                                <type>war</type>
                            </appArtifact>
                        </configuration>
                    </execution>

would config server.xml like:

    <application location="C:\.m2\repository\com\mycompany\1.0\my-war-1.0.war" context-root="some/path">        
        <classloader commonLibraryRef="global"/>
    </application>

mvn liberty:start-server fails with "Only one of tofile and todir may be set."

Here's my configuration that leads to the error mentioned in the title:

                    <plugin>
                        <groupId>com.ibm.websphere.wlp.maven.plugins</groupId>
                        <artifactId>liberty-maven-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <serverHome>/Srdev/wlp-8.5.5.7/wlp</serverHome>
                            <serverName>cih</serverName>
                            <appArtifact>
                                <groupId>com.swissre.cih</groupId>
                                <artifactId>sr-cih-wls</artifactId>
                                <version>${project.version}</version>
                                <type>war</type>
                            </appArtifact>
                            <configFile>${basedir}/src/test/resources/server.xml</configFile>
                        </configuration>
                    </plugin>

Fix install-feature goal so you it fails if you didn't set the accept license property, or set it to false

When running the install-feature goal with the acceptLicense parameter not set, or set to false, you get a message printed out in the console to say that you need to accept the license, but it does not give you a mechanism to do so:
install-feature-snippet

If you run the command manually, rather than through the plugin, it works fine giving you the option to select 1 for agree or 2 for not agreeing.
install-feature-snippet2

Since the acceptLicense parameter is specified as not required this behaviour is incorrect.

clean goal

There is no option to remove applications added with install-apps. A clean goal could be created to remove alle deployed apps

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.