Maven copy resources in multi module project

后端 未结 1 1288
心在旅途
心在旅途 2021-01-11 10:39

My need is pretty basic but I could not find any clean answer to it: I simply need to be able to distribute a resource in a multi-module project.

Let us consider fo

相关标签:
1条回答
  • 2021-01-11 11:04

    you could use the assembly and the dependency plugins.. did you stumble over that link? http://www.sonatype.com/people/2008/04/how-to-share-resources-across-projects-in-maven/

    it describes that option ..its from 2008, but maven is around for quite some time.. so I guess its more or less up to date

    edit regarding comment
    Another option is the maven-remote-resources-plugin. For a more detailed example see:
    http://maven.apache.org/plugins/maven-remote-resources-plugin/examples/sharing-resources.html

    Since their intro speaks actually for itself, I quote (maven.apache.org)

    This plugin is used to retrieve JARs of resources from remote repositories, process those resources, and incorporate them into JARs you build with Maven. A very common use-case is the need to package certain resources in a consistent way across your organization: at Apache it is required that every JAR produced contains a copy of the Apache license and a notice file that references all used software in a given project.

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