Re: Building JBoss EAR archives with SAR included

2007-08-31 Thread Alan D. Salewski
On Thu, Aug 30, 2007 at 04:52:05PM -0500, Wayne Fay spake thus:
 On 8/30/07, Alan D. Salewski [EMAIL PROTECTED] wrote:
 
  Hope that cookbook is helpful to someone,
 
 This is a great contribution. I don't suppose I could get you to post
 it in the Maven User Wiki?
 
 http://docs.codehaus.org/display/MAVENUSER/Home
 
 Wayne

Sure thing:


http://docs.codehaus.org/display/MAVENUSER/Creating+JBoss+SAR+%28Service+ARchive%29+Artifacts

I also created a link to it from the Mini Guides wiki page:

http://docs.codehaus.org/display/MAVENUSER/Mini+Guides

-Al

-- 
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
::
Alan D. Salewski
Software Developer
Health Market Science, Inc.
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
:: 

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



Re: Building JBoss EAR archives with SAR included

2007-08-30 Thread Alan D. Salewski
On Fri, Aug 17, 2007 at 10:35:19AM -0400, Alan D. Salewski spake thus:
 On Fri, Aug 17, 2007 at 09:19:12AM -0500, Wayne Fay spake thus:
  I don't use the SAR plugin but I think I understand the error
  message... It looks like your dependencies define the sar as
  packagingjboss-sar without a classifier... and then your EAR
  configuration says classifierjboss-sar without a packaging.
  
  I'd assume one of those is wrong. My guess would be to change
  classifier to packaging.
  
  Wayne
 [...]
 
 My recent experience with the jboss-packaging-maven-plugin confirms
 Wayne's suspicion. In my particular case, simply omitting the
 'classfier' element from the EJB SarModule solved the problem.
 
  
  On 8/16/07, Steve Dobson [EMAIL PROTECTED] wrote:
 [...]
   However it builds just fine if I remove the SAR information.  What am I
   doing wrong?
 [...]
   dependency
  groupIduk.org.syscall.pugwash/groupId
  artifactIdpugwash-sar/artifactId
  version2.0/version
  typejboss-sar/type
   /dependency
 [...]
 
 That's fine as is.
 
 sarModule
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-sar/artifactId
   classifierjboss-sar/classifier
 /sarModule
 
 Try this, instead:
 
 sarModule
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-sar/artifactId
 /sarModule
 
 HTH,
 -Al

[ Since I found myself again working with SAR files, and my earlier post
  turned out to be antihelp to myself (and I hope not too many others), I
  think it's only appropriate that I reply to my own busted post to set
  the record straight... ]

First, for the untainted, there are currently several different
maven-2.x plugins that purport to produce SAR files (JBoss-specific
Service ARchives). My comments below below pertain only to use of the
'jboss-packaging-maven-plugin' plugin, currently available in the
codehaus.org snapshots repository:


http://snapshots.repository.codehaus.org/org/codehaus/mojo/jboss-packaging-maven-plugin/

To configure use of the plugin, I added the following snippets to my
top-level pom.xml file:

  project
modules
  modulemyproj-sar/module
  modulemyproj-ear/module
  ...
/modules
...
dependencyManagement
  ...
   dependency
groupId${project.groupId}/groupId
artifactIdmyproj-sar/artifactId
version${project.version}/version
typesar/type
  /dependency
  ...
/dependencyManagement
...
build
  ...
  pluginManagement
plugins
  ...
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-ear-plugin/artifactId
version2.3.1/version
  /plugin
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjboss-packaging-maven-plugin/artifactId
version2.0-SNAPSHOT/version
  /plugin
  ...
/plugins
  /pluginManagement

  plugins
...
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdjboss-packaging-maven-plugin/artifactId
  !-- Enable 'jboss-sar', etc., as a recoginized maven packaging type 
--
  extensionstrue/extensions
/plugin
...
  /plugins
  ...
/build
...
  /project

In the pom.xml of the subproject that produces the SAR file, I declared
the packaging type as 'jboss-sar':

  project
...
artifactIdmyproj-sar/artifactId
packagingjboss-sar/packaging
...
  /project

Note that the dependencyManagement entry for the SAR subproject in the
top-level pom.xml indicates type 'sar', but the packaging type declared
by the SAR subproject itself is 'jboss-sar'. During the 'install' build
phase, the SAR subproject will install the artifact with a '.sar'
extension in the local maven repository.

In the pom.xml of the subproject that produces the EAR file, I have the
following relevant snippets:

  project
...
dependencies
  ...
  dependency
groupId${project.groupId}/groupId
artifactIdmyproj-sar/artifactId
typesar/type
  /dependency
  ...
/dependencies
build
  plugins
...
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-ear-plugin/artifactId
  configuration
!-- The version of the application.xml file to generate. Valid --
!-- values include '1.3', '1.4', and '5'. --
version5/version
...
modules
  !-- JBoss specific stuff --
  SarModule
