First off, thank you for trying to help me, Wolfgang!
Secondly, that did the trick, JF.
Is there a way to tell the plugin to allow expression evaluation in the manifest.yaml file? Specifically, Maven properties?
But more importantly, I'm back to my original problem.
I have a jar I've built with a single class in it that extends org.jboss.jca.adapters.jdbc.spi.listener.ConnectionListener.
I'm building a bootable Wildfly 33.0.2 jar, and I want my datasource to be able to use it.
This is the exception I'm getting:
Caused by: java.lang.ClassNotFoundException: com.listener.UserRoleConnectionListener from [Module "org.jboss.ironjacamar.jdbcadapters" version 3.0.9.Final from local module loader @70325e14 (finder: local module finder @37ceb1df (roots: /tmp/wildfly-bootable-server16999847687996086175/modules,/tmp/wildfly-bootable-server16999847687996086175/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:396)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:115)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:536)
at java.base/java.lang.Class.forName(Class.java:515)
at org.jboss.ironjac...@3.0.9.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadConnectionListenerPlugin(BaseWrapperManagedConnectionFactory.java:1001)
As stated previously, here's what I have so far:
Module add command:
module add --name=com.example.connectionlistener --resources=src/main/wildfly/config/modules/connection-listener.jar
WEB-INF/jboss-deployment-structure.xml:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<module name=" com.example.connectionlistener"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
Maven configuration:
<version.wildfly>33.0.2.Final</version.wildfly>
<version.wildfly.datasources.galleon-pack>8.0.1.Final</version.wildfly.datasources.galleon-pack>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>5.1.5.Final</version>
<executions>
<execution>
<id>package-jar</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<!--dryrun>true</dryrun-->
<bootableJar>true</bootableJar>
<bootableJarInstallArtifactClassifier></bootableJarInstallArtifactClassifier>
<boot-logging-config>src/main/wildfly/config/logging.properties</boot-logging-config>
<!--Manifest.yaml is used to override Wildfly provided versions of artifacts-->
<channels>
<channel>
<manifest>
<url>file://${project.basedir}/src/main/wildfly/config/manifest.yaml</url>
</manifest>
</channel>
</channels>
<cli-sessions>
<cli-session>
<script-files>
<script>src/main/wildfly/scripts/add-modules.cli</script>
<script>src/main/wildfly/scripts/bind-address.cli</script>
</script-files>
<resolve-expressions>true</resolve-expressions>
</cli-session>
</cli-sessions>
<displayCliScriptsOutput>true</displayCliScriptsOutput>
<plugin-options>
<jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
</plugin-options>
</configuration>
</execution>
</executions>
</plugin>