Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The following patterns were never triggered in this artifact inclusion filter: o 'com.alibaba:dubbo

Following are the contents for the assembly.xml

<assembly>
<id>jar-with-dependencies</id>
<formats>
    <format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
    <dependencySet>
        <unpack>true</unpack>
  <unpackOptions>
    <excludes>
        <exclude>META-INF/**</exclude>
        <exclude>META-INF/**</exclude>
    </excludes>
  </unpackOptions>
        <includes>
            <include>com.alibaba:dubbo</include>
            <include>commons-codec:commons-codec</include> 
             <include>org.apache.httpcomponents:httpclient</include>                               
             <include>org.apache.httpcomponents:httpcore</include>
             <include>org.apache.commons:commons-csv</include>
        </includes>
    </dependencySet>
</dependencySets>

I have added following dependency to the pom.xml -

<!-- Dubbo -->
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>2.5.9</version>
        <scope>provided</scope>
    </dependency>
   <build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
                <execution>
                    <id>prod-jar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <descriptors>
                            <descriptor>assembly.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
                <execution>
                    <id>jar-for-testcase</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <descriptors>
                            <descriptor>assembly_test.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
                <execution>
                    <id>pkg</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <appendAssemblyId>false</appendAssemblyId>
                        <descriptors>
                            <descriptor>pkg_assembly.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

When I run maven install, I am getting the warning and my code doesn't work. But if I run the code directly without creating the jar then it works just fine. So there is something wrong with the jar that get created. Debugging this, I came across this warning. But I am unable to understand what wrong am I doing. According to my understanding the include tag should contain group-id:artifact-id. I am doing this but still I am getting the warning. Can someone put some light on what am I missing here.

like image 972
user1305398 Avatar asked Mar 12 '18 07:03

user1305398


1 Answers

Resolved the warning with the following replacement

 <include>com.alibaba:dubbo:jar:</include>

Just for reference, following is the long pattern groupId:artifactId:type:classifier

like image 84
user1305398 Avatar answered Nov 08 '22 08:11

user1305398