Maven build not getting feature installed properly
When trying to customize my pom.xml file with the passwordUtilities function, the message.log always seems to show that this function is not set at server startup even though it is in the function manager list and I can see all the required function of the files in wlp / lib. This is what I have now coded in the pom.xml:
<configuration>
<assemblyArtifact>
<groupId>com.ibm.websphere.appserver.runtime</groupId>
<artifactId>wlp-javaee7</artifactId>
<version>16.0.0.4</version>
<type>zip</type>
</assemblyArtifact>
<configFile>src/main/liberty/config/server.xml</configFile>
<include>${packaging.type}</include>
<bootstrapProperties>
<appContext>${warContext}</appContext>
<default.http.port>${testServerHttpPort}</default.http.port>
<default.https.port>${testServerHttpsPort}</default.https.port>
<appLocation>${project.artifactId}.war</appLocation>
</bootstrapProperties>
</configuration>
<executions>
<execution>
<id>install-feature</id>
<phase>pre-integration-test</phase>
<goals>
<goal>install-feature</goal>
</goals>
<configuration>
<features>
<acceptLicense>true</acceptLicense>
<feature>passwordUtilities-1.0</feature>
</features>
</configuration>
</execution>
source to share
The goal install-feature
should be tied to the phase prepare-package
(according to the document ) as opposed to pre-integration-test
.
Also, I have to point out that if you omit functions from the configuration <features>
then the server.xml file will be checked and the missing functions will be loaded automatically.
So your new stanza <exection>
will look like this:
<execution>
<id>install-feature</id>
<phase>prepare-package</phase>
<goals>
<goal>install-feature</goal>
</goals>
<configuration>
<features>
<acceptLicense>true</acceptLicense>
</features>
</configuration>
</execution>
source to share
Andy, that's right. We have installed the wrong example in the documentation install-feature
: https://github.com/WASdev/ci.maven/blob/master/docs/install-feature.md#install-feature .
source to share