5

How can I include a third-party war in my Spring-Boot app? I'd like to stick to a single, executable artifact instead of going the traditional tomcat deployment route, but I'd also like to include something like hawtio (http://hawt.io/getstarted/index.html).

Any suggestions would be greatly appreciated.

Gradinko
  • 130
  • 1
  • 6
  • I guess the answer might depend on the details of the content of the war. The easiest thing to do would be to simply explode it and add all those resources to your own archive. Then there might be clashes with resources having the same name in your app, but if not you should be able to execute it. – Dave Syer Nov 12 '13 at 14:19
  • Thats actually what I'm doing in the meanwhile, but it does feel like a bit of a gap in the build plugin. If I were to use say the maven tomcat plugin to generate an executable jar I could include additional wars. Might be a nice to have for the boot plugin, although I can't speak to how many others have this use case. – Gradinko Nov 13 '13 at 19:55
  • 1
    Actually all the boot plugin does is enhance an existing archive, so I'm not sure it's a gap, but I'd still have to see an example to decide. If you can build a WAR first using a different plugin of your choice, that's all you need. – Dave Syer Nov 15 '13 at 07:17

1 Answers1

4

While not strictly an answer to the question, there is now a jar for hawt.io that works specifically with spring boot, which makes the requested requirement unnecessary (io.hawt:hawtio-springboot:jar:1.4.20).

The module code is here - https://github.com/hawtio/hawtio/tree/master/hawtio-springboot

With example usage shown here - https://github.com/hawtio/hawtio/tree/master/hawtio-sample-springboot

user3267544
  • 74
  • 1
  • 2
  • 3
    what url may I view the hawtio ui for the hawtio sample spring boot project found here? https://github.com/hawtio/hawtio/tree/master/hawtio-sample-springboot – darren rose Mar 22 '15 at 15:55
  • Same as previous comment here, I can't load the sample plugin. I tried several URLs to get it and even using a standalone instance of hawtio to access but nothing works. – Ither Jun 03 '15 at 17:40