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
Yes, <pluginManagement> 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, <pluginManagement>, just like <dependencyManagement> 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:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
</plugin>
</plugins>