Hi Robert, Currently the filevault-package-maven-plugin creates packages from mainly two different source directories:
https://jackrabbit.apache.org/filevault-package-maven-plugin/package-mojo.html#jcrRootSourceDirectory <https://jackrabbit.apache.org/filevault-package-maven-plugin/package-mojo.html#jcrRootSourceDirectory> -> ends up in the installed package https://jackrabbit.apache.org/filevault-package-maven-plugin/package-mojo.html#metaInfVaultDirectory <https://jackrabbit.apache.org/filevault-package-maven-plugin/package-mojo.html#metaInfVaultDirectory> -> ends up in META-INF/vault Probably we need an optional third source to put META-INF somewhere outside the vault directory. Feel free to raise a JIRA. Thanks, Konrad > On 21. Aug 2020, at 11:33, Robert Munteanu <[email protected]> wrote: > > Hi, > > I am trying to use the filevault-package-maven-plugin with a Sling > project. By default, artifacts are checked to see if they have legal > files: META-INF/{LICENSE,NOTICE}. > > When building a content package these are not included. I've > configured the plug-in with: > > <plugin> > <groupId>org.apache.jackrabbit</groupId> > <artifactId>filevault-package-maven-plugin</artifactId> > <version>1.1.4</version> > <extensions>true</extensions> > <configuration> > <jcrRootSourceDirectory>${project.build.outputDirectory}</jcrRo > otSourceDirectory> > </configuration> > </plugin> > > The legal files from target/classes are understandably skipped since > they don't match the filter defintions, so that's not a good place for > them. What I would like is to have then copied over to META-INF in the > resulting content package, but I did not find an easy way to do this. > > I worked around it with an additional resources plug-in execution: > > <plugin> > <artifactId>maven-resources-plugin</artifactId> > <executions> > <execution> > <id>copy-legal-files</id> > <phase>prepare-package</phase> > <goals> > <goal>copy-resources</goal> > </goals> > <configuration> > > <outputDirectory>${project.build.directory}/vault-work/META-INF</outputDirectory> > <resources> > <resources> > > <directory>${project.build.directory}/maven-shared-archive-resources/META-INF/</directory> > </resources> > </resources> > </configuration> > </execution> > </executions> > </plugin> > > Is there a simpler way to copy files to META-INF/ using the plug-in? > > Thanks, > Robert >
