You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "François Régnier (Jira)" <ji...@apache.org> on 2022/04/20 09:00:00 UTC

[jira] [Created] (MDEP-801) includeClassifers not working ?

François Régnier created MDEP-801:
-------------------------------------

             Summary: includeClassifers not working ?
                 Key: MDEP-801
                 URL: https://issues.apache.org/jira/browse/MDEP-801
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: copy-dependencies
    Affects Versions: 3.3.0
            Reporter: François Régnier


Hello,

I want to copy dependencies with several classifiers.

A working solution is:
{code:java}
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>download-escrow-sources</id>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <includeScope>runtime</includeScope>
                                <classifier>sources</classifier>
                            <outputDirectory>${project.build.directory}/escrow-sources</outputDirectory>
                                <includeGroupIds>com.xxx,com.yyy</includeGroupIds>
                                <prependGroupId>true</prependGroupId>
                                <copyPom>true</copyPom>
                            </configuration>
                        </execution>
                        <execution>
                            <id>download-escrow-scripts</id>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <includeScope>runtime</includeScope>
                                <classifier>scripts</classifier>
                                <outputDirectory>${project.build.directory}/escrow-sources</outputDirectory>
                                <includeGroupIds>com.xxx,com.yyy</includeGroupIds>
                                <prependGroupId>true</prependGroupId>
                               <copyPom>true</copyPom>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
 {code}
But rather than duplicate the executions, i think i can use the includeClassifers:
{code:java}
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>download-escrow-sources</id>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <includeScope>runtime</includeScope>
                                <includeClassifiers>scripts,sources</includeClassifiers>
                                <outputDirectory>${project.build.directory}/escrow-sources</outputDirectory>
                                <includeGroupIds>com.xxx,com.yyy</includeGroupIds>
                                <prependGroupId>true</prependGroupId>
                                <copyPom>true</copyPom>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
 {code}
But in this second case only "scripts" classifiers are copied and "sources" are missing.

Is there a bug ? Or do i misunderstood something ?

Thanks,

François

 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)