Skip to content

Instantly share code, notes, and snippets.

@vicly
Last active April 30, 2020 03:16
Show Gist options
  • Save vicly/269c3df4424e970cbaee8c1be7bc2203 to your computer and use it in GitHub Desktop.
Save vicly/269c3df4424e970cbaee8c1be7bc2203 to your computer and use it in GitHub Desktop.
[Maven note] #Java #Maven

list all dependency jar

mvn dependency:resolve

mvn -o dependency:list "-DincludeScope=compile" \
| grep ":.*:.*:.*" \
| cut -d] -f2- \
| sed 's/:[a-z]*$//g' \
| sort -u
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>add-test-source</id>
            <!--
                This will help m2eclipse to recognize the folder as source
                folder after update project configuration.
            -->
            <phase>process-resources</phase>
<!--            <phase>generate-test-sources</phase>-->
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/it/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment