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 2012/01/03 17:22:17 UTC

How to configure properties-maven-plugin to report built in properties/variables

How can I get project variables/properties exported to property file?

I'm using properties-maven-plugin and it's good but it only reports
things I have explicitly created as properties in my project.  I need
to also get a report on things that maven already defined such as:

<project...
 <scm>
      <connection>scm:svn:https://...</connection>
      <developerConnection>scm:svn:https://...</developerConnection>
      <url>https://...</url>
    </scm>
...
</project>

To get these values reported using this plugin I have to add this to my project:

<properties>
        <project.scm.connection>${project.scm.connection}</project.scm.connection>
        <project.scm.developerConnection>${project.scm.developerConnection}</project.scm.developerConnection>
        <project.scm.url>${project.scm.url}</project.scm.url>
</properties>

This is tedious and error prone.  Is there a way to report this
without adding variables as properties manually?

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


Re: How to configure properties-maven-plugin to report built in properties/variables

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

if you create a site and using the project-info-report-plugin will show 
a page with the information about the source repository....
which contains exactly the information about the <scm> area...

http://maven.apache.org/plugins/maven-project-info-reports-plugin/
Example of this:
http://maven.apache.org/plugins/maven-project-info-reports-plugin/source-repository.html

So no need to put the scm connections into properties which will not 
work...in particular if you are using the release plugin of Maven...
So simply write the information plain into the scm are no using of 
properties...

> <project...
>   <scm>
>        <connection>scm:svn:https://...</connection>
>        <developerConnection>scm:svn:https://...</developerConnection>
>        <url>https://...</url>
>      </scm>
> ...
> </project>
>
> To get these values reported using this plugin I have to add this to my project:
>
> <properties>
>          <project.scm.connection>${project.scm.connection}</project.scm.connection>
>          <project.scm.developerConnection>${project.scm.developerConnection}</project.scm.developerConnection>
>          <project.scm.url>${project.scm.url}</project.scm.url>
> </properties>
>
> This is tedious and error prone.  Is there a way to report this
> without adding variables as properties manually?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

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


Re: How to configure properties-maven-plugin to report built in properties/variables

Posted by Guillaume Polet <gu...@gmail.com>.
You can achieve this very easily by using the maven-ant-plugin combined 
with the echoproperties Ant task 
(http://ant.apache.org/manual/Tasks/echoproperties.html).

Cheers,
Guillaume

Le 3/01/2012 17:22, David Hoffer a écrit :
> How can I get project variables/properties exported to property file?
>
> I'm using properties-maven-plugin and it's good but it only reports
> things I have explicitly created as properties in my project.  I need
> to also get a report on things that maven already defined such as:
>
> <project...
>   <scm>
>        <connection>scm:svn:https://...</connection>
>        <developerConnection>scm:svn:https://...</developerConnection>
>        <url>https://...</url>
>      </scm>
> ...
> </project>
>
> To get these values reported using this plugin I have to add this to my project:
>
> <properties>
>          <project.scm.connection>${project.scm.connection}</project.scm.connection>
>          <project.scm.developerConnection>${project.scm.developerConnection}</project.scm.developerConnection>
>          <project.scm.url>${project.scm.url}</project.scm.url>
> </properties>
>
> This is tedious and error prone.  Is there a way to report this
> without adding variables as properties manually?
>
> ---------------------------------------------------------------------
> 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 to configure properties-maven-plugin to report built in properties/variables

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 03.01.2012 17:22 schrieb "David Hoffer" <dh...@gmail.com>:
>
> How can I get project variables/properties exported to property file?

What are you going to do with these properties files?

Depending on your use case, there might be quite easy solutions for you,
without putting a lot of properties into files.

A

>
> I'm using properties-maven-plugin and it's good but it only reports
> things I have explicitly created as properties in my project.  I need
> to also get a report on things that maven already defined such as:
>
> <project...
>  <scm>
>      <connection>scm:svn:https://...</connection>
>      <developerConnection>scm:svn:https://...</developerConnection>
>      <url>https://...</url>
>    </scm>
> ...
> </project>
>
> To get these values reported using this plugin I have to add this to my
project:
>
> <properties>
>
 <project.scm.connection>${project.scm.connection}</project.scm.connection>
>
 <project.scm.developerConnection>${project.scm.developerConnection}</project.scm.developerConnection>
>        <project.scm.url>${project.scm.url}</project.scm.url>
> </properties>
>
> This is tedious and error prone.  Is there a way to report this
> without adding variables as properties manually?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>