1

I'm currently developing some applications and I'm using wildfly 9.0.2.Final as the application server. Currently I'm using bom version 8.2.2.Final for the following artifacts:

  • jboss-javaee-7.0-with-tools
  • jboss-javaee-7.0-with-hibernate
  • jboss-javaee-7.0-with-security

I've started using these versions while following a tutorial. However I've seen that now wildfly 10 is out and probably some other dependencies also have dependencies. Maybe in the future javaee-8.0 will be available.

Is there some documentation on what the different artifacts include and maybe what should be kept in mind when upgrading the parent bom version?

gadeynebram
  • 725
  • 2
  • 6
  • 22

2 Answers2

2

With WildFly 9+ boms we changed structure a bit, so now we only have 2 boms. Where most of them were merged into one.

  • wildfly-javaee7
  • wildfly-javaee7-with-tools

Where second one includes not only APIs but also tools that are useful for testing like arquillian, junit, etc...

so best for your needs would be to use this in your pom.xml

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.bom</groupId>
                <artifactId>wildfly-javaee7-with-tools</artifactId>
                <scope>import</scope>
                <type>pom</type>
                <version>10.0.0.Final</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

you can always find latest info and docs on how to use it at github at repository https://github.com/wildfly/boms

Tomaz Cerar
  • 5,761
  • 25
  • 32
0

Your BOM version should match your deployment Wildfly version.

Assuming you use provided scope for dependencies that are provided by Wildfly, you want to ensure you're using the correct versions. If you use a wrong version, your application might not work as expected or even fail to start, because some API might be deprecated/removed, or because some features might not be available yet.


Side note: Wildfly BOMs lack some dependencies, so we're using parent as BOM:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-parent</artifactId>
            <version>9.0.2.Final</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
Community
  • 1
  • 1
Anton Koscejev
  • 4,603
  • 1
  • 21
  • 26
  • Hi, Thank you for this answer. So if I understand it correctly I just need to keep the artifacts like jboss-javaee-7.0-with-hibernate at the current version and increase the version of the wildfly-parent artifact? – gadeynebram Jun 03 '16 at 09:09
  • The `jboss-javaee-7.0-with-hibernate` is BOM, its purpose is to define dependency management. In my experience using `wildfly-parent` for dependency management is enough, you don't really need both. What you do need is to define actual dependencies that you use, such as RESTEasy, Weld, etc., but they should have `provided` scope, so you don't include them in the final WAR, but rather allow Wildfly to provide them. – Anton Koscejev Jun 03 '16 at 09:26
  • I would not advise using the project parent POM as a BOM. This will bring in dependencies which are not meant to be exposed to deployments. – James R. Perkins Jun 06 '16 at 17:53
  • Parent was a by-the-way part. However, I still stand by it. The only dependency specified by parent is `wildfly-checkstyle-config`, everything else is in `dependencyManagement` and will only define version used (unless overridden), but will not bring in the dependency! It's better than the alternative, when you need things that BOM doesn't contain. Not sure about Wildfly 10 BOMs, but 9 are pretty bad. – Anton Koscejev Jun 07 '16 at 08:04
  • @AntonKoscejev what exactly is "bad" about WildFly 9/10 boms? You don't need all internal dependencies that make up the server itself, boms only provide what is accessible to the deployments and what is considered an API, there are rare cases one would need to code against exact implementation version of some component and not against its API which rarely changes. There is always room for improvements of boms, but throwing out accusations/assumptions without any real case behind it is just bad practice. If you find anything that should be in boms open issue at https://github.com/wildfly/boms – Tomaz Cerar Jun 07 '16 at 23:04
  • @ctomc please check the link in the answer for details: http://stackoverflow.com/a/25684103/2492865 - this would be a good place to comment/discuss using parent as BOM. – Anton Koscejev Jun 08 '16 at 09:07
  • @AntonKoscejev boms 10.1.0.CR1 ware released that also manage cxf – Tomaz Cerar Aug 04 '16 at 17:20
  • @ctomc we actually stopped using Wildfly and moved to embedded Jetty, since we weren't using any of the advanced features. However, this is good info for the next time, thanks! – Anton Koscejev Aug 04 '16 at 20:55