Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 90743 invoked from network); 5 Jun 2009 19:20:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jun 2009 19:20:00 -0000 Received: (qmail 43743 invoked by uid 500); 5 Jun 2009 19:20:11 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 43661 invoked by uid 500); 5 Jun 2009 19:20:11 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 43651 invoked by uid 99); 5 Jun 2009 19:20:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 19:20:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.246.2.115] (HELO codehaus01.managed.contegix.com) (63.246.2.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 19:20:03 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 1A2CC14A81A1 for ; Fri, 5 Jun 2009 14:19:42 -0500 (CDT) Message-ID: <26897556.126171244229582087.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Fri, 5 Jun 2009 14:19:42 -0500 (CDT) From: "john.sullivan (JIRA)" To: issues@maven.apache.org Subject: [jira] Commented: (MASSEMBLY-360) When using mulitple Spring dependencies, the files from META-INF (from the Spring jars) overwrite each other in an executable jar-with-dependencies. In-Reply-To: <2562083.1224156739516.JavaMail.haus-jira@codehaus01.managed.contegix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 4e90ceb663894a42f12c0e28abbab431 X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/MASSEMBLY-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179463#action_179463 ] john.sullivan commented on MASSEMBLY-360: ----------------------------------------- Chris Wilkes thanks for the comment! That fixed it for me! > When using mulitple Spring dependencies, the files from META-INF (from the Spring jars) overwrite each other in an executable jar-with-dependencies. > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: MASSEMBLY-360 > URL: http://jira.codehaus.org/browse/MASSEMBLY-360 > Project: Maven 2.x Assembly Plugin > Issue Type: Bug > Affects Versions: 2.2-beta-2 > Environment: Windows XP, Java 5 > Reporter: Marielle Enderman > > I'm working on a Java 5 project with maven 2 and I need to deliver an executable jar file. In this project I'm using different Spring dependencies: > > org.springframework > spring-beans > 2.5.5 > > > org.springframework > spring-context > 2.5.5 > > For maven packaging I'm using the maven-assembly plugin to create an executable jar with dependencies (using the jar-with-dependencies descriptor). Everything works fine, except that Spring's XSD files can't be found. At least: not all of them. The fact is: Every Spring JAR file contains a META-INF directory with files like spring.handlers and spring.schemas which contain list of locations of respectively namespace handlers and schemas. Unfortunately these files aren't merged during packaging so the META_INF of the executable JAR file only contains the last one added. > This can result in errors like this: > Example 1: The spring-context-2.5.xsd can't be found: > WARN org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context-2.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not . > Example 2: The NamespaceHandler for the spring context namespace can't be located: > Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context] > When I manually merge the files, the executable JAR file works fine. > I hope this problem can be solved. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira