You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2009/06/23 20:39:38 UTC

How does maven handle artifact's license files?

Does maven have support for tracking license files my dependent artifacts
may have and doing something with these files, such as installing with my
product/application?  If so, how?

(Ideally I want to deploy license docs with each artifact that needs one
(ideally public artifacts should already have this) then I want to include
all these in a specific location in my war.)

-Dave

Re: beyond Properies and Resource Filtering

Posted by Mick Knutson <mi...@gmail.com>.
I use Annotations to instantiate my Spring context in my tests:

@ContextConfiguration(locations = {"classpath:*applicationContext-test.xml*"
})
public class UserWebServiceTest extends AbstractSpringTest {


Then when I do not have to modify my Maven config in order to switch from
test, to production version of my context.



---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Tue, Jun 23, 2009 at 4:06 PM, David Weintraub <qa...@gmail.com> wrote:

> This should help:
>
>
> http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
>
> And over here:
>
>
> http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
>
> (Note the Examples links on the left side. They can provide you with
> specific pom.xml examples).
>
> I find that the reference at http://maven.apache.org/plugins/ is the
> best way to find information. I'm not too impress with any of the
> books I've seen. Most talk about how to setup a pom.xml for a specific
> type of application, but not about exactly how everything works, or
> where you can find more information.
>
> You can define command line properties to define exactly which
> directory you want:
>
>   $ mvn -Dconfig-type=foo package
>
> <build>
>   <resources>
>        <resource>
>             <directory>src/main/resources</directory>
>       </resource>
>        <resource>
>                <directory>src/main/${config-type}-resources</directory>
>       </resource>
>  </resources>
> </build>
>
> If you use the above examples, you'll have to move those two
> directories to where you really want those the "mySpringBean.xml" file
> to be located when copied. For example, if they go into the META-INF
> directory, you'll need to have the two files in:
>
> src/main/foo-resources/META-INF/mySpringBean.xml
>
>     and
>
> src/main/bar-resources/META-INF/mySpringBean.xml
>
>
>
> On Tue, Jun 23, 2009 at 3:00 PM, Robert Glover<ro...@yahoo.com>
> wrote:
> >
> > I have read chapter 13 of "Maven: The Definitive Guide" and did not find
> my question answered there.
> >
> >   Here is what I need to do.  I have two subdirectories as follows:
> >
> > src/main/resources/foo
> > src/main/resources/bar
> >
> >   I have the same file in each of those two directories:
> >
> > src/main/resources/foo/mySpringBean.xml
> > src/main/recourse/bar/mySpringBean.xml
> >
> >    What I need to do is specify on the command line (or in a Profile or
> in settings.xml) which of those two directories should have it's contents
> copied to  target/classes.  The other directory should not have its contents
> copied into target/classes.
> >
> >   Thank you in advance! (hope hope).
> >
> > Robert
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> --
> David Weintraub
> qazwart@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: beyond Properies and Resource Filtering

Posted by David Weintraub <qa...@gmail.com>.
This should help:

http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html

And over here:

http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html

(Note the Examples links on the left side. They can provide you with
specific pom.xml examples).

I find that the reference at http://maven.apache.org/plugins/ is the
best way to find information. I'm not too impress with any of the
books I've seen. Most talk about how to setup a pom.xml for a specific
type of application, but not about exactly how everything works, or
where you can find more information.

You can define command line properties to define exactly which
directory you want:

   $ mvn -Dconfig-type=foo package

<build>
   <resources>
        <resource>
             <directory>src/main/resources</directory>
       </resource>
        <resource>
                <directory>src/main/${config-type}-resources</directory>
       </resource>
  </resources>
</build>

If you use the above examples, you'll have to move those two
directories to where you really want those the "mySpringBean.xml" file
to be located when copied. For example, if they go into the META-INF
directory, you'll need to have the two files in:

src/main/foo-resources/META-INF/mySpringBean.xml

     and

src/main/bar-resources/META-INF/mySpringBean.xml



On Tue, Jun 23, 2009 at 3:00 PM, Robert Glover<ro...@yahoo.com> wrote:
>
> I have read chapter 13 of "Maven: The Definitive Guide" and did not find my question answered there.
>
>   Here is what I need to do.  I have two subdirectories as follows:
>
> src/main/resources/foo
> src/main/resources/bar
>
>   I have the same file in each of those two directories:
>
> src/main/resources/foo/mySpringBean.xml
> src/main/recourse/bar/mySpringBean.xml
>
>    What I need to do is specify on the command line (or in a Profile or in settings.xml) which of those two directories should have it's contents copied to  target/classes.  The other directory should not have its contents copied into target/classes.
>
>   Thank you in advance! (hope hope).
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


beyond Properies and Resource Filtering

Posted by Robert Glover <ro...@yahoo.com>.
I have read chapter 13 of "Maven: The Definitive Guide" and did not find my question answered there.

   Here is what I need to do.  I have two subdirectories as follows:

src/main/resources/foo
src/main/resources/bar

   I have the same file in each of those two directories:

src/main/resources/foo/mySpringBean.xml
src/main/recourse/bar/mySpringBean.xml

    What I need to do is specify on the command line (or in a Profile or in settings.xml) which of those two directories should have it's contents copied to  target/classes.  The other directory should not have its contents copied into target/classes.

