How to use BOM file with Maven?

后端 未结 1 859
暖寄归人
暖寄归人 2020-11-28 06:23

I have done considerable research in internet and I haven\'t found any easy explanation what to do with BOM files with Maven.

The problem is that I use

1条回答
  •  春和景丽
    2020-11-28 06:57

    A bom is a so called bill of materials - it bundles several dependencies to assure that the versions will work together. JBoss has boms for many of it's projects, including Arquillian and the JBoss AS itself.

    There is an explanation of the bom usage in the maven docs - it is hidden well below.

    A practical example:

    You include the bom into your pom like this:

    
        
            
                org.jboss.bom
                jboss-javaee-6.0-with-tools
                ${javaee6.with.tools.version}
                pom
                import
            
        
     
    

    Then you do not have to specify the version attribute of a dependency, if it is defined in the bom like this:

    
        javax.enterprise
        cdi-api
        provided
    
    

    0 讨论(0)
提交回复
热议问题