|
Hi Craig,
what we do with JPOX to get it in the jar is add it in the "resources" section under "build" in project.xml like this <build> <sourceDirectory>src/java</sourceDirectory> <resources> <resource> <directory>${basedir}/..</directory> <includes> <include>NOTICE.txt</include> </includes> </resource> </resources> and to get it in the distribution (maven dist) we add this to maven.xml <preGoal name="dist:build-src"> <ant:copy todir="${maven.build.dir}/${maven.final.name}/src/${maven.final.name}"> <ant:fileset file="${basedir}/../NOTICE.txt" /> </ant:copy> </preGoal> We just put the LICENSE.txt, NOTICE.txt at the top level and then refer to them in the project.properties in each subproject Not sure how that fits in with how you're doing it in Apache JDO, but hopefully gives you some ideas. Thanks for the comments on how JPOX does it. I think we can use a similar strategy here.
The following is a proposal for including the NOTICE.txt in our svn sources and distributions. <proposal> I'd like to have exactly one copy of each of LICENSE.txt and NOTICE.txt for the project in the trunk. So we should get rid of all of the LICENSE.txt files lower in the tree. For the source distributions, we currently build a directory structure that contains README.txt and LICENSE.txt in the top level of the distribution, and that's where the NOTICE.txt should go. For the binary jar distributions, we currently build a META-INF directory with the manifest and LICENSE.txt, andMETA-INF is where the NOTICE.txt should go. </proposal> Attached you find a patch (
Here are the details: - It removes the LICENSE.txt files in the subproject directories. - It adds the NOTICE.txt file as resource in the project.xml files of the subprojects such that the file gets included in the generated jar (e.g. jdo2-api-<version>.jar). Setting the targetPath to META-INF in the resource definition makes sure the NOTICE.txt is located in the META-INF directory in the jar. - It changes the preGoal dist:build-src to include LICENSE.txt and NOTICE.txt. - It defines a preGoal for dist:build-bin to include LICENSE.txt, NOTICE.txt and README.txt in the zip of the binary distribution. Looks good!
Just one comment. You might want to modify this line of maven.xml to include LICENSE.txt and NOTICE.txt. <echo>Copying top-level README.txt to ${maven.dist.bin.archive.dir}</echo> I changed the line as proposed and checked in the patch (see revision 415048).
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are many places where the LICENSE.txt file appears. There is one at trunk/LICENSE.txt, trunk/<project>/LICENSE.txt, trunk/<project>/META-INF/LICENSE.txt. Why so many? How do we get NOTICE.txt to be put into the source and jar files similar to LICENSE (and preferably NOT duplicating NOTICE.txt in 20 places)?