Hello,
I need to package in one .jar file to deploy as a microservice and for it i trying to use payara-micro-maven-plugin to create uberjar.
<plugin>
<groupId>fish.payara.maven.plugins</groupId>
<artifactId>payara-micro-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<payaraVersion>5.183</payaraVersion>
<appendSystemProperties>false</appendSystemProperties>
<deployArtifacts>
<artifactItem>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-rar</artifactId>
<version>5.14.5</version>
<type>rar</type>
</artifactItem>
</deployArtifacts>
</configuration>
</plugin>
I put the anotations on top of class to configure connection to activemq:
@ConnectionFactoryDefinition( name = "java:app/activemq/factory",
interfaceName = "javax.jms.ConnectionFactory",
resourceAdapter = "activemq-rar-5.14.5",
properties = {"UserName=xxxx","Password=yyyyy","ServerUrl=tcp://X.X.X:X:61616"})
@AdministeredObjectDefinition( resourceAdapter = "activemq-rar-5.14.5",
interfaceName = "javax.jms.Queue",
className = "org.apache.activemq.command.ActiveMQQueue",
name = "java:app/activemq/queue",
properties = {"PhysicalName=XXXXXXX"})
The problems is when I start generated jar that it say: org.glassfish.deployment.common.DeploymentException: Resource Adapter not present: RA Name: [activemq-rar-5.14.5], Type: [AODD] (I skipped other stacktrace for brevity)
I think that it is because my root project is deployed before than activemq-rar. In documentation deploy applicacion by args otherwise maven configuration. It this?
Somebody can say me if is possible configure deployment order on payara-micro?.
Thank's all.