Re: Retrieving subversion revision number

2007-08-14 Thread DCVer

Ok it works fine now, thanks.
I've put the plugin configurations in pluginManagement - not in "pure"
plugins section. That's why it failed before.


Dirk Olmes-4 wrote:
> 
>> The problem has changed a bit. I would like to get the revision number of
>> the working copy checked out from the svn repository (don't have to be
>> the
>> actual rev number - may be "out of date"). So.. I think this number can
>> be
>> received from .svn/entries file. Does the maven buildnumber plugin is
>> able
>> to get this number from local files (stored in .svn directory probably)
>> or
>> must connect to svn repository?
> 
> The buildnumber plugin retrieves the svn version number from the local
> working copy. AFAICT it does not access the remote repo for this
> operation.
> 
> -dirk
> 
> -- 
> Anyway kids, have fun, play nicely, be good. And remember - if it ain't
> broke, hit it again.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12143842
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Retrieving subversion revision number

2007-08-14 Thread Dirk Olmes
> The problem has changed a bit. I would like to get the revision number of
> the working copy checked out from the svn repository (don't have to be the
> actual rev number - may be "out of date"). So.. I think this number can be
> received from .svn/entries file. Does the maven buildnumber plugin is able
> to get this number from local files (stored in .svn directory probably) or
> must connect to svn repository?

The buildnumber plugin retrieves the svn version number from the local
working copy. AFAICT it does not access the remote repo for this
operation.

-dirk

-- 
Anyway kids, have fun, play nicely, be good. And remember - if it ain't
broke, hit it again.


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



Re: Retrieving subversion revision number

2007-08-14 Thread DCVer

Hi again,

The problem has changed a bit. I would like to get the revision number of
the working copy checked out from the svn repository (don't have to be the
actual rev number - may be "out of date"). So.. I think this number can be
received from .svn/entries file. Does the maven buildnumber plugin is able
to get this number from local files (stored in .svn directory probably) or
must connect to svn repository?

Thanks in advance


nick_stolwijk wrote:
> 
> Have a look at the buildnumber plugin, which does exactly that.[1]
> 
> Hth,
> 
> Nick Stolwijk
> 
> [1]
> http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/index.html
> 
> DCVer wrote:
>> Hi all,
>>
>> I would like to get the revision number of my project on svn repository
>> using maven2 (or some other tool) and put this number e.g. in some
>> property
>> file. How could this be done?
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12140212
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Retrieving subversion revision number

2007-08-07 Thread Nick Stolwijk

My SCM section of my pom file (slightly modified for security reasons)

   
   
scm:svn:https://:/svnroot//trunk
   
scm:svn:https://:/svnroot//trunk

   

The only other trouble I had with the buildnumber plugin (as I mentioned 
before) that it needs the SVN executable. As far as I know it doesn't 
look for contact to the subversion repository, but uses the svn 
information in your working copy.


Hth,

Nick Stolwijk

DCVer wrote:

Have you made any configuration to scm plugin
(org.apache.maven.plugins
maven-scm-plugin) or used  tags in your
pom.xml? I would be thankful if you could paste your configuration (if u
used one of them). My svn repository uses ssh private key to get to it.


Nick Stolwijk wrote:
  

I've configured the buildnumber plugin as follows:


   org.codehaus.mojo
   maven-buildnumber-plugin
   0.9.5
   
   
  validate

create
  
   
   


And uses it in a propertie file in src/main/resources:
version=Version: ${pom.version} - ${buildNumber}

The pom.version is replaced bij mij project version and the buildNumber 
is replaced bij my SVN revision at the moment. It does use the SVN 
executable, so you need SVN installed (and not only a GUI like Subclipse 
or Tortoise).


Hth,

Nick Stolwijk


DCVer wrote:


Hmm, now I see that the revision number is null.. Looks like maven is
ignoring the scm tag..


Jörg Schaible wrote:
  
  

DCVer wrote on Tuesday, August 07, 2007 8:57 AM:




Thanks for all replies, but when I use this plugin I receive
the version of
my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
revision number of the svn version (e.g. 768). If someone commits some
changes and the revision number turns to 769 this would be
shown in some
property file or manifest file or whatever. I think this needs a
communication with svn using scm tags (I have already configured scm).
  
  

You might define a property in the POM like:


$Revision$


This will be updated everytime your POM is checked in. Since this is
also
the case releasing the artifact, you will always have the proper svn
revision for a release within this property.

- Jörg

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





  
  

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






  



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



