maven-war-plugin problem - jar file unexpectedly trimmed (truncated)

2011-06-28 Thread Stéphan BEUZE

Hi all,

 Sorry for annonying you, but i have searched my problem in the wiki, in 
the documentation,
on the web, post it in various forums, in user-list  and no one seems to be 
able to answer me.


Here it is :

 I have a web-app configured with a pom.xml.
 This web-app relies on another maven module that produce a jar file. When 
i check the produced jar file size it is 8Ko

in my local repo.

 When i check this same jar file in my /lib web application, it is 5Ko.

 A bunch of classes are simply ignored when the jar file reaches my /lib 
directory,

causing ClassNotFoundException when running the web application.

Why is my jar trimmed ?

Stephan
**
Maven 2.2.1
maven-war-plugin: 2.1.1

**  Web-app pom.xml  **
   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
 artifactIdrecord/artifactId
 groupIdcom.company.record/groupId
 version1.0.0/version
/parent
groupIdcom.company.record/groupId
artifactIdrecord-webapp/artifactId
packagingwar/packaging
namerecord-webapp/name
version1.0.0/version

dependencies
 !-- JSF 2.0 --
 dependency
  groupIdcom.sun.faces/groupId
  artifactIdjsf-api/artifactId
  version2.0.3-b02/version
  typejar/type
  scopecompile/scope
 /dependency
 dependency
  groupIdcom.sun.faces/groupId
  artifactIdjsf-impl/artifactId
  version2.0.3-b02/version
  typejar/type
  scopecompile/scope
 /dependency

 !-- Primefaces --
 dependency
  groupIdorg.primefaces/groupId
  artifactIdprimefaces/artifactId
  version2.2/version
  typejar/type
  scopecompile/scope
 /dependency
 dependency
  groupIdorg.primefaces.themes/groupId
  artifactIdredmond/artifactId
  version1.0.0/version
 /dependency

 !-- Internal dependencies --
 dependency
  groupIdcom.company.record/groupId
  artifactIdrecord-dao/artifactId
  version1.0.0/version
  typejar/type
  scopecompile/scope
 /dependency
/dependencies

build
 finalNamerecord/finalName
 plugins
  plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdjboss-maven-plugin/artifactId
   version1.5.0/version
   configuration
serverNameweb/serverName
   /configuration
  /plugin
  plugin
   artifactIdmaven-war-plugin/artifactId
   version2.1.1/version
   executions
execution
 iddefault-war/id
 phasepackage/phase
 goals
  goalwar/goal
 /goals
/execution
   /executions
   configuration
useCachefalse/useCache
   /configuration
  /plugin
 /plugins
/build

repositories
 repository
  idprime-repo/id
  namePrime Technology Maven Repository/name
  urlhttp://repository.prime.com.tr/url
  layoutdefault/layout
 /repository
/repositories
/project

**  record-dao pom.xml  **
   project
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

modelVersion4.0.0/modelVersion
parent
 artifactIdrecord/artifactId
 groupIdcom.company.record/groupId
 version1.0.0/version
/parent

groupIdcom.company.record/groupId
artifactIdrecord-dao/artifactId
version1.0.0/version
packagingjar/packaging
namerecord-dao/name

dependencies
 !-- Hibernate --
 dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-entitymanager/artifactId
  version3.6.4.Final/version
  exclusions
   exclusion
artifactIdcglib/artifactId
groupIdcglib/groupId
   /exclusion
   exclusion
artifactIdantlr/artifactId
groupIdantlr/groupId
   /exclusion
   exclusion
artifactIdjta/artifactId
groupIdjavax.transaction/groupId
   /exclusion
   exclusion
artifactIdcommons-collections/artifactId
groupIdcommons-collections/groupId
   /exclusion
   exclusion
artifactIdhibernate-commons-annotations/artifactId
groupIdorg.hibernate/groupId
   /exclusion
  /exclusions
 /dependency

 !-- Postgresql --
 dependency
  groupIdpostgresql/groupId
  artifactIdpostgresql/artifactId
  version8.3-606.jdbc4/version
  typejar/type
  scopecompile/scope
 /dependency

 !-- Internal dependencies --
 dependency
  groupIdcom.company.record/groupId
  artifactIdrecord-commun/artifactId
  version1.0.0/version
  typejar/type
  scopecompile/scope
 /dependency
/dependencies
/project 



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



Re: maven-war-plugin problem - jar file unexpectedly trimmed (truncated)

2011-06-28 Thread Stéphan BEUZE
I finally find a solution. In the web-app/web-inf/lib directory, there was a 
jar file who was sharing the same name with the dependent jar file.


