dion gillard wrote:
Michal Maczka wrote:

This feature probably is not used so often but surly plugins like
war, ear, eclipse are not aware of the fact that artifact can be overriden!


and what they do is something like:


<j:if test="${dep.getProperty('war.bundle')=='true' and dep.type
=='jar' }">
<ant:lib dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<ant:include name="${dep.artifact}"/>
</ant:lib>
</j:if>


So basiclly they require that artifact must be in local repository.
Moreover there is no easy way of determining if artifact was overriden or
not (it is in maven-new, but that's different story)

Those plugins are unnecessarily wrong though. The offending code in the war plugin:
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('war.bundle.jar')=='true'}">
<lib dir="${maven.repo.local}/${dep.artifactDirectory}/jars/">
<include name="${dep.artifact}"/>
</lib>
</j:if>
</j:forEach>


Should read:
      <j:forEach var="lib" items="${pom.artifacts}">
          <j:set var="dep" value="${lib.dependency}"/>
          <j:if test="${dep.getProperty('war.bundle.jar')=='true'}">
            <lib dir="${maven.repo.local}">
              <include name="${lib.path}"/>
            </lib>
          </j:if>
      </j:forEach>

(or something like that) - jelly should always use artifacts, not dependencies, to construct paths. It doesnt stop you naming jars whatever you like, if they are in the local repo. I had a look over the broken plugins a while back and I think there was only one case where it wasnt clear that the use of dependency was a bug.

-Baz




Privacy and Confidentiality Notice


------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege. If you have received it in error, please destroy it and notify us on the telephone number printed above. If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


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



Reply via email to