That's not a bad idea, but I need to be careful with it. The syntax allows
for you to specify something like:
<directory>/tmp/mine/src</directory>
<filemode>440</filemode>
<sources>
<source>
<location>src/main/java</location>
<includes>
<include>**/*.java</include>
</includes>
</source>
</sources>
which would include all Java sources into the package. Using your rule, I
would get
%attr(440,-,-) /tmp/mine/src/**/*.java
which I think would be rejected. In addition, the syntax allows an
<excludes> element which needs consideration. I'll give it a bit of
thought. I may need to add an option in the <mapping> specification to
determine whether to do one spec line for the entire mapping or one per
source include.
----- Original Message -----
From: "DROILLARD Vincent Ext ROSI/DPS" <[EMAIL PROTECTED]>
To: <user@mojo.codehaus.org>
Sent: Wednesday, February 14, 2007 5:15 AM
Subject: RE: [mojo-user] [rpm-maven-plugin] Spec file generation problems
Thanks for your answer.
I put the Case1 because it was the only way I found to have file rights
specified int the Spec file.
I am conscious that I did not use not a good syntax.
To resolve my problem, what about this rule :
If <include> tag is found then generate a line in Spec file with directory +
include files
Example :
<directory>/tmp/mine</directory>
<filemode>444</filemode>
<sources><source>
<location>src/mine</location>
<includes>
<include>*.csv</include>
<include>other.file</include>
</includes>
</source><sources>
Spec file :
%attr(444,-,-) /tmp/mine/*.csv
%attr(444,-,-) /tmp/mine/other.file
It will also resolve the problem that I can't get files with different
filemode in the same directory.
Vincent.
-----Message d'origine-----
De : Bob Allison [mailto:[EMAIL PROTECTED]
Envoyé : mardi 13 février 2007 19:14
À : user@mojo.codehaus.org
Objet : Re: [mojo-user] [rpm-maven-plugin] Spec file generation problems
Sorry, I missed this message the first time around...
Case 1: That would be the expected result. You specified a destination
*directory* of /tmp/mine/hi.csv, so it placed the file in that directory.
Case 2: The code does not know that you are only specifying a single file
at present (the plexus archiver does not return the number of files copied),
so it has to build the spec file entry based on the directory name. Other
than that, this is what I would expect to work.
Case 3: This should be specified as
"<location>src/mine</location><includes><include>*.csv</include></includes>".
Yes, there are a lot of things that are accepted in a spec file which the
plugin does not generate. The primary reason for that is that the
configuration is already fairly complicated with just the stuff to make
reasonably complex RPMs and I have to work under some constraints based on
the tools being used to get the files into place for packaging.
I will try to look to see if there is some way I can improve how the spec
file is being generated.
----- Original Message -----
From: "DROILLARD Vincent Ext ROSI/DPS" <[EMAIL PROTECTED]>
To: <user@mojo.codehaus.org>
Sent: Tuesday, February 13, 2007 12:08 PM
Subject: RE: [mojo-user] [rpm-maven-plugin] Spec file generation problems
Nobody has comment ?
-----Message d'origine-----
De : DROILLARD Vincent Ext ROSI/DPS
[mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 janvier 2007 15:01
À : user@mojo.codehaus.org
Objet : [mojo-user] [rpm-maven-plugin] Spec file generation problems
Hi,
I want to set rights on files with the rpm plugin but I only can do that for
directories.
Example : I want to set rights 444 to the file /tmp/mine/hi.csv
Case 1 :
--------
Pom.xml :
<directory>/tmp/mine/hi.csv</directory>
<filemode>444</filemode>
<sources><source>
<location>src/mine/hi.csv</location>
</source><sources>
Spec file :
%attr(444,-,-) /tmp/mine/hi.csv
Spec file is OK but the created tree is /tmp/mine/hi.csv/hi.csv
Case 2
------
Pom.xml :
<directory>/tmp/mine</directory>
<filemode>444</filemode>
<sources><source>
<location>src/mine/hi.csv</location>
</source><sources>
Spec file :
%attr(444,-,-) /tmp/mine
Hi.csv has 444 rights but also the directory /tmp/mine.
A directory with 444 rights, it's not fun.
In this case I was waiting for a spec file like : %attr(444,-,-)
/tmp/mine/hi.csv I obtain the same result with the line
<location>src/mine</location>
Case 3
------
Pom.xml :
<directory>/tmp/mine</directory>
<filemode>444</filemode>
<sources><source>
<location>src/mine/*.csv</location>
</source><sources>
Spec file :
%attr(444,-,-) /tmp/mine
The *.csv is not recognize in compilation but a line like
"%attr(444,-,-) /tmp/mine/*.csv" is accepeted ine a Spec file !
If somebody can help me ?
Vincent.
*********************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised use or dissemination is
prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
********************************
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
*********************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised
use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or
falsified.
If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
********************************
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
*********************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised
use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or
falsified.
If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
********************************
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email