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

Reply via email to