Are the jars produced by maven-source-plugin intended primarily as a reference for IDEs and other automated tools, as opposed to being something you would actually build from?
I ask because I have a project in which a non-Java source is used to generate Java sources and non-Java resources. This happens during the generate-sources phase. So when maven-sources-plugin runs, the sources and resources have already been generated and they get included in the -sources jar. If the -sources jar is only intended as a reference, then I want to exclude the generated sources and resources. I found that I can exclude the generated sources by binding maven-sources-plugin to the validate phase, using the jar-no-fork goal, and setting excludeResources to true. Binding to the validate phase seems like a hack, and I don't understand why the generated resources still end up in the source jar if I don't use excludeResources. On the other hand, if the -sources jar is meant to be something you would build from, then I would want to exclude the generated sources and resources but include the non-Java source from which they are generated. But the only way I know to do that is to add it as a resource, which causes it to be included in the binary jar as well. So... which is it, and how do I do it right? Thanks, K --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org