   Thank you in advance! (hope hope).

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How does maven handle artifact's license files?

Posted by David Hoffer <dh...@gmail.com>.
Hum, I just got around to trying this plugin.  I got exactly *zero *licenses
in the created output licenses folder.  Are you sure this plugin scans
transitive dependencies?

I see a list of WARNING it generates for those it cannot find valid licenses
but I have many more dependencies than this list...so either those it didn't
have a problem with or those it didn't even bother to try with.  I'm
assuming the later as I have no licenses in the output folder.

Any ideas?

-Dave

2009/6/24 Stevo Slavić <ss...@gmail.com>

> I don't think so, but I believe I've explained pretty much everything about
> it. I found about it from
> this<https://jira.jboss.org/jira/browse/JBBUILD-477>task in JBoss
> JIRA. From there I followed a link to plugin source code. The plugin
> mojo class<
> https://anonsvn.jboss.org/repos/maven/plugins/jboss/trunk/maven-jboss-license-plugin/src/main/java/org/jboss/maven/plugins/license/DownloadLicensesMojo.java
> >is
> really simple one, every Java developer should be able to read it
> easily.
> Plugin only has a single download-liceses goal, by default bound to
> generate-resources phase, and I've mentioned both parameters
> (outputDirectory, and quiet) in the earlier example. In the mojo class
> source you can see how downloaded license file gets it's name (see
> getLicenseFileName method).
>
> Regards,
> Stevo.
>
> 2009/6/24 Todd Thiessen <th...@nortel.com>
>
> > Thats good to know Stevo. Thanks.
> >
> > Is there a site which describes this plugin and its goals?
> >
> > ---
> > Todd Thiessen
> >
> >
> > > -----Original Message-----
> > > From: Stevo Slavic [mailto:sslavic@gmail.com]
> > > Sent: Wednesday, June 24, 2009 2:34 AM
> > > To: Maven Users List
> > > Subject: Re: How does maven handle artifact's license files?
> > >
> > > It scans through your project's dependencies, looks for
> > > licenses definitions, and tries to download them (based on
> > > given license URL) into a destination you designate via
> > > outputDirectory parameter (defaults to
> > > ${project.build.directory}/licenses). It can do the license
> > > scanning/downloading quietly (defaults to false), not to
> > > report warnings if license can not be found or downloaded. To
> > > automatically embed downloaded licenses into your jar or war
> > > you can use build helper plugin or assembly plugin - wish
> > > jar/war plugins were enough.
> > >
> > > As already stated, problem is that many library vendors don't
> > > include the license info in artefact pom's, but also many
> > > include it in their own special way, so you will e.g. get
> > > multiple differently named Apache 2 licenses, invalid URL's,
> > > or BSD license template library vendor failed to customize, ...
> > >
> > > Regards,
> > > Stevo.
> > >
> > > On Wed, Jun 24, 2009 at 4:35 AM, David Hoffer
> > > <dh...@gmail.com> wrote:
> > >
> > > > What does the maven-jboss-license-plugin do?
> > > >
> > > >
> > > > On Tue, Jun 23, 2009 at 5:03 PM, Stevo Slavić
> > > <ss...@gmail.com> wrote:
> > > >
> > > > >    ...
> > > > >    <pluginRepositories>
> > > > >        ...
> > > > >        <pluginRepository>
> > > > >            <id>repository.jboss.org</id>
> > > > >            <url>http://repository.jboss.org/maven2</url>
> > > > >            <releases>
> > > > >                <enabled>true</enabled>
> > > > >            </releases>
> > > > >            <snapshots>
> > > > >                <enabled>false</enabled>
> > > > >            </snapshots>
> > > > >        </pluginRepository>
> > > > >        ...
> > > > >    </pluginRepositories>
> > > > >    ...
> > > > >    <build>
> > > > >        ...
> > > > >        <plugins>
> > > > >            ...
> > > > >            <plugin>
> > > > >                <groupId>org.jboss.maven.plugins</groupId>
> > > > >                <artifactId>maven-jboss-license-plugin</artifactId>
> > > > >                <version>1.0.0</version>
> > > > >                <executions>
> > > > >                    <execution>
> > > > >                        <id>download-licenses</id>
> > > > >                        <phase>generate-resources</phase>
> > > > >                        <goals>
> > > > >                            <goal>download-licenses</goal>
> > > > >                        </goals>
> > > > >                        <configuration>
> > > > >
> > > > >
> > > > >
> > > >
> > > <outputDirectory>${project.build.directory}/generated-resources/licens
> > > > es</outputDirectory>
> > > > >                            <quiet>false</quiet>
> > > > >                        </configuration>
> > > > >                    </execution>
> > > > >                </executions>
> > > > >            </plugin>
> > > > >            ...
> > > > >        </plugins>
> > > > >        ...
> > > > >    </build>
> > > > >    ...
> > > > >
> > > > > Regards,
> > > > > Stevo.
> > > > >
> > > > > On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > The report does show a list of known licenses and which
> > > artifact
> > > > > > is associated with each.  However most just say Unknown (likely
> > > > > > because
> > > > like
> > > > > > you say the pom is missing the information).
> > > > > >
> > > > > > However this doesn't help the end product, that is, it
> > > doesn't do
> > > > > > what
> > > > > the
> > > > > > license says is needed...rather its just an
> > > informational report.
> > > > > >
> > > > > > For instance, for the apache license, doesn't a copy of the
> > > > > > license
> > > > have
> > > > > to
> > > > > > come with the product/application?  I thought I heard,
> > > some time
> > > > > > ago,
> > > > > that
> > > > > > maven was working on automating this just like they do
> > > for runtime
> > > > > > artifacts.
> > > > > >
> > > > > > -Dave
> > > > > >
> > > > > > On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen
> > > > > > <th...@nortel.com>
> > > > > > wrote:
> > > > > >
> > > > > > > The dependencies report show all transitive licenses that your
> > > > project
> > > > > > > uses. I believe this report is part of the default maven site
> > > > > > > generation.
> > > > > > >
> > > > > > > Of course if artifacts don't have any license information in
> > > > > > > their
> > > > pom,
> > > > > > > no information will be shown in the report.
> > > > > > >
> > > > > > > ---
> > > > > > > Todd Thiessen
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > > > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > > > > > > To: Maven Users List
> > > > > > > > Subject: How does maven handle artifact's license files?
> > > > > > > >
> > > > > > > > Does maven have support for tracking license files my
> > > > > > > > dependent artifacts may have and doing something with these
> > > > > > > > files, such as installing with my
> > > product/application?  If so, how?
> > > > > > > >
> > > > > > > > (Ideally I want to deploy license docs with each
> > > artifact that
> > > > > > > > needs one (ideally public artifacts should already have
> > > > > > > > this) then I want to include all these in a
> > > specific location
> > > > > > > > in my war.)
> > > > > > > >
> > > > > > > > -Dave
> > > > > > > >
> > > > > > >
> > > > > > >
> > > ----------------------------------------------------------------
> > > > > > > ----- To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: How does maven handle artifact's license files?

Posted by Stevo Slavić <ss...@gmail.com>.
I don't think so, but I believe I've explained pretty much everything about
it. I found about it from
this<https://jira.jboss.org/jira/browse/JBBUILD-477>task in JBoss
JIRA. From there I followed a link to plugin source code. The plugin
mojo class<https://anonsvn.jboss.org/repos/maven/plugins/jboss/trunk/maven-jboss-license-plugin/src/main/java/org/jboss/maven/plugins/license/DownloadLicensesMojo.java>is
really simple one, every Java developer should be able to read it
easily.
Plugin only has a single download-liceses goal, by default bound to
generate-resources phase, and I've mentioned both parameters
(outputDirectory, and quiet) in the earlier example. In the mojo class
source you can see how downloaded license file gets it's name (see
getLicenseFileName method).

