I am trying to add a license file to all my banks when I build maven. I have a license for each class file, but I want to add License.txt to each META-INF folder in each bank
My project has a master pom, which has half a dozen modules, these modules have their own modules and, ultimately, get into the project that generates the file / target / <.jar-file>. The build and class licenses work, I just want to add the physical License.txt to the META-INF folder.
My file is stored (relative to the main POM) in / src / resources / src -license.txt. I really need an automatic method to ensure that if / when the license changes, I have to update 50 files, I can just update one, which will then be copied to other places.
I tried using
<build> <sourceDirectory>src</sourceDirectory> <resources> <resource> <directory>src/resources</directory> <targetPath>/META-INF</targetPath> <includes> <include>src-license.txt</include> </includes> </resource> </resources> .... </build>
But that doesn't sound like a trick. I am also trying to use some alternatives to the exit path, such as $ {project.build.outputDirectory} / META-INF or * / META_INF, also to no avail. Does anyone have any experience on how to do this? Thanks
In addition, I use the maven-license-plugin to ensure that every class file has license information inserted into it, and this works as intended. But then again, inside the class files, I am looking for an external .txt file in each <*. Jar> / META-INF /
source share