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

Axel Fontaine commented on MASSEMBLY-864:
-----------------------------------------

Sorry about the delay and thanks for your patience. I've finally come around to 
creating a small project to reproduce this: 
https://github.com/axelfontaine/massembly-864

While it doesn't fully reproduce this issue, it certainly exhibits other 
problematic behavior in the Maven Assembly plugin which is biting us with the 
Flyway build and may help us uncover the root cause for the behavior I 
originally reported here.

The issue uncovered by the repro repo is that the assembly plugin attempts to 
download dependencies from only defined in disabled Maven profiles. If you 
clone that repo and run "./mvnw install -P-fat" it should succeed, yet fails.

I hope this helps in tracking this down.

P.S.: Yes I know the S3 wagon probably should warn instead of fail, but my 
point still stands: the assembly plugin should not attempt to download 
dependencies only defined in disabled Maven profiles.

> Dependencies specified in activeByDefault profile not picked up.
> ----------------------------------------------------------------
>
>                 Key: MASSEMBLY-864
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-864
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Axel Fontaine
>
> I have the following dependencySet in my assembly XML:
> <dependencySet>
>     <outputDirectory>jre</outputDirectory>
>     <includes>
>         <include>com.oracle:server-jre</include>
>     </includes>
>     <unpack>true</unpack>
>     <unpackOptions>
>         <includes>
>             <include>jdk8.74/jre/**/*</include>
>         </includes>
>     </unpackOptions>
> </dependencySet>
> And the following dependency in my pom.xml:
> <dependency>
>     <groupId>com.oracle</groupId>
>     <artifactId>server-jre</artifactId>
>     <classifier>linux-x64</classifier>
>     <version>8.74</version>
>     <type>tar.gz</type>
>     <scope>provided</scope>
> </dependency>
> The dependency gets correctly picked up when it is declared within the main 
> dependencies section of the POM. However when it is only present within a 
> profile:
>     <profiles>
>         <profile>
>             <id>CommercialDBTest</id>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>             </activation>
>             <dependencies>
>                 <dependency>
>                     <groupId>com.oracle</groupId>
>                     <artifactId>server-jre</artifactId>
>                     <classifier>linux-x64</classifier>
>                     <type>tar.gz</type>
>                     <scope>provided</scope>
>                 </dependency>
> I then get
> [WARNING] The following patterns were never triggered in this artifact 
> exclusion filter:
> o  'com.oracle:server-jre'



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to