openliberty / ci.maven Goto Github PK
View Code? Open in Web Editor NEWMaven plugins for managing Liberty profile servers #devops
License: Apache License 2.0
Maven plugins for managing Liberty profile servers #devops
License: Apache License 2.0
net.wasdev.wlp.maven.plugins.server.StartDebugMojoSupport fails when setting serverEnv as both setTodir() and setTofile() are called. Please remove setTodir() call.
Add support for the "run" server operation - for running the server in foreground.
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.
If I add the configuration usr to the package goal it is ignored.
The plugin always packages all
There is no option to remove applications added with install-apps. A clean goal could be created to remove alle deployed apps
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
What is the plan for 1.0 release. Is it coming out soon,?
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.
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>
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:
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.
Since the acceptLicense parameter is specified as not required this behaviour is incorrect.
The install-apps
goals needs to be documented.
Specifically:
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.
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.
It would be nice to deploy applications to a remotely running liberty server using the Maven plugin
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>
It would be nice to have a clearer structure of the ci.maven plugin documentation by dividing each section in different .md files.
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>
[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 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>
It would be good if one could specifiy <stripVersion>true</stripVersion>
to the deploy
goal.
The resulting war would get copied to the dropins folder minus the version number. This would be similar the the maven-dependency-plugin
option
My team would like an official release with the new features so that we do not need to rely on snapshot versions of the plugin (and we do not need to enable snapshots from the Sonatype repository).
In particular, issue #25 "Option to install Liberty from a repository" is desired in a stable version of the liberty-maven-plugin
.
Nice to have: The "--os" option (since 8.5.5.0), see http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_setup_package_server.html?cp=SSEQTP_8.5.5%2F1-3-11-0-3-2-1-6
It saves some megabytes of the package size.
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....
Both jvmOptions and serverEnv are initialized by bootProps value - expression="${bootProps}" .
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.
For development purposes it would be a nice enhancements to clear down logs and delete all wars from the dropins folder when stopping the server.
Add goal for installing features (esa files).
Add an option to install Liberty from the WASdev repository or other location.
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?
Add a config option to the start-server goal to start in debug mode.
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.
If start-server goal is run when server is already running, it's more convenient to just skip and return without a failure
Liberty Maven Plugin should work offline.
Prerequisite:
wlp-cache
folder in your local Maven repository.Step by Step:
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
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
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>
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.
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.
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.
The Liberty Maven plugin should have a task to install (unzip) the liberty zip freemium editions currently located on the DHE maven repo, and eventually on maven central.
Currently there are some new artifacts of WAS Liberty Profile in the IBM DHE repository. This artifacts are zipped versions of the freemium editions of Liberty.
It would be nice the ability to uninstall features from the server as mentioned in http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/rwlp_command_featuremanager.html?cp=SSEQTP_8.5.5%2F1-3-11-0-3-2-1-2
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.
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.
In order to replace featureManager for installUtility, we need to replace the commas separators for spaces in the getFeaturesAsString() method and remove the whenFileExist parameter.
It would be nice if we could execute the integration tests in offline/online mode in the archetype. Currently this is only performed in the plugin's project but no in the archetype.
package
goal.server-status
goal to use Ant status
operation.dump
and javadump
goals.start-server
.We should be able to create a Liberty user feature in a Maven module and be able to specify IBM-API: headers, and other SUBSYSTEM.MF headers. Basically, Maven support for this part of the product doc. This may all be possible using the Apache Aries ESA Maven Plugin ... if so then we might just create a small addition to the ci.maven readme to say as much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.