[
https://issues.apache.org/jira/browse/MECLIPSE-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MECLIPSE-741.
-----------------------------------
Resolution: Won't Fix
Assignee: Robert Scholte
The Apache Maven team has decided to retire the maven-eclipse-plugin, so this
issue won't be fixed.
> JARs put to the root of EAR instead of lib
> ------------------------------------------
>
> Key: MECLIPSE-741
> URL: https://issues.apache.org/jira/browse/MECLIPSE-741
> Project: Maven Eclipse Plugin (RETIRED)
> Issue Type: Bug
> Components: WTP support
> Affects Versions: 2.8, 2.9
> Environment: - Maven 3.0.5.
> - Eclipse "Juno SR 1"
> - Oracle JDK 1.6.0.45 64-bit
> - Windows 7 64-bit
> Reporter: mentallurg .
> Assignee: Robert Scholte
> Priority: Critical
>
> The pom.xml of EAR module defines a "lib" directory for JARs:
> {{ <defaultLibBundleDir>lib</defaultLibBundleDir>}}
> eclipse:eclipse generates org.eclipse.wst.common.component with errors. Each
> JAR is prepended with "../".
> Example:
> {{ <dependent-module archiveName="../log4j-1.2.16.jar" deploy-path="lib" }}
> "../" means that this JAR will be put to "lib/../", i.e. to the root of EAR.
> When application is started, then JARs are not found under "lib" and the
> application fails to start.
> If deployment assembly is created manually in Eclipse, configuration looks as
> follows:
> {{ <dependent-module archiveName="log4j-1.2.16.jar" deploy-path="lib" }}
> Then Eclipse puts JARs to the lib within EAR:
> lib/log4j-1.2.16.jar
> This is correct, applications starts and works correctly.
> The prefix "../" should be removed from the archiveName.
> According to the source code of AbstractWtpResourceWriter.java:
> {quote}
> // This is a very ugly hack around a WTP bug! a delpoydir in the
> configuration file is duplicated.
> // a deploy dir like "lib" will be used as "lib/lib" the only workig
> workaround is to include a ..
> // in the archive name.
> archiveName = "../" + artifactPath.getName();
> {quote}
> There is no info, what bug is meant. May be this?
> https://issues.sonatype.org/browse/MNGECLIPSE-2150. But was fixed in 2010.
> Instead of fixing a bug this peace of code just produces a _new bug_.
> *Solution:* The "../" prefix should not be added to the archiveName.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)