Re: Retrieving subversion revision number

2007-08-07 Thread DCVer

Have you made any configuration to scm plugin
(org.apache.maven.plugins
maven-scm-plugin) or used  tags in your
pom.xml? I would be thankful if you could paste your configuration (if u
used one of them). My svn repository uses ssh private key to get to it.


Nick Stolwijk wrote:
> 
> I've configured the buildnumber plugin as follows:
> 
> 
>org.codehaus.mojo
>maven-buildnumber-plugin
>0.9.5
>
>
>   validate
> 
> create
>   
>
>
> 
> 
> And uses it in a propertie file in src/main/resources:
> version=Version: ${pom.version} - ${buildNumber}
> 
> The pom.version is replaced bij mij project version and the buildNumber 
> is replaced bij my SVN revision at the moment. It does use the SVN 
> executable, so you need SVN installed (and not only a GUI like Subclipse 
> or Tortoise).
> 
> Hth,
> 
> Nick Stolwijk
> 
> 
> DCVer wrote:
>> Hmm, now I see that the revision number is null.. Looks like maven is
>> ignoring the scm tag..
>>
>>
>> Jörg Schaible wrote:
>>   
>>> DCVer wrote on Tuesday, August 07, 2007 8:57 AM:
>>>
>>> 
 Thanks for all replies, but when I use this plugin I receive
 the version of
 my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
 revision number of the svn version (e.g. 768). If someone commits some
 changes and the revision number turns to 769 this would be
 shown in some
 property file or manifest file or whatever. I think this needs a
 communication with svn using scm tags (I have already configured scm).
   
>>> You might define a property in the POM like:
>>>
>>> 
>>> $Revision$
>>> 
>>>
>>> This will be updated everytime your POM is checked in. Since this is
>>> also
>>> the case releasing the artifact, you will always have the proper svn
>>> revision for a release within this property.
>>>
>>> - Jörg
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> 
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12030511
Sent from the Maven - Users mailing list archive at Nabble.com.


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



RE: Retrieving subversion revision number

2007-08-07 Thread Jörg Schaible
DCVer wrote on Tuesday, August 07, 2007 9:36 AM:

> Hmm, now I see that the revision number is null.. Looks like maven is
> ignoring the scm tag.. 

?!?! Cannot make any sense out of your comment. What is here your "revision 
number", how do you gather it and how is it related to the SCM tag at all ?

- Jörg

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

> 
> 
> Jörg Schaible wrote:
>> 
>> DCVer wrote on Tuesday, August 07, 2007 8:57 AM:
>> 
>>> Thanks for all replies, but when I use this plugin I receive the
>>> version of my my project (e.g. 1.0-SNAPSHOT), but I would like to
>>> get somehow the revision number of the svn version (e.g. 768). If
>>> someone commits some changes and the revision number turns to 769
>>> this would be shown in some property file or manifest file or
>>> whatever. I think this needs a communication with svn using scm
>>> tags (I have already configured scm). 
>> 
>> You might define a property in the POM like:
>> 
>> 
>>  $Revision$
>> 
>> 
>> This will be updated everytime your POM is checked in. Since this is
>> also the case releasing the artifact, you will always have the
>> proper svn revision for a release within this property.
>> 
>> - Jörg
>> 
>> 
> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Retrieving subversion revision number

2007-08-07 Thread Nick Stolwijk

I've configured the buildnumber plugin as follows:


  org.codehaus.mojo
  maven-buildnumber-plugin
  0.9.5
  
  
 validate
   
   create
 
  
  


And uses it in a propertie file in src/main/resources:
version=Version: ${pom.version} - ${buildNumber}

The pom.version is replaced bij mij project version and the buildNumber 
is replaced bij my SVN revision at the moment. It does use the SVN 
executable, so you need SVN installed (and not only a GUI like Subclipse 
or Tortoise).


Hth,

Nick Stolwijk


DCVer wrote:

Hmm, now I see that the revision number is null.. Looks like maven is
ignoring the scm tag..


Jörg Schaible wrote:
  

DCVer wrote on Tuesday, August 07, 2007 8:57 AM:



Thanks for all replies, but when I use this plugin I receive
the version of
my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
revision number of the svn version (e.g. 768). If someone commits some
changes and the revision number turns to 769 this would be
shown in some
property file or manifest file or whatever. I think this needs a
communication with svn using scm tags (I have already configured scm).
  

You might define a property in the POM like:


$Revision$


