Running `mvn help:active-profiles` does it list your
build-dist-archives profile in the output?
Also `mvn help:all-profiles' is it listed their and does it show the
correct source? so pom or settings

If you add duplicate the executions section into your plugin defined
in the profiles, do you see the plugin executed twice?

Also what version of maven are you using? 3.6.3? or something older?

Sorry not an answer, just things i would do to try and work out if the
config is being seen, seen but ignored, or ignored.

On Wed, 13 May 2020 at 10:37, Adam Retter
<adam.ret...@googlemail.com.invalid> wrote:
>
> I have a build plugin configured like so:
>
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-assembly-plugin</artifactId>
>     <executions>
>         <execution>
>             <id>assemble-archives</id>
>             <phase>package</phase>
>             <goals>
>                 <goal>single</goal>
>             </goals>
>         </execution>
>     </executions>
>     <configuration>
>         <skipAssembly>true</skipAssembly>  <!-- Overridden by profile
> build-dist-archives -->
>     </configuration>
> </plugin>
>
>
> I am trying to override its configuration in a profile that I would
> like enabled by default:
>
> <profiles>
>     <profile>
>         <id>build-dist-archives</id>
>         <activation>
>             <activeByDefault>true</activeByDefault>
>         </activation>
>         <build>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-assembly-plugin</artifactId>
>                     <configuration>
>                         <skipAssembly>false</skipAssembly>  <!--
> Override setting in default profile build/plugins for this module -->
>                         <attach>false</attach>
>                         <tarLongFileMode>gnu</tarLongFileMode>
>                         <descriptors>
>
> <descriptor>src/assembly/dist-assembly-unix.xml</descriptor>
>
> <descriptor>src/assembly/dist-assembly-win.xml</descriptor>
>                         </descriptors>
>                     </configuration>
>                 </plugin>
>             </plugins>
>         </build>
>     </profile>
>
>
> I would expect that when I run `mvn package`, the
> `build-dist-archives` profile is active and therefore the
> maven-assembly-plugin SHOULD have skipAssembly=false. In the output
> from Maven I see:
>
> [INFO] --- maven-assembly-plugin:3.3.0:single (assemble-archives) @
> exist-distribution ---
> [INFO] Assemblies have been skipped per configuration of the
> skipAssembly parameter.
>
> This implies that skipAssembly was true.
>
>
> However... if I manually enable the profile by running `mvn package -P
> build-dist-archives`, then the maven-assembly-plugin does indeed have
> skipAssembly=false, and the assembly is correctly built.
>
> Can anyone tell me why the ` <activeByDefault>true</activeByDefault>`
> on the profile is being ignored?
>
>
> --
> Adam Retter
>
> skype: adam.retter
> tweet: adamretter
> http://www.adamretter.org.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to