maven goal doesn't execute properly if plugins are defined under pluginManagement

前端 未结 1 426
北荒
北荒 2021-01-18 10:32

I have maven-jaxb2-plugin. I generate jaxb objects and refer it in other classes of project.I\'ve put jaxb plugin and compiler plugin under pluginManagement tag. Maven is ex

1条回答
  •  -上瘾入骨i
    2021-01-18 10:46

    Yes, is used to create ready-to-use configurations, but does not automatically activate your plugins - you still need to include them. So in effect you are right, , just like are very useful in the parent pom to centralize plugin configurations and dependency management.

    Effectively, 'declaring' your plugins in the right module benefits from a much more compact syntax:

    
        
            org.apache.maven.plugins
            maven-compiler-plugin
        
    
        
            org.jvnet.jaxb2.maven2
            maven-jaxb2-plugin
        
    
    

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