You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Robert Munteanu <ro...@apache.org> on 2020/08/21 09:33:29 UTC
[filevault-package-maven-plugin] Packaging additional files in
META-INF
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
Re: [filevault-package-maven-plugin] Packaging additional files in
META-INF
Posted by Robert Munteanu <ro...@apache.org>.
Hi Konrad,
On Fri, 2020-08-21 at 12:05 +0200, Konrad Windszus wrote:
> 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.
Thank you for the reply. I filed
https://issues.apache.org/jira/browse/JCRVLT-471
Thanks,
Robert
Re: [filevault-package-maven-plugin] Packaging additional files in
META-INF
Posted by Konrad Windszus <ko...@gmx.de>.
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 <ro...@apache.org> 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
>