How to exclude dependency in a Maven plugin?

Here is an example where the jetty-maven-plugin has a dependency on jtidy replaced with a newer version: http://jira.codehaus.org/browse/JETTY-1339?focusedCommentId=257747&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_257747 <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <dependencies> <dependency> <groupId>net.sf.jtidy</groupId> <artifactId>jtidy</artifactId> <version>r938</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-tools-api</artifactId> <version>2.5.1</version> <exclusions> <exclusion> <groupId>jetty</groupId> <artifactId>jetty</artifactId> </exclusion> </exclusions> </dependency> </dependencies> […] </plugin>

Makefile, header dependencies

If you are using a GNU compiler, the compiler can assemble a list of dependencies for you. Makefile fragment: depend: .depend .depend: $(SRCS) rm -f “[email protected]” $(CC) $(CFLAGS) -MM $^ -MF “[email protected]” include .depend or depend: .depend .depend: $(SRCS) rm -f “[email protected]” $(CC) $(CFLAGS) -MM $^ > “[email protected]” include .depend where SRCS is a variable … Read more