For a reason i don't understand, maven-war-plugin used to take this old jar 
file rather than the freshly one i installed in my local repository.


- Original Message - 
From: Stéphan BEUZE stephan.be...@douane.finances.gouv.fr

To: dev@maven.apache.org
Sent: Tuesday, June 28, 2011 2:05 PM
Subject: maven-war-plugin problem - jar file unexpectedly trimmed 
(truncated)




Hi all,

 Sorry for annonying you, but i have searched my problem in the wiki, in 
the documentation,
on the web, post it in various forums, in user-list  and no one seems to 
be able to answer me.


Here it is :

 I have a web-app configured with a pom.xml.
 This web-app relies on another maven module that produce a jar file. When 
i check the produced jar file size it is 8Ko

in my local repo.

 When i check this same jar file in my /lib web application, it is 5Ko.

 A bunch of classes are simply ignored when the jar file reaches my /lib 
directory,

causing ClassNotFoundException when running the web application.

Why is my jar trimmed ?

Stephan
**
Maven 2.2.1
maven-war-plugin: 2.1.1

**  Web-app pom.xml  **
   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
 artifactIdrecord/artifactId
 groupIdcom.company.record/groupId
 version1.0.0/version
/parent
groupIdcom.company.record/groupId
artifactIdrecord-webapp/artifactId
packagingwar/packaging
namerecord-webapp/name
version1.0.0/version

dependencies
 !-- JSF 2.0 --
 dependency
  groupIdcom.sun.faces/groupId
  artifactIdjsf-api/artifactId
  version2.0.3-b02/version
  typejar/type
  scopecompile/scope
 /dependency
 dependency
  groupIdcom.sun.faces/groupId
  artifactIdjsf-impl/artifactId
  version2.0.3-b02/version
  typejar/type
  scopecompile/scope
 /dependency

 !-- Primefaces --
 dependency
  groupIdorg.primefaces/groupId
  artifactIdprimefaces/artifactId
  version2.2/version
  typejar/type
  scopecompile/scope
 /dependency
 dependency
  groupIdorg.primefaces.themes/groupId
  artifactIdredmond/artifactId
  version1.0.0/version
 /dependency

 !-- Internal dependencies --
 dependency
  groupIdcom.company.record/groupId
  artifactIdrecord-dao/artifactId
  version1.0.0/version
  typejar/type
  scopecompile/scope
 /dependency
/dependencies

build
 finalNamerecord/finalName
 plugins
  plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdjboss-maven-plugin/artifactId
   version1.5.0/version
   configuration
serverNameweb/serverName
   /configuration
  /plugin
  plugin
   artifactIdmaven-war-plugin/artifactId
   version2.1.1/version
   executions
execution
 iddefault-war/id
 phasepackage/phase
 goals
  goalwar/goal
 /goals
/execution
   /executions
   configuration
useCachefalse/useCache
   /configuration
  /plugin
 /plugins
/build

repositories
 repository
  idprime-repo/id
  namePrime Technology Maven Repository/name
  urlhttp://repository.prime.com.tr/url
  layoutdefault/layout
 /repository
/repositories
/project

**  record-dao pom.xml  **
   project
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

modelVersion4.0.0/modelVersion
parent
 artifactIdrecord/artifactId
 groupIdcom.company.record/groupId
 version1.0.0/version
/parent

groupIdcom.company.record/groupId
artifactIdrecord-dao/artifactId
version1.0.0/version
packagingjar/packaging
namerecord-dao/name

dependencies
 !-- Hibernate --
 dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-entitymanager/artifactId
  version3.6.4.Final/version
  exclusions
   exclusion
artifactIdcglib/artifactId
groupIdcglib/groupId
   /exclusion
   exclusion
artifactIdantlr/artifactId
groupIdantlr/groupId
   /exclusion
   exclusion
artifactIdjta/artifactId
groupIdjavax.transaction/groupId
   /exclusion
   exclusion
artifactIdcommons-collections/artifactId
groupIdcommons-collections/groupId
   /exclusion
   exclusion
artifactIdhibernate-commons-annotations/artifactId
groupIdorg.hibernate/groupId
   /exclusion
  /exclusions
 /dependency

 !-- Postgresql --
 dependency
  groupIdpostgresql/groupId
  artifactIdpostgresql/artifactId
  version8.3-606.jdbc4/version
  typejar/type
  scopecompile/scope
 /dependency

 !-- Internal dependencies --
 dependency
  groupIdcom.company.record/groupId
  artifactIdrecord-commun/artifactId
  version1.0.0/version
  typejar/type
  scopecompile/scope
 /dependency
/dependencies
/project

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