[ 
https://issues.apache.org/jira/browse/AXIS2-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417002#comment-13417002
 ] 

Auke Schrijnen commented on AXIS2-5350:
---------------------------------------

Are you sure the commons-lang-2.6.jar file is included in the lib directory of 
the .aar archive when you mark the commons-lang dependency as optional? I'm 
sure it isn't when i try it...

Without optional parameter:
$ rm -r ~/.m2/repository/org/apache/axis2/axis2-aar-maven-plugin
$ mvn clean package
$ unzip -l service/target/my-service-1.0.0-SNAPSHOT.aar
Archive:  service/target/my-service-1.0.0-SNAPSHOT.aar
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  07-18-12 13:23   META-INF/
      129  07-18-12 13:23   META-INF/MANIFEST.MF
        0  07-18-12 13:23   lib/
   284220  07-17-12 15:30   lib/commons-lang-2.6.jar
        0  07-18-12 13:23   META-INF/maven/
        0  07-18-12 13:23   META-INF/maven/my.services/
        0  07-18-12 13:23   META-INF/maven/my.services/my-service/
     1033  07-18-12 13:21   META-INF/maven/my.services/my-service/pom.xml
      116  07-18-12 13:23   META-INF/maven/my.services/my-service/pom.properties
 --------                   -------
   285498                   9 files


With optional parameter set to true:
$ mvn clean package
$ unzip -l service/target/my-service-1.0.0-SNAPSHOT.aar
Archive:  service/target/my-service-1.0.0-SNAPSHOT.aar
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  07-18-12 13:25   META-INF/
      129  07-18-12 13:25   META-INF/MANIFEST.MF
        0  07-18-12 13:25   META-INF/maven/
        0  07-18-12 13:25   META-INF/maven/my.services/
        0  07-18-12 13:25   META-INF/maven/my.services/my-service/
     1033  07-18-12 13:25   META-INF/maven/my.services/my-service/pom.xml
      116  07-18-12 13:25   META-INF/maven/my.services/my-service/pom.properties
 --------                   -------
     1278                   7 files

I tried both 1.7.0-SNAPSHOT and 1.6.2 versions of the aar maven plugin. I also 
tried it on a completely clean machine with an empty local maven repository, 
all without the patch.
                
> Service dependencies are included in webapp
> -------------------------------------------
>
>                 Key: AXIS2-5350
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5350
>             Project: Axis2
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.7.0
>            Reporter: Auke Schrijnen
>            Priority: Minor
>         Attachments: 
> 0001-Include-optional-dependencies-in-aar-and-mar-plugin.patch, 
> aar-dependency-bug-v2.zip, aar-dependency-bug.zip
>
>
> When a axis2 service defined as an aar package in maven is used as dependency 
> in a war webapp project all dependencies of the service are included in the 
> webapp. There is no way to include the dependencies only in the service 
> (.aar).
> To achieve this, the axis2 aar maven plugin could add optional dependencies, 
> which are currently ignored (AbstractAarMojo.java @ 180).
> This is also the case for the axis2 mar maven plugin.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to