You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2016/02/15 11:46:18 UTC

[jira] [Closed] (MWAR-356) "archiveClasses" and "attachClasses" should archive/attach classes only

     [ https://issues.apache.org/jira/browse/MWAR-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Heinz Marbaise closed MWAR-356.
------------------------------------
       Resolution: Not A Problem
    Fix Version/s:     (was: waiting-for-feedback)

I would suggest to created a separate folder, cause {{src/main/webapp/WEB-INF/classes}} should never exist in src area...cause it could be mistaken etc. with {{/target/WEB-INF/classes}} ...and don't use {{/src/main/webapp/...}} which is part of the default structure...cause you are doing something special...Furthermore your complete setup could be achieved by using a separate maven project which contains the needed classes....if you have only a single module project the suggested one is the solution...So in the end this is not a bug...so i will close this.

> "archiveClasses" and "attachClasses" should archive/attach classes only
> -----------------------------------------------------------------------
>
>                 Key: MWAR-356
>                 URL: https://issues.apache.org/jira/browse/MWAR-356
>             Project: Maven WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.6
>            Reporter: Alberto Mozzone
>         Attachments: mwar-356-test.zip
>
>
> As their name implies, "archiveClasses" and "attachClasses" should avoid to put in the resulting jar the files under "src/main/resources" because:
> # they're not classes
> # they should be left in "WEB-INF/classes"
> # they could be environment dependent: via filtering, the resources in the deployed artifact could contain information which simply do not make sense in the repository (or, worse, could contain sensitive information)
> Of course, to preserve backward compatibility, I just suggest 2 alternatives:
> # a brand new element which joins the behavior of "archiveClasses" and "attachClasses" (e. g. "packageClasses/deployClasses") and a sibling element "packageResources" which puts the resources in a jar file in "WEB-INF/lib", but not in the repo
> # a new option used by the two elements which activates the new behavior.
> I'm assuming that the properties in subject should behave the same to avoid differences in artifact naming or content; see also [MWAR-215|https://issues.apache.org/jira/browse/MWAR-215].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)