Regards,
Stevo.

2009/6/24 Todd Thiessen <th...@nortel.com>

> Thats good to know Stevo. Thanks.
>
> Is there a site which describes this plugin and its goals?
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: Stevo Slavic [mailto:sslavic@gmail.com]
> > Sent: Wednesday, June 24, 2009 2:34 AM
> > To: Maven Users List
> > Subject: Re: How does maven handle artifact's license files?
> >
> > It scans through your project's dependencies, looks for
> > licenses definitions, and tries to download them (based on
> > given license URL) into a destination you designate via
> > outputDirectory parameter (defaults to
> > ${project.build.directory}/licenses). It can do the license
> > scanning/downloading quietly (defaults to false), not to
> > report warnings if license can not be found or downloaded. To
> > automatically embed downloaded licenses into your jar or war
> > you can use build helper plugin or assembly plugin - wish
> > jar/war plugins were enough.
> >
> > As already stated, problem is that many library vendors don't
> > include the license info in artefact pom's, but also many
> > include it in their own special way, so you will e.g. get
> > multiple differently named Apache 2 licenses, invalid URL's,
> > or BSD license template library vendor failed to customize, ...
> >
> > Regards,
> > Stevo.
> >
> > On Wed, Jun 24, 2009 at 4:35 AM, David Hoffer
> > <dh...@gmail.com> wrote:
> >
> > > What does the maven-jboss-license-plugin do?
> > >
> > >
> > > On Tue, Jun 23, 2009 at 5:03 PM, Stevo Slavić
> > <ss...@gmail.com> wrote:
> > >
> > > >    ...
> > > >    <pluginRepositories>
> > > >        ...
> > > >        <pluginRepository>
> > > >            <id>repository.jboss.org</id>
> > > >            <url>http://repository.jboss.org/maven2</url>
> > > >            <releases>
> > > >                <enabled>true</enabled>
> > > >            </releases>
> > > >            <snapshots>
> > > >                <enabled>false</enabled>
> > > >            </snapshots>
> > > >        </pluginRepository>
> > > >        ...
> > > >    </pluginRepositories>
> > > >    ...
> > > >    <build>
> > > >        ...
> > > >        <plugins>
> > > >            ...
> > > >            <plugin>
> > > >                <groupId>org.jboss.maven.plugins</groupId>
> > > >                <artifactId>maven-jboss-license-plugin</artifactId>
> > > >                <version>1.0.0</version>
> > > >                <executions>
> > > >                    <execution>
> > > >                        <id>download-licenses</id>
> > > >                        <phase>generate-resources</phase>
> > > >                        <goals>
> > > >                            <goal>download-licenses</goal>
> > > >                        </goals>
> > > >                        <configuration>
> > > >
> > > >
> > > >
> > >
> > <outputDirectory>${project.build.directory}/generated-resources/licens
> > > es</outputDirectory>
> > > >                            <quiet>false</quiet>
> > > >                        </configuration>
> > > >                    </execution>
> > > >                </executions>
> > > >            </plugin>
> > > >            ...
> > > >        </plugins>
> > > >        ...
> > > >    </build>
> > > >    ...
> > > >
> > > > Regards,
> > > > Stevo.
> > > >
> > > > On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com>
> > > wrote:
> > > >
> > > > > The report does show a list of known licenses and which
> > artifact
> > > > > is associated with each.  However most just say Unknown (likely
> > > > > because
> > > like
> > > > > you say the pom is missing the information).
> > > > >
> > > > > However this doesn't help the end product, that is, it
> > doesn't do
> > > > > what
> > > > the
> > > > > license says is needed...rather its just an
> > informational report.
> > > > >
> > > > > For instance, for the apache license, doesn't a copy of the
> > > > > license
> > > have
> > > > to
> > > > > come with the product/application?  I thought I heard,
> > some time
> > > > > ago,
> > > > that
> > > > > maven was working on automating this just like they do
> > for runtime
> > > > > artifacts.
> > > > >
> > > > > -Dave
> > > > >
> > > > > On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen
> > > > > <th...@nortel.com>
> > > > > wrote:
> > > > >
> > > > > > The dependencies report show all transitive licenses that your
> > > project
> > > > > > uses. I believe this report is part of the default maven site
> > > > > > generation.
> > > > > >
> > > > > > Of course if artifacts don't have any license information in
> > > > > > their
> > > pom,
> > > > > > no information will be shown in the report.
> > > > > >
> > > > > > ---
> > > > > > Todd Thiessen
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > > > > > To: Maven Users List
> > > > > > > Subject: How does maven handle artifact's license files?
> > > > > > >
> > > > > > > Does maven have support for tracking license files my
> > > > > > > dependent artifacts may have and doing something with these
> > > > > > > files, such as installing with my
> > product/application?  If so, how?
> > > > > > >
> > > > > > > (Ideally I want to deploy license docs with each
> > artifact that
> > > > > > > needs one (ideally public artifacts should already have
> > > > > > > this) then I want to include all these in a
> > specific location
> > > > > > > in my war.)
> > > > > > >
> > > > > > > -Dave
> > > > > > >
> > > > > >
> > > > > >
> > ----------------------------------------------------------------
> > > > > > ----- To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: How does maven handle artifact's license files?

