reading dependency list from pom into rpm plugin require

2010-03-24 Thread eyal edri
Hi,

i'm looking for the best way to auto fill the require field in the rpm
plugin.
since we're using rpm/yum as the deployer of our java apps,
i don't want to mange a duplicate set of dependencies in the pom file,
in order to do so,  i want to fill the requires tag auto from the maven
dependencies list in the pom file.

for example, the following pom will create an rpm with rpm dependencies
similar to the maven ones.
(marked in yellow)

a few 'rules' needs to be followed:
1. each rpm will always have the same name of the artifactId.
2. each maven dependency will be packed in its own rpm

any ideas? (gmaven maybe..)

*the pom:*
?xml version=1.0 encoding=utf-8?
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcom.company.url.miscats/groupId
  artifactIdApplication/artifactId
  packagingjar/packaging
  version2.0.0-3/version
  nameApplication/name
  parent
   artifactIdParent/artifactId
   groupIdcom.company.maven.pom/groupId
   version2.0.0-5/version
  /parent
  descriptionthe app/description
  build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdrpm-maven-plugin/artifactId
extensionsfalse/extensions
 executions
  execution
goals
  goalrpm/goal
/goals
  /execution
 /executions
 configuration
copyright${project.organization.name}/copyright
distributionXXX/distribution
groupSample/Apps/group
packager${user.name}/packager
 name${project.name}/name
 summary${project.description}/summary
 needarchtrue/needarch
 autoRequirestrue/autoRequires
 dependency/
 requires
 requireDep1/require
 requireDep2/require
 /requires
 mappings
 mapping
   artifact/

directory/usr/lib/java/${project.artifactId}/directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
/mapping
mapping
   directory/etc/${project.artifactId}/directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
   sources
   source

locationsrc/main/resources/App.properties/location

locationsrc/main/resources/log4j.properties/location
   /source
   /sources
/mapping
mapping
   directory/etc/cron.d//directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
   sources
   source
   locationsrc/main/resources/App.cron/location
   /source
   /sources
/mapping
/mappings
preinstallScriptlet
 scriptecho installing ${artifactId} on arch
${os.arch}/script
/preinstallScriptlet
 /configuration
   /plugin
/plugins
  /build
  dependencies
   dependency
   groupIdcom.company.sql/groupId
   artifactIdDep1/artifactId
   version2.0.0-4/version
   /dependency
   dependency
   groupIdcom.company.stub/groupId
   artifactIdDep2/artifactId
   version2.0.0-2/version
   /dependency
  /dependencies
/project

-- 
Eyal Edri


Re: reading dependency list from pom into rpm plugin require

2010-03-24 Thread Stephen Connolly
I think you really want an rpm packaging type then the listed deps which are
typerpm/type would be the ones which are required

not sure if the plugin supports the above

On 24 March 2010 13:20, eyal edri eyal.e...@gmail.com wrote:

 Hi,

 i'm looking for the best way to auto fill the require field in the rpm
 plugin.
 since we're using rpm/yum as the deployer of our java apps,
 i don't want to mange a duplicate set of dependencies in the pom file,
 in order to do so,  i want to fill the requires tag auto from the maven
 dependencies list in the pom file.

 for example, the following pom will create an rpm with rpm dependencies
 similar to the maven ones.
 (marked in yellow)

 a few 'rules' needs to be followed:
 1. each rpm will always have the same name of the artifactId.
 2. each maven dependency will be packed in its own rpm

 any ideas? (gmaven maybe..)

 *the pom:*
 ?xml version=1.0 encoding=utf-8?
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
 
  modelVersion4.0.0/modelVersion
  groupIdcom.company.url.miscats/groupId
  artifactIdApplication/artifactId
  packagingjar/packaging
  version2.0.0-3/version
  nameApplication/name
  parent
   artifactIdParent/artifactId
   groupIdcom.company.maven.pom/groupId
   version2.0.0-5/version
  /parent
  descriptionthe app/description
  build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdrpm-maven-plugin/artifactId
extensionsfalse/extensions
 executions
  execution
goals
  goalrpm/goal
/goals
  /execution
 /executions
 configuration
copyright${project.organization.name}/copyright
distributionXXX/distribution
groupSample/Apps/group
packager${user.name}/packager
 name${project.name}/name
 summary${project.description}/summary
 needarchtrue/needarch
 autoRequirestrue/autoRequires
 dependency/
 requires
 requireDep1/require
 requireDep2/require
 /requires
 mappings
 mapping
   artifact/

 directory/usr/lib/java/${project.artifactId}/directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
/mapping
mapping
   directory/etc/${project.artifactId}/directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
   sources
   source

 locationsrc/main/resources/App.properties/location

 locationsrc/main/resources/log4j.properties/location
   /source
   /sources
/mapping
mapping
   directory/etc/cron.d//directory
   filemode750/filemode
   usernameroot/username
   groupnameroot/groupname
   sources
   source
   locationsrc/main/resources/App.cron/location
   /source
   /sources
/mapping
/mappings
preinstallScriptlet
 scriptecho installing ${artifactId} on arch
 ${os.arch}/script
/preinstallScriptlet
 /configuration
   /plugin
/plugins
  /build
  dependencies
   dependency
   groupIdcom.company.sql/groupId
   artifactIdDep1/artifactId
   version2.0.0-4/version
   /dependency
   dependency
   groupIdcom.company.stub/groupId
   artifactIdDep2/artifactId
   version2.0.0-2/version
   /dependency
  /dependencies
 /project

 --
 Eyal Edri



Re: reading dependency list from pom into rpm plugin require

2010-03-24 Thread Karl Heinz Marbaise

Hi,


Stephen Connolly-2 wrote:
 
 I think you really want an rpm packaging type then the listed deps which
 are
 typerpm/type would be the ones which are required
 
 not sure if the plugin supports the above
 

Based on the docs etc. 
http://mojo.codehaus.org/rpm-maven-plugin/adv-params.html#Dependency

it does notbut it would very handy to have thatcause i really could
use it as well..

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/reading-dependency-list-from-pom-into-rpm-plugin-require-tp28014957p28015307.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: reading dependency list from pom into rpm plugin require

2010-03-24 Thread eyal edri
you mean that the pom packaging will be set to rpm?

but then, the development env (not deploy) won't work i think..
cause the maven dependencies will look for the jar in the repository.

that way i create a jar which is deployed to the repository (for normal dev
env)  and also an rpm which is used for deployment on production.

i didn't understood your last sentence...

 deps which are typerpm/type would be the ones which are required


 do you mean to say there is a way for the rpm plugin to auto know it's
dependencies, if they are rpm type?

On Wed, Mar 24, 2010 at 3:39 PM, Stephen Connolly 
stephen.alan.conno...@gmail.com wrote:

 I think you really want an rpm packaging type then the listed deps which
 are
 typerpm/type would be the ones which are required

 not sure if the plugin supports the above

 On 24 March 2010 13:20, eyal edri eyal.e...@gmail.com wrote:

  Hi,
 
  i'm looking for the best way to auto fill the require field in the rpm
  plugin.
  since we're using rpm/yum as the deployer of our java apps,
  i don't want to mange a duplicate set of dependencies in the pom file,
  in order to do so,  i want to fill the requires tag auto from the maven
  dependencies list in the pom file.
 
  for example, the following pom will create an rpm with rpm dependencies
  similar to the maven ones.
  (marked in yellow)
 
  a few 'rules' needs to be followed:
  1. each rpm will always have the same name of the artifactId.
  2. each maven dependency will be packed in its own rpm
 
  any ideas? (gmaven maybe..)
 
  *the pom:*
  ?xml version=1.0 encoding=utf-8?
  project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
  http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd
  
   modelVersion4.0.0/modelVersion
   groupIdcom.company.url.miscats/groupId
   artifactIdApplication/artifactId
   packagingjar/packaging
   version2.0.0-3/version
   nameApplication/name
   parent
artifactIdParent/artifactId
groupIdcom.company.maven.pom/groupId
version2.0.0-5/version
   /parent
   descriptionthe app/description
   build
 plugins
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdrpm-maven-plugin/artifactId
 extensionsfalse/extensions
  executions
   execution
 goals
   goalrpm/goal
 /goals
   /execution
  /executions
  configuration
 copyright${project.organization.name}/copyright
 distributionXXX/distribution
 groupSample/Apps/group
 packager${user.name}/packager
  name${project.name}/name
  summary${project.description}/summary
  needarchtrue/needarch
  autoRequirestrue/autoRequires
  dependency/
  requires
  requireDep1/require
  requireDep2/require
  /requires
  mappings
  mapping
artifact/
 
  directory/usr/lib/java/${project.artifactId}/directory
filemode750/filemode
usernameroot/username
groupnameroot/groupname
 /mapping
 mapping
directory/etc/${project.artifactId}/directory
filemode750/filemode
usernameroot/username
groupnameroot/groupname
sources
source
 
  locationsrc/main/resources/App.properties/location
 
  locationsrc/main/resources/log4j.properties/location
/source
/sources
 /mapping
 mapping
directory/etc/cron.d//directory
filemode750/filemode
usernameroot/username
groupnameroot/groupname
sources
source
locationsrc/main/resources/App.cron/location
/source
/sources
 /mapping
 /mappings
 preinstallScriptlet
  scriptecho installing ${artifactId} on arch
  ${os.arch}/script
 /preinstallScriptlet
  /configuration
/plugin
 /plugins
   /build
   dependencies
dependency
groupIdcom.company.sql/groupId
artifactIdDep1/artifactId
version2.0.0-4/version
/dependency
dependency
groupIdcom.company.stub/groupId
artifactIdDep2/artifactId
version2.0.0-2/version
/dependency
   /dependencies
  /project
 
  --
  Eyal Edri
 




-- 
Eyal Edri


Re: reading dependency list from pom into rpm plugin require

2010-03-24 Thread Stephen Connolly
having requires in a rpm on an artifact which is not also an rpm will give
you a requires that can never be satisfied.

therefore you would need to have dependencies with typerpm/type in order
to patch the rpm plugin to scan the dependencies for deps to add as a
requires.

That would not mandate having the packaging set to rpm (but life would be
easier if you did... you'd need two modules for every jar if you insist on
installing each individual jar as an individual rpm)

I am thinking more of the case where an rpm contains many jars that make up
an application... in which case a packagingrpm/packaging makes more
sense

-Stephen

On 24 March 2010 13:51, eyal edri eyal.e...@gmail.com wrote:

 you mean that the pom packaging will be set to rpm?

 but then, the development env (not deploy) won't work i think..
 cause the maven dependencies will look for the jar in the repository.

 that way i create a jar which is deployed to the repository (for normal dev
 env)  and also an rpm which is used for deployment on production.

 i didn't understood your last sentence...

  deps which are typerpm/type would be the ones which are required


  do you mean to say there is a way for the rpm plugin to auto know it's
 dependencies, if they are rpm type?

 On Wed, Mar 24, 2010 at 3:39 PM, Stephen Connolly 
 stephen.alan.conno...@gmail.com wrote:

  I think you really want an rpm packaging type then the listed deps which
  are
  typerpm/type would be the ones which are required
 
  not sure if the plugin supports the above
 
  On 24 March 2010 13:20, eyal edri eyal.e...@gmail.com wrote:
 
   Hi,
  
   i'm looking for the best way to auto fill the require field in the
 rpm
   plugin.
   since we're using rpm/yum as the deployer of our java apps,
   i don't want to mange a duplicate set of dependencies in the pom file,
   in order to do so,  i want to fill the requires tag auto from the
 maven
   dependencies list in the pom file.
  
   for example, the following pom will create an rpm with rpm dependencies
   similar to the maven ones.
   (marked in yellow)
  
   a few 'rules' needs to be followed:
   1. each rpm will always have the same name of the artifactId.
   2. each maven dependency will be packed in its own rpm
  
   any ideas? (gmaven maybe..)
  
   *the pom:*
   ?xml version=1.0 encoding=utf-8?
   project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
   http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
   http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd
   
modelVersion4.0.0/modelVersion
groupIdcom.company.url.miscats/groupId
artifactIdApplication/artifactId
packagingjar/packaging
version2.0.0-3/version
nameApplication/name
parent
 artifactIdParent/artifactId
 groupIdcom.company.maven.pom/groupId
 version2.0.0-5/version
/parent
descriptionthe app/description
build
  plugins
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdrpm-maven-plugin/artifactId
  extensionsfalse/extensions
   executions
execution
  goals
goalrpm/goal
  /goals
/execution
   /executions
   configuration
  copyright${project.organization.name}/copyright
  distributionXXX/distribution
  groupSample/Apps/group
  packager${user.name}/packager
   name${project.name}/name
   summary${project.description}/summary
   needarchtrue/needarch
   autoRequirestrue/autoRequires
   dependency/
   requires
   requireDep1/require
   requireDep2/require
   /requires
   mappings
   mapping
 artifact/
  
   directory/usr/lib/java/${project.artifactId}/directory
 filemode750/filemode
 usernameroot/username
 groupnameroot/groupname
  /mapping
  mapping
 directory/etc/${project.artifactId}/directory
 filemode750/filemode
 usernameroot/username
 groupnameroot/groupname
 sources
 source
  
   locationsrc/main/resources/App.properties/location
  
   locationsrc/main/resources/log4j.properties/location
 /source
 /sources
  /mapping
  mapping
 directory/etc/cron.d//directory
 filemode750/filemode
 usernameroot/username
 groupnameroot/groupname
 sources
 source
 locationsrc/main/resources/App.cron/location
 /source
 /sources