help: can't exclude files from EAR file

2007-10-12 Thread Victor Okunev
Folks,

I need to build an EAR file composed of just one WAR file using
Maven2. However, in addition to the WAR file, the resulting EAR file
contains all the JARs that the web module has dependencies on, as well
as the pom.xml. How do I exclude everything but WAR file and
application.xml from the EAR file?

I tried   earSourceExcludes**/*.jar,pom.xml/earSourceExcludes, but
it seems Maven just ignores it.

Here is my pom file:

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
  parent
  groupIdmygroupid/groupId
  artifactIdabc/artifactId
  version1.0-SNAPSHOT/version
  /parent
  artifactIdxyz/artifactId
  packagingear/packaging
  nameear_assembly/name

  dependencies
dependency
  groupIdmygroupid/groupId
  artifactIdweb/artifactId
  version${project.version}/version
  typewar/type
/dependency
  /dependencies
   build
  plugins
 plugin
artifactIdmaven-ear-plugin/artifactId
configuration
earSourceExcludes**/*.jar,pom.xml/earSourceExcludes
fileNameMapping/
   archive
  manifest
 addClasspathtrue/addClasspath
  /manifest
   /archive
/configuration
 /plugin
  /plugins
   /build

/project

Thanks,

Victor

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



Re: help: can't exclude files from EAR file

2007-10-12 Thread Victor Okunev
I need to bundle the libs in the WAR only. There is just one web
module in my app.

Victor

On 10/12/07, Wayne Fay [EMAIL PROTECTED] wrote:
 Are your libs being bundled in the WAR, as well as the EAR? Or are you
 making the libs available in your j2ee container's lib directory such
 that they are shared among several apps?

 If you don't want the libs bundled in your WAR nor EAR, you should
 just change the scope to provided.

 Wayne

 On 10/12/07, Victor Okunev [EMAIL PROTECTED] wrote:
  Folks,
 
  I need to build an EAR file composed of just one WAR file using
  Maven2. However, in addition to the WAR file, the resulting EAR file
  contains all the JARs that the web module has dependencies on, as well
  as the pom.xml. How do I exclude everything but WAR file and
  application.xml from the EAR file?
 
  I tried   earSourceExcludes**/*.jar,pom.xml/earSourceExcludes, but
  it seems Maven just ignores it.
 
  Here is my pom file:
 
  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
   parent
   groupIdmygroupid/groupId
   artifactIdabc/artifactId
   version1.0-SNAPSHOT/version
   /parent
   artifactIdxyz/artifactId
   packagingear/packaging
   nameear_assembly/name
 
   dependencies
 dependency
   groupIdmygroupid/groupId
   artifactIdweb/artifactId
   version${project.version}/version
   typewar/type
 /dependency
   /dependencies
build
   plugins
  plugin
 artifactIdmaven-ear-plugin/artifactId
 configuration
 earSourceExcludes**/*.jar,pom.xml/earSourceExcludes
 fileNameMapping/
archive
   manifest
  addClasspathtrue/addClasspath
   /manifest
/archive
 /configuration
  /plugin
   /plugins
/build
 
  /project
 
  Thanks,
 
  Victor
 
  -
  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]



setting dependency to a project with pom packaging?

2006-12-04 Thread Victor Okunev

Can I create a dependency to a project with pom packaging? This would
be convenient rather than creating separate dependencies on each
module it contains. I tried but unsuccessfully, it seems that Maven is
looking for a jar.  Perhaps I am missing something?

Victor

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



Re: setting dependency to a project with pom packaging?

2006-12-04 Thread Victor Okunev

What are you trying to do?  It sounds like you have a pom with
modules and you expect that declaring a dependency on that pom will
add those modules as dependencies.


Yes, that's the idea. Is it possible or I misunderstand the purpose of
projects with pom packaging?

--Vic


On 12/4/06, Wendy Smoak [EMAIL PROTECTED] wrote:

On 12/4/06, Victor Okunev [EMAIL PROTECTED] wrote:

 Can I create a dependency to a project with pom packaging? This would
 be convenient rather than creating separate dependencies on each
 module it contains. I tried but unsuccessfully, it seems that Maven is
 looking for a jar.  Perhaps I am missing something?

The default type is jar.  You could try typepom/type but I don't
think it's going to do what you want.

What are you trying to do?  It sounds like you have a pom with
modules and you expect that declaring a dependency on that pom will
add those modules as dependencies.

--
Wendy

-
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]



Maven repositories: metadata vs pom files?

2006-11-21 Thread Victor Okunev

Hello,

Does Maven2 need a pom file in repository to download a jar from
there? After examining the repositories' contents it seems that some
jars are provided with both pom and metadata files while others only
contain metadata files. Specifically, if I have this dependency in my
project:

dependency
 groupIdcom.sun.xml.bind/groupId
 artifactIdjaxb-libs/artifactId
 version1.0.6/version
/dependency

mvn compile generates the following message:

Downloading: 
http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-libs/1.0.6/jaxb-libs-1.0.6.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)

When I visit the url I can see the jar and metadata files but no pom.
Why is that? Do I need to manually install such a jar in my local
repository in order to use it?

Thanks,

Victor

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