Posted by Todd Thiessen <th...@nortel.com>.
Thats good to know Stevo. Thanks.

Is there a site which describes this plugin and its goals?

---
Todd Thiessen
 

> -----Original Message-----
> From: Stevo Slavic [mailto:sslavic@gmail.com] 
> Sent: Wednesday, June 24, 2009 2:34 AM
> To: Maven Users List
> Subject: Re: How does maven handle artifact's license files?
> 
> It scans through your project's dependencies, looks for 
> licenses definitions, and tries to download them (based on 
> given license URL) into a destination you designate via 
> outputDirectory parameter (defaults to 
> ${project.build.directory}/licenses). It can do the license 
> scanning/downloading quietly (defaults to false), not to 
> report warnings if license can not be found or downloaded. To 
> automatically embed downloaded licenses into your jar or war 
> you can use build helper plugin or assembly plugin - wish 
> jar/war plugins were enough.
> 
> As already stated, problem is that many library vendors don't 
> include the license info in artefact pom's, but also many 
> include it in their own special way, so you will e.g. get 
> multiple differently named Apache 2 licenses, invalid URL's, 
> or BSD license template library vendor failed to customize, ...
> 
> Regards,
> Stevo.
> 
> On Wed, Jun 24, 2009 at 4:35 AM, David Hoffer 
> <dh...@gmail.com> wrote:
> 
> > What does the maven-jboss-license-plugin do?
> >
> >
> > On Tue, Jun 23, 2009 at 5:03 PM, Stevo Slavić 
> <ss...@gmail.com> wrote:
> >
> > >    ...
> > >    <pluginRepositories>
> > >        ...
> > >        <pluginRepository>
> > >            <id>repository.jboss.org</id>
> > >            <url>http://repository.jboss.org/maven2</url>
> > >            <releases>
> > >                <enabled>true</enabled>
> > >            </releases>
> > >            <snapshots>
> > >                <enabled>false</enabled>
> > >            </snapshots>
> > >        </pluginRepository>
> > >        ...
> > >    </pluginRepositories>
> > >    ...
> > >    <build>
> > >        ...
> > >        <plugins>
> > >            ...
> > >            <plugin>
> > >                <groupId>org.jboss.maven.plugins</groupId>
> > >                <artifactId>maven-jboss-license-plugin</artifactId>
> > >                <version>1.0.0</version>
> > >                <executions>
> > >                    <execution>
> > >                        <id>download-licenses</id>
> > >                        <phase>generate-resources</phase>
> > >                        <goals>
> > >                            <goal>download-licenses</goal>
> > >                        </goals>
> > >                        <configuration>
> > >
> > >
> > >
> > 
> <outputDirectory>${project.build.directory}/generated-resources/licens
> > es</outputDirectory>
> > >                            <quiet>false</quiet>
> > >                        </configuration>
> > >                    </execution>
> > >                </executions>
> > >            </plugin>
> > >            ...
> > >        </plugins>
> > >        ...
> > >    </build>
> > >    ...
> > >
> > > Regards,
> > > Stevo.
> > >
> > > On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com>
> > wrote:
> > >
> > > > The report does show a list of known licenses and which 
> artifact 
> > > > is associated with each.  However most just say Unknown (likely 
> > > > because
> > like
> > > > you say the pom is missing the information).
> > > >
> > > > However this doesn't help the end product, that is, it 
> doesn't do 
> > > > what
> > > the
> > > > license says is needed...rather its just an 
> informational report.
> > > >
> > > > For instance, for the apache license, doesn't a copy of the 
> > > > license
> > have
> > > to
> > > > come with the product/application?  I thought I heard, 
> some time 
> > > > ago,
> > > that
> > > > maven was working on automating this just like they do 
> for runtime 
> > > > artifacts.
> > > >
> > > > -Dave
> > > >
> > > > On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen 
> > > > <th...@nortel.com>
> > > > wrote:
> > > >
> > > > > The dependencies report show all transitive licenses that your
> > project
> > > > > uses. I believe this report is part of the default maven site 
> > > > > generation.
> > > > >
> > > > > Of course if artifacts don't have any license information in 
> > > > > their
> > pom,
> > > > > no information will be shown in the report.
> > > > >
> > > > > ---
> > > > > Todd Thiessen
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > > > > To: Maven Users List
> > > > > > Subject: How does maven handle artifact's license files?
> > > > > >
> > > > > > Does maven have support for tracking license files my 
> > > > > > dependent artifacts may have and doing something with these 
> > > > > > files, such as installing with my 
> product/application?  If so, how?
> > > > > >
> > > > > > (Ideally I want to deploy license docs with each 
> artifact that 
> > > > > > needs one (ideally public artifacts should already have
> > > > > > this) then I want to include all these in a 
> specific location 
> > > > > > in my war.)
> > > > > >
> > > > > > -Dave
> > > > > >
> > > > >
> > > > > 
> ----------------------------------------------------------------
> > > > > ----- To unsubscribe, e-mail: 
> users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How does maven handle artifact's license files?