This will be updated everytime your POM is checked in. Since this is also
the case releasing the artifact, you will always have the proper svn
revision for a release within this property.

- Jörg

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






  



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



RE: Retrieving subversion revision number

2007-08-07 Thread DCVer

Hmm, now I see that the revision number is null.. Looks like maven is
ignoring the scm tag..


Jörg Schaible wrote:
> 
> DCVer wrote on Tuesday, August 07, 2007 8:57 AM:
> 
>> Thanks for all replies, but when I use this plugin I receive
>> the version of
>> my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
>> revision number of the svn version (e.g. 768). If someone commits some
>> changes and the revision number turns to 769 this would be
>> shown in some
>> property file or manifest file or whatever. I think this needs a
>> communication with svn using scm tags (I have already configured scm).
> 
> You might define a property in the POM like:
> 
> 
>   $Revision$
> 
> 
> This will be updated everytime your POM is checked in. Since this is also
> the case releasing the artifact, you will always have the proper svn
> revision for a release within this property.
> 
> - Jörg
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12029766
Sent from the Maven - Users mailing list archive at Nabble.com.


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



RE: Retrieving subversion revision number

2007-08-07 Thread Jörg Schaible
DCVer wrote on Tuesday, August 07, 2007 8:57 AM:

> Thanks for all replies, but when I use this plugin I receive
> the version of
> my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
> revision number of the svn version (e.g. 768). If someone commits some
> changes and the revision number turns to 769 this would be
> shown in some
> property file or manifest file or whatever. I think this needs a
> communication with svn using scm tags (I have already configured scm).

You might define a property in the POM like:


$Revision$


This will be updated everytime your POM is checked in. Since this is also the 
case releasing the artifact, you will always have the proper svn revision for a 
release within this property.

- Jörg

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



Re: Retrieving subversion revision number

2007-08-06 Thread DCVer

Thanks for all replies, but when I use this plugin I receive the version of
my my project (e.g. 1.0-SNAPSHOT), but I would like to get somehow the
revision number of the svn version (e.g. 768). If someone commits some
changes and the revision number turns to 769 this would be shown in some
property file or manifest file or whatever. I think this needs a
communication with svn using scm tags (I have already configured scm).


Nick Stolwijk wrote:
> 
> Have a look at the buildnumber plugin, which does exactly that.[1]
> 
> Hth,
> 
> Nick Stolwijk
> 
> [1]
> http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/index.html
> 
> DCVer wrote:
>> Hi all,
>>
>> I would like to get the revision number of my project on svn repository
>> using maven2 (or some other tool) and put this number e.g. in some
>> property
>> file. How could this be done?
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12029403
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Retrieving subversion revision number

2007-08-06 Thread Lee Meador
You can do it by generating a file with Ant as well. I generate a java
source file with a constant in it in the generate-source phase. You could
generate a .properties file.

This is in the POM under 


  maven-antrun-plugin
  

  gensrc
  generate-sources
  

  
  

 ${project.build.directory
}/generated-sources/java
  
  
run
  

  


This is the Ant target:




package com.mycompany.myapp;
/** Generated in ANT */
public class ProgramVersion
{
   public static final String VERSION = "${program.version}";
}



-- Lee Meador

On 8/6/07, Nick Stolwijk <[EMAIL PROTECTED]> wrote:
>
> Have a look at the buildnumber plugin, which does exactly that.[1]
>
> Hth,
>
> Nick Stolwijk
>
> [1]
> http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/index.html
>
> DCVer wrote:
> > Hi all,
> >
> > I would like to get the revision number of my project on svn repository
> > using maven2 (or some other tool) and put this number e.g. in some
> property
> > file. How could this be done?
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com


Re: Retrieving subversion revision number

2007-08-06 Thread Nick Stolwijk

Have a look at the buildnumber plugin, which does exactly that.[1]

Hth,

Nick Stolwijk

[1] http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/index.html

DCVer wrote:

Hi all,

I would like to get the revision number of my project on svn repository
using maven2 (or some other tool) and put this number e.g. in some property
file. How could this be done?
  



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



Re: Retrieving subversion revision number

2007-08-06 Thread ben short
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html

On 8/6/07, DCVer <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I would like to get the revision number of my project on svn repository
> using maven2 (or some other tool) and put this number e.g. in some property
> file. How could this be done?
> --
> View this message in context: 
> http://www.nabble.com/Retrieving-subversion-revision-number-tf4225135s177.html#a12019324
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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