Hi Petr, thanks for your reply
Hello,
for such cases we developer our own plugin called svninfo, that stores
SVN revision and tag name for every jar we develop. We also developed
simple API for reading it for every jar in classpath that has this
information.
I still hope I can avoid that ;-)
Havin it in the manifest would be the best since there is already an API
to access the manifest.
I digged more into it and one of my problems with filtering was
http://jira.codehaus.org/browse/MASSEMBLY-144
This plugin doesn't use generic SCM plugin.
If there is interest we can publish it.
Anyway we use filtering this way:
<build>
<!-- there are variables we want to use -->
<filters>
<filter>../../conf/local-configuration-default.properties</filter>
<filter>../../conf/local-configuration.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources-properties</directory>
<filtering>true</filtering>
</resource>
</resources>
I have the filters set up similar, in the <configuration> tag of the
assembly plugin
<filters>
<filter>src/main/assembly/filter.properties</filter>
</filters>
This was done according to
http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
(chapter "The POM")
The assembly plugin does not seem to recognize the <filters>/<filter>
tags: if I specify a none-existing property file or if I make
intentional changes to the tags I do not get errors. What is wrong here?
(Maybe the page should be updated and include a pointer to
http://jira.codehaus.org/browse/MASSEMBLY-144?)
In the end I get a filtered file in target\archive-temp which has and
entry like
name=0
which was before
name=${scm.revision}
I can see this from mvn -X
[INFO] [scm:update {execution: getting-scm.revision}]
[INFO] Executing: svn --username maven --non-interactive update
[INFO] Working directory: D:\projekte\template\templatePom-trunk
[DEBUG] Revision 375.
[INFO] Unknown file status: 'R' in line Revision 375..
[INFO] Storing revision in 'scm.revision' project property.
Was this succesfull?
Thanks for any help!
best regards
Bernd
berndq píše v St 10. 01. 2007 v 10:22 +0100:
Hi,
I need to have the SCM revision somewhere in an assembled jar file.
I can get it into a property but can't get it into e.g. the manifest
file due to http://jira.codehaus.org/browse/MASSEMBLY-121
I tried filtering but I could not get it to work. Anyway I am not sure
how I would have to set up a filter based on a property value.
Any help is appreciated.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
--
Petr Ferschmann
SoftEU s.r.o.
-----------------------------------
Sady Petatricatniku 31
301 00 Plzen
Czech Republic
-----------------------------------
Phone: +420 373 729 300
Fax: +420 373 729 301
Cell: +420 775 638 008
E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]