Adam,

On Thursday 15 February 2007 11:36, Adam Lally wrote:
> I am trying to add some common resource files to all of my jars in a
> multimodule project, without having to copy the files to all the
> src/main/resources directories in every single module.  (In particular
> this is for LICENSE and NOTICE files that are required in the jars for
> our Apache incubator project.)

Funny you should mention this.   We working on making this automatic view the 
maven-remote-resources-plugin and the apache-jar-resource-bundle.   There are 
versions available that you could use, but new versions should be going up 
for a vote today that fix a lot of issues. [1]

Basically, you can add:
<plugin>
    <artifactId>maven-remote-resources-plugin</artifactId>
    <version>1.0-alpha-2-SNAPSHOT</version>
    <executions>
        <execution>
            <goals>
                <goal>process</goal>
            </goals>
            <configuration>
                <resourceBundles>
<resourceBundle>org.apache:apache-jar-resource-bundle:1.1-SNAPSHOT</resourceBundle>
                    
<resourceBundle>org.apache:apache-incubator-disclaimer-resource-bundle:1.0</resourceBundle>
                </resourceBundles>
                <properties>
                    <addLicense>true</addLicense>
                </properties>
            </configuration>
        </execution>
    </executions>
</plugin>

To your build plugins list and it will automatically add the LICENSE file and 
create a NOTICE file based on your dependencies.   Since UIMA is an incubator 
project, the second resource bundle listed above will add the incubator 
disclaimer as well.   (for right now, you'll need the snapshot repository 
added.   Again, hoping to have releases of the plugin in the next couple 
days.)

This is all fairly new stuff.   If you have problems with it, let us know and 
log bugs at [2].

Dan

[1]http://jira.codehaus.org/secure/ReleaseNote.jspa?version=13180&styleName=Text&projectId=11391&Create=Create
[2]http://jira.codehaus.org/browse/MRRESOURCES



> We tried adding the following to our parent POM (we use the flat layout):
>
>   <build>
>     <resources>
>       <resource>
>         <targetPath>META-INF</targetPath>
>         <filtering>false</filtering>
>         <directory>../uimaj-distr/src/main/readme/</directory>
>         <includes>
>           <include>LICENSE</include>
>           <include>NOTICE</include>
>         </includes>
>       </resource>
>     </resources>
>     ...
>   </build>
>
>
> However this causes _hundreds_ of unit tests to fail when I run "mvn
> clean install".  The surefire-reports contain NoClassDefFoundErrors
> but do not say the name of the class that's not found.
>
> If I remove the <resources> element, everything builds fine.
>
> So far I have not been able to reproduce this in a small test case, so
> I don't know what else might be contributing to the problem.
>
> Any ideas?
>
> Thanks,
>   -Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to