Hi Tony,
Thank you for taking the time to provide this very simple solution to my
problem. This is a terrific plugin and I highly recommend it to others.
One minor suggestion I have is that the plugin config or
license.properties should allow overriding the license file name so its
not hardcoded to license.txt.
Then we would not have to name a license.html file as license.txt which
creates problems and confusion.
A variation on above suggestion that is more change is to consider
simplifying the design by making both header and license file locations
to be configured directly in plugin configuration and remove the license
resolver and license.properties file altogether. Based on my admittedly
limited experience with the plugin, I am not seeing the benefit of the
more complex approach with license resolver, license.properties file and
hardcoded license and header file names.
If you think it is a reasonable request then I can file an RFE. Again
thanks very much for your help and for a terrific plugin.
On 08/24/2011 06:31 AM, Tony Chemit wrote:
On Tue, 23 Aug 2011 12:49:29 -0400
Farrukh Najmi<[email protected]> wrote:
To rephrase my question most simply, how can I configure the plugin
to use a license resolver that can use a file other than license.text?
the definition of a new license is well explained on the site of the
plugin [1], you can not change the name of header.txt nor the
license.txt.
But you can as I told you previously change then the name of the file
to write (or update) in your project via the property licenseFile.
I have created a little project to show this to you, just unzip it, go
to the license-test directory and launch a mvn process-resources and
you will se the license.html created ;)
Here is the configuration of the plugin
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<licenseName>my_license</licenseName>
<licenseResolver>file://${basedir}/src/license</licenseResolver>
<licenseFile>license.html</licenseFile>
</configuration>
<executions>
<execution>
<goals>
<goal>update-project-license</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
[1]
http://mojo.codehaus.org/license-maven-plugin/examples/example-add-license.html
hopes it help ;)
Tony.
On 08/23/2011 12:13 PM, Farrukh Najmi wrote:
Hi Tony,
Thanks for the help but it did not work as I expected. It just
generated a a file under my project with a directory named "file:"
with somedir/license.html under it. The content of the file was
based on content of /somdir2/license/license.txt.
Here is the config I used... I am not getting how this plugin is
supposed to be used and therefor quite confused.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<verbose>false</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
<licenseName>my_license</licenseName>
<licenseFile>file:///somedir/license.html</licenseFile>
<licenseResolver>file:///somdir2/license</licenseResolver>
<missingFile>${basedir}/../src/license/THIRD-PARTY.properties</missingFile>
<useMissingFile>true</useMissingFile>
<generateBundle>true</generateBundle>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Note that I had tried to add my project's proprietary license using
the example at:
http://mojo.codehaus.org/license-maven-plugin/examples/example-add-license.html
This example doe snot show how to reference a license.html file
somewhere outside the project tree.
This is probably the center of my confusion. Is this doable for the
config to reference a license.html file outside the project tree?
On 08/23/2011 11:53 AM, Tony Chemit wrote:
On Tue, 23 Aug 2011 11:44:51 -0400
Farrukh Najmi<[email protected]> wrote:
Hi Guys,
I am having trouble getting the license-maven-plugin
<http://mojo.codehaus.org/license-maven-plugin> configured so
that it can bundle a<some directory>/lincense.html with the
output jar of the project.
The goal license:update-project-license
<http://mojo.codehaus.org/license-maven-plugin/update-project-license-mojo.html>
of the license-maven-plugin
<http://mojo.codehaus.org/license-maven-plugin> seems to only
deal with a license.txt file when in my case the file is an html
file. What do I need to change to get the desired effect?
Thank you for your help.
Using the parameter licenseFile [1] can help you I think :)
<configuration>
<licenseFile>license.html</licenseFile>
</configuration>
[1]
http://mojo.codehaus.org/license-maven-plugin/update-project-license-mojo.html#licenseFile
--
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email