Posted by Stevo Slavić <ss...@gmail.com>.
It scans through your project's dependencies, looks for licenses
definitions, and tries to download them (based on given license URL) into a
destination you designate via outputDirectory parameter (defaults to
${project.build.directory}/licenses). It can do the license
scanning/downloading quietly (defaults to false), not to report warnings if
license can not be found or downloaded. To automatically embed downloaded
licenses into your jar or war you can use build helper plugin or assembly
plugin - wish jar/war plugins were enough.

As already stated, problem is that many library vendors don't include the
license info in artefact pom's, but also many include it in their own
special way, so you will e.g. get multiple differently named Apache 2
licenses, invalid URL's, or BSD license template library vendor failed to
customize, ...

Regards,
Stevo.

On Wed, Jun 24, 2009 at 4:35 AM, David Hoffer <dh...@gmail.com> wrote:

> What does the maven-jboss-license-plugin do?
>
>
> On Tue, Jun 23, 2009 at 5:03 PM, Stevo Slavić <ss...@gmail.com> wrote:
>
> >    ...
> >    <pluginRepositories>
> >        ...
> >        <pluginRepository>
> >            <id>repository.jboss.org</id>
> >            <url>http://repository.jboss.org/maven2</url>
> >            <releases>
> >                <enabled>true</enabled>
> >            </releases>
> >            <snapshots>
> >                <enabled>false</enabled>
> >            </snapshots>
> >        </pluginRepository>
> >        ...
> >    </pluginRepositories>
> >    ...
> >    <build>
> >        ...
> >        <plugins>
> >            ...
> >            <plugin>
> >                <groupId>org.jboss.maven.plugins</groupId>
> >                <artifactId>maven-jboss-license-plugin</artifactId>
> >                <version>1.0.0</version>
> >                <executions>
> >                    <execution>
> >                        <id>download-licenses</id>
> >                        <phase>generate-resources</phase>
> >                        <goals>
> >                            <goal>download-licenses</goal>
> >                        </goals>
> >                        <configuration>
> >
> >
> >
> <outputDirectory>${project.build.directory}/generated-resources/licenses</outputDirectory>
> >                            <quiet>false</quiet>
> >                        </configuration>
> >                    </execution>
> >                </executions>
> >            </plugin>
> >            ...
> >        </plugins>
> >        ...
> >    </build>
> >    ...
> >
> > Regards,
> > Stevo.
> >
> > On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com>
> wrote:
> >
> > > The report does show a list of known licenses and which artifact is
> > > associated with each.  However most just say Unknown (likely because
> like
> > > you say the pom is missing the information).
> > >
> > > However this doesn't help the end product, that is, it doesn't do what
> > the
> > > license says is needed...rather its just an informational report.
> > >
> > > For instance, for the apache license, doesn't a copy of the license
> have
> > to
> > > come with the product/application?  I thought I heard, some time ago,
> > that
> > > maven was working on automating this just like they do for runtime
> > > artifacts.
> > >
> > > -Dave
> > >
> > > On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen <th...@nortel.com>
> > > wrote:
> > >
> > > > The dependencies report show all transitive licenses that your
> project
> > > > uses. I believe this report is part of the default maven site
> > > > generation.
> > > >
> > > > Of course if artifacts don't have any license information in their
> pom,
> > > > no information will be shown in the report.
> > > >
> > > > ---
> > > > Todd Thiessen
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > > > To: Maven Users List
> > > > > Subject: How does maven handle artifact's license files?
> > > > >
> > > > > Does maven have support for tracking license files my
> > > > > dependent artifacts may have and doing something with these
> > > > > files, such as installing with my product/application?  If so, how?
> > > > >
> > > > > (Ideally I want to deploy license docs with each artifact
> > > > > that needs one (ideally public artifacts should already have
> > > > > this) then I want to include all these in a specific location
> > > > > in my war.)
> > > > >
> > > > > -Dave
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: How does maven handle artifact's license files?

Posted by David Hoffer <dh...@gmail.com>.
What does the maven-jboss-license-plugin do?


On Tue, Jun 23, 2009 at 5:03 PM, Stevo Slavić <ss...@gmail.com> wrote:

>    ...
>    <pluginRepositories>
>        ...
>        <pluginRepository>
>            <id>repository.jboss.org</id>
>            <url>http://repository.jboss.org/maven2</url>
>            <releases>
>                <enabled>true</enabled>
>            </releases>
>            <snapshots>
>                <enabled>false</enabled>
>            </snapshots>
>        </pluginRepository>
>        ...
>    </pluginRepositories>
>    ...
>    <build>
>        ...
>        <plugins>
>            ...
>            <plugin>
>                <groupId>org.jboss.maven.plugins</groupId>
>                <artifactId>maven-jboss-license-plugin</artifactId>
>                <version>1.0.0</version>
>                <executions>
>                    <execution>
>                        <id>download-licenses</id>
>                        <phase>generate-resources</phase>
>                        <goals>
>                            <goal>download-licenses</goal>
>                        </goals>
>                        <configuration>
>
>
> <outputDirectory>${project.build.directory}/generated-resources/licenses</outputDirectory>
>                            <quiet>false</quiet>
>                        </configuration>
>                    </execution>
>                </executions>
>            </plugin>
>            ...
>        </plugins>
>        ...
>    </build>
>    ...
>
> Regards,
> Stevo.
>
> On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com> wrote:
>
> > The report does show a list of known licenses and which artifact is
> > associated with each.  However most just say Unknown (likely because like
> > you say the pom is missing the information).
> >
> > However this doesn't help the end product, that is, it doesn't do what
> the
> > license says is needed...rather its just an informational report.
> >
> > For instance, for the apache license, doesn't a copy of the license have
> to
> > come with the product/application?  I thought I heard, some time ago,
> that
> > maven was working on automating this just like they do for runtime
> > artifacts.
> >
> > -Dave
> >
> > On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen <th...@nortel.com>
> > wrote:
> >
> > > The dependencies report show all transitive licenses that your project
> > > uses. I believe this report is part of the default maven site
> > > generation.
> > >
> > > Of course if artifacts don't have any license information in their pom,
> > > no information will be shown in the report.
> > >
> > > ---
> > > Todd Thiessen
> > >
> > >
> > > > -----Original Message-----
> > > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > > To: Maven Users List
> > > > Subject: How does maven handle artifact's license files?
> > > >
> > > > Does maven have support for tracking license files my
> > > > dependent artifacts may have and doing something with these
> > > > files, such as installing with my product/application?  If so, how?
> > > >
> > > > (Ideally I want to deploy license docs with each artifact
> > > > that needs one (ideally public artifacts should already have
> > > > this) then I want to include all these in a specific location
> > > > in my war.)
> > > >
> > > > -Dave
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: How does maven handle artifact's license files?

Posted by Stevo Slavić <ss...@gmail.com>.
    ...
    <pluginRepositories>
        ...
        <pluginRepository>
            <id>repository.jboss.org</id>
            <url>http://repository.jboss.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        ...
    </pluginRepositories>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.jboss.maven.plugins</groupId>
                <artifactId>maven-jboss-license-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <id>download-licenses</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>download-licenses</goal>
                        </goals>
                        <configuration>

<outputDirectory>${project.build.directory}/generated-resources/licenses</outputDirectory>
                            <quiet>false</quiet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            ...
        </plugins>
        ...
    </build>
    ...

Regards,
Stevo.

On Tue, Jun 23, 2009 at 8:57 PM, David Hoffer <dh...@gmail.com> wrote:

> The report does show a list of known licenses and which artifact is
> associated with each.  However most just say Unknown (likely because like
> you say the pom is missing the information).
>
> However this doesn't help the end product, that is, it doesn't do what the
> license says is needed...rather its just an informational report.
>
> For instance, for the apache license, doesn't a copy of the license have to
> come with the product/application?  I thought I heard, some time ago, that
> maven was working on automating this just like they do for runtime
> artifacts.
>
> -Dave
>
> On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen <th...@nortel.com>
> wrote:
>
> > The dependencies report show all transitive licenses that your project
> > uses. I believe this report is part of the default maven site
> > generation.
> >
> > Of course if artifacts don't have any license information in their pom,
> > no information will be shown in the report.
> >
> > ---
> > Todd Thiessen
> >
> >
> > > -----Original Message-----
> > > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > > Sent: Tuesday, June 23, 2009 2:40 PM
> > > To: Maven Users List
> > > Subject: How does maven handle artifact's license files?
> > >
> > > Does maven have support for tracking license files my
> > > dependent artifacts may have and doing something with these
> > > files, such as installing with my product/application?  If so, how?
> > >
> > > (Ideally I want to deploy license docs with each artifact
> > > that needs one (ideally public artifacts should already have
> > > this) then I want to include all these in a specific location
> > > in my war.)
> > >
> > > -Dave
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: How does maven handle artifact's license files?

Posted by David Hoffer <dh...@gmail.com>.
The report does show a list of known licenses and which artifact is
associated with each.  However most just say Unknown (likely because like
you say the pom is missing the information).

However this doesn't help the end product, that is, it doesn't do what the
license says is needed...rather its just an informational report.

For instance, for the apache license, doesn't a copy of the license have to
come with the product/application?  I thought I heard, some time ago, that
maven was working on automating this just like they do for runtime
artifacts.

-Dave

On Tue, Jun 23, 2009 at 12:45 PM, Todd Thiessen <th...@nortel.com> wrote:

> The dependencies report show all transitive licenses that your project
> uses. I believe this report is part of the default maven site
> generation.
>
> Of course if artifacts don't have any license information in their pom,
> no information will be shown in the report.
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: David Hoffer [mailto:dhoffer6@gmail.com]
> > Sent: Tuesday, June 23, 2009 2:40 PM
> > To: Maven Users List
> > Subject: How does maven handle artifact's license files?
> >
> > Does maven have support for tracking license files my
> > dependent artifacts may have and doing something with these
> > files, such as installing with my product/application?  If so, how?
> >
> > (Ideally I want to deploy license docs with each artifact
> > that needs one (ideally public artifacts should already have
> > this) then I want to include all these in a specific location
> > in my war.)
> >
> > -Dave
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: How does maven handle artifact's license files?

Posted by Todd Thiessen <th...@nortel.com>.
The dependencies report show all transitive licenses that your project
uses. I believe this report is part of the default maven site
generation.

Of course if artifacts don't have any license information in their pom,
no information will be shown in the report.

---
Todd Thiessen
 

> -----Original Message-----
> From: David Hoffer [mailto:dhoffer6@gmail.com] 
> Sent: Tuesday, June 23, 2009 2:40 PM
> To: Maven Users List
> Subject: How does maven handle artifact's license files?
> 
> Does maven have support for tracking license files my 
> dependent artifacts may have and doing something with these 
> files, such as installing with my product/application?  If so, how?
> 
> (Ideally I want to deploy license docs with each artifact 
> that needs one (ideally public artifacts should already have 
> this) then I want to include all these in a specific location 
> in my war.)
> 
> -Dave
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org