groupId${project.groupId}/groupId
artifactIdmyproj-sar/artifactId
  /SarModule
  ...
/modules  
...
  /configuration
  executions
execution
  

Re: Building JBoss EAR archives with SAR included

2007-08-30 Thread Wayne Fay
On 8/30/07, Alan D. Salewski [EMAIL PROTECTED] wrote:

 Hope that cookbook is helpful to someone,

This is a great contribution. I don't suppose I could get you to post
it in the Maven User Wiki?

http://docs.codehaus.org/display/MAVENUSER/Home

Wayne

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



Building JBoss EAR archives with SAR included

2007-08-17 Thread Steve Dobson
Hi

I have a multi-part project for building a JBoss J2EE system and the
client.  The common, EJB, Web and SAR sub-projects all build nicely.
However the EAR does not build.  I get the following:

  $ mvn install
  [INFO] Scanning for projects...
  [INFO] snapshot org.codehaus.mojo:jboss-packaging-maven-plugin:2.0-SNAPSHOT: 
checking for updates from codehaus-snapshot
  [INFO] 

  [INFO] Building jPugwash: EAR
  [INFO]task-segment: [install]
  [INFO] 

  [INFO] artifact org.apache.maven.plugins:maven-ear-plugin: checking for 
updates from codehaus-snapshot
  [INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking for 
updates from codehaus-snapshot
  [INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking for 
updates from codehaus-snapshot
  [INFO] artifact org.apache.maven.plugins:maven-jar-plugin: checking for 
updates from codehaus-snapshot
  Downloading: 
http://repo1.maven.org/maven2/jboss/jboss-common/4.0.5/jboss-common-4.0.5.pom
  [INFO] [ear:generate-application-xml]
  [INFO] 

  [ERROR] BUILD FAILURE
  [INFO] 

  [INFO] Artifact[sar:uk.org.syscall.pugwash:pugwash-sar:jboss-sar] is not a 
dependency of the project.
  [INFO] 

  [INFO] For more information, run Maven with the -e switch
  [INFO] 

  [INFO] Total time: 7 seconds
  [INFO] Finished at: Tue Aug 14 13:34:40 BST 2007
  [INFO] Final Memory: 4M/8M
  [INFO] 


However it builds just fine if I remove the SAR information.  What am I doing 
wrong?
The pom.xml is as follows:

  project
 modelVersion4.0.0/modelVersion
 groupIduk.org.syscall.pugwash/groupId
 artifactIdpugwash-j2ee/artifactId
 packagingear/packaging
   namejPugwash: EAR/name
 parent
groupIduk.org.syscall.pugwash/groupId
artifactIdmain/artifactId
version2.0/version
 /parent
 pluginRepositories
pluginRepository
   idcodehaus-snapshot/id
   nameCodehaus SNAPSHOTs/name
   urlhttp://snapshots.repository.codehaus.org//url
   snapshotsenabledtrue/enabled/snapshots
/pluginRepository 
 /pluginRepositories
 dependencies
dependency
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-common/artifactId
   version2.0/version
   typejar/type
/dependency
dependency
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-ejbs/artifactId
   version2.0/version
   typeejb/type
/dependency
dependency
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-sar/artifactId
   version2.0/version
   typejboss-sar/type
/dependency
dependency
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-web/artifactId
   version2.0/version
   typewar/type
/dependency
dependency
   groupIduk.org.syscall.pugwash/groupId
   artifactIdpugwash-client/artifactId
   version2.0/version
   typejar/type
/dependency
 /dependencies
 build
plugins
   plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdjboss-packaging-maven-plugin/artifactId
  version2.0-SNAPSHOT/version
  extensionstrue/extensions
   /plugin
   plugin
groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-ear-plugin/artifactId
  configuration
  displayNamejPugwash/displayName
modules
jarModule
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-common/artifactId
  includeInApplicationXmltrue/includeInApplicationXml
/jarModule
webModule
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-web/artifactId
  contextRootmanual/contextRoot
  /webModule
sarModule
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-sar/artifactId
  classifierjboss-sar/classifier
  /sarModule
/modules
  /configuration
   /plugin
  plugin
artifactIdmaven-jar-plugin/artifactId
executions
   execution
  goals
 goalsign/goal

Re: Building JBoss EAR archives with SAR included

2007-08-17 Thread Wayne Fay
I don't use the SAR plugin but I think I understand the error
message... It looks like your dependencies define the sar as
packagingjboss-sar without a classifier... and then your EAR
configuration says classifierjboss-sar without a packaging.

I'd assume one of those is wrong. My guess would be to change
classifier to packaging.

Wayne

On 8/16/07, Steve Dobson [EMAIL PROTECTED] wrote:
 Hi

 I have a multi-part project for building a JBoss J2EE system and the
 client.  The common, EJB, Web and SAR sub-projects all build nicely.
 However the EAR does not build.  I get the following:

   $ mvn install
   [INFO] Scanning for projects...
   [INFO] snapshot
 org.codehaus.mojo:jboss-packaging-maven-plugin:2.0-SNAPSHOT: checking for
 updates from codehaus-snapshot
   [INFO]
 
   [INFO] Building jPugwash: EAR
   [INFO]task-segment: [install]
   [INFO]
 
   [INFO] artifact org.apache.maven.plugins:maven-ear-plugin: checking for
 updates from codehaus-snapshot
   [INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking
 for updates from codehaus-snapshot
   [INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking
 for updates from codehaus-snapshot
   [INFO] artifact org.apache.maven.plugins:maven-jar-plugin: checking for
 updates from codehaus-snapshot
   Downloading:
 http://repo1.maven.org/maven2/jboss/jboss-common/4.0.5/jboss-common-4.0.5.pom
   [INFO] [ear:generate-application-xml]
   [INFO]
 
   [ERROR] BUILD FAILURE
   [INFO]
 
   [INFO] Artifact[sar:uk.org.syscall.pugwash:pugwash-sar:jboss-sar] is not a
 dependency of the project.
   [INFO]
 
   [INFO] For more information, run Maven with the -e switch
   [INFO]
 
   [INFO] Total time: 7 seconds
   [INFO] Finished at: Tue Aug 14 13:34:40 BST 2007
   [INFO] Final Memory: 4M/8M
   [INFO]
 

 However it builds just fine if I remove the SAR information.  What am I
 doing wrong?
 The pom.xml is as follows:

   project
  modelVersion4.0.0/modelVersion
  groupIduk.org.syscall.pugwash/groupId
  artifactIdpugwash-j2ee/artifactId
  packagingear/packaging
namejPugwash: EAR/name
  parent
 groupIduk.org.syscall.pugwash/groupId
 artifactIdmain/artifactId
 version2.0/version
  /parent
  pluginRepositories
 pluginRepository
idcodehaus-snapshot/id
nameCodehaus SNAPSHOTs/name
urlhttp://snapshots.repository.codehaus.org//url
snapshotsenabledtrue/enabled/snapshots
 /pluginRepository
  /pluginRepositories
  dependencies
 dependency
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-common/artifactId
version2.0/version
typejar/type
 /dependency
 dependency
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-ejbs/artifactId
version2.0/version
typeejb/type
 /dependency
 dependency
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-sar/artifactId
version2.0/version
typejboss-sar/type
 /dependency
 dependency
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-web/artifactId
version2.0/version
typewar/type
 /dependency
 dependency
groupIduk.org.syscall.pugwash/groupId
artifactIdpugwash-client/artifactId
version2.0/version
typejar/type
 /dependency
  /dependencies
  build
 plugins
plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdjboss-packaging-maven-plugin/artifactId
   version2.0-SNAPSHOT/version
   extensionstrue/extensions
/plugin
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-ear-plugin/artifactId
   configuration
 displayNamejPugwash/displayName
 modules
   jarModule
 groupIduk.org.syscall.pugwash/groupId
 artifactIdpugwash-common/artifactId
 includeInApplicationXmltrue/includeInApplicationXml
   /jarModule
   webModule
 groupIduk.org.syscall.pugwash/groupId
 artifactIdpugwash-web/artifactId
 contextRootmanual/contextRoot
   

Re: Building JBoss EAR archives with SAR included

2007-08-17 Thread Alan D. Salewski
On Fri, Aug 17, 2007 at 09:19:12AM -0500, Wayne Fay spake thus:
 I don't use the SAR plugin but I think I understand the error
 message... It looks like your dependencies define the sar as
 packagingjboss-sar without a classifier... and then your EAR
 configuration says classifierjboss-sar without a packaging.
 
 I'd assume one of those is wrong. My guess would be to change
 classifier to packaging.
 
 Wayne
[...]

My recent experience with the jboss-packaging-maven-plugin confirms
Wayne's suspicion. In my particular case, simply omitting the
'classfier' element from the EJB SarModule solved the problem.

 
 On 8/16/07, Steve Dobson [EMAIL PROTECTED] wrote:
[...]
  However it builds just fine if I remove the SAR information.  What am I
  doing wrong?
[...]
  dependency
 groupIduk.org.syscall.pugwash/groupId
 artifactIdpugwash-sar/artifactId
 version2.0/version
 typejboss-sar/type
  /dependency
[...]

That's fine as is.

  sarModule
  groupIduk.org.syscall.pugwash/groupId
  artifactIdpugwash-sar/artifactId
classifierjboss-sar/classifier
/sarModule

Try this, instead:

sarModule
  groupIduk.org.syscall.pugwash/groupId
  artifactIdpugwash-sar/artifactId
/sarModule

HTH,
-Al

-- 
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
::
Alan D. Salewski
Software Developer
Health Market Science, Inc.
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
:: 

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