0

I have a maven project to which I have to add a external jar jboss-client.jar which is located in Jboss Wildfly 10 bin folder(bin/client). There is no version specified in the jar name.

When I add the jar manually in build path-it works fine.

However, since this is a maven project, I require a better way of doing this.

Note: The project works with only this jar and not other versions specified in pom.xml which I tried downloading.

Also, if I try to specify the external dependency in pom.xml, it asks for version of the dependency. However, I cannot specify the same as it is not mentioned in the jar.

My ultimate aim is to deploy this project in Jboss Wildfly 10.

Is there any other alternate way, I can add the jar?

2 Answers2

0

Copy your jar to some other location and unzip/decompress it, then find Manifest file located at META-INF\MANIFEST.MF path.

Open it in text editor and look for Implementation-Version.

It will give you the version.

Reference

  • Thanks , I tried the above method and run the same application. This time I got the below error: **java.lang.Exception: trace at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:386) ~[artemis-core-client-1.3.0.jar:1.3.0]** However, when jar is added to build path , then I do not get this error. Any suggestion for this? – Ralph Rockmore May 31 '19 at 07:10
  • which version did it show? and can you post full stack trace by [editing](https://stackoverflow.com/posts/56389656/edit) your question – Tech at The Sparks Foundation May 31 '19 at 07:12
  • org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1165) [spring-jms-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1158) [spring-jms-4.3.0.RELEASE.jar:4.3.0.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1055) [spring-jms-4.3.0.RELEASE.jar:4.3.0.RELEASE]` – Ralph Rockmore May 31 '19 at 07:22
  • The above stack is the complete one. Any ideas? – Ralph Rockmore May 31 '19 at 07:23
  • can you share screenshot image instead? – Tech at The Sparks Foundation May 31 '19 at 07:33
  • Ok, but from where can I upload? Is there any upload option here? – Ralph Rockmore May 31 '19 at 07:56
  • no take a screenshot and upload it on some image hosting site, for eg [imgur](https://imgur.com/upload) – Tech at The Sparks Foundation May 31 '19 at 07:59
  • Actually that is a bit difficult. Main lines are below *** [enerContainer-1] org.apache.activemq.artemis.core.client : AMQ212052: Packet PACKET(SessionBindingQueryResponseMessage_V2)[type=-8, channelID=13, packetObject=SessionBindingQueryResponseMessage_V2, exists=true, queueNames=[jms.queue.testingQ], autoCreateJmsQueues=false] was answered out of sequence due to a previous server timeout and it's being ignored.org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:307) ~[artemis-core-client-1.3.0.jar:1.3.0] [spring-jms-4.3.0.RELEASE.jar:4.3.0.RELEASE – Ralph Rockmore May 31 '19 at 08:13
0

You can use maven to install third party library in local. https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

Using below command you can install.

mvn install:install-file -Dfile=path-to-file/jboss-client.jar -DgroupId=org.jboss -DartifactId=jboss-client -Dversion=1.0

vikas
  • 270
  • 2
  • 11
  • 1
    There is a GAV for this so there's not need to do this. You can use `org.wildfly:wildfly-client-all:10.1.0.Final` assuming WildFly 10 here. – James R. Perkins Jun 01 '19 at 00:04