Maven to download dependencies

When you use maven to build and manage dependencies on a project and you want supply that project to other project without maven, i am sure you will get a question how i can copy all libraries this project depend on? In this post i will show you how to use maven to download dependencies.
To do that i using maven plugin Copying project dependencies. I add following lines to my pom.xml file

<build>
    <plugins>
        <!--other plugin--->
         .....
        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

With this config when we do maven -install command it will  copy all libraries that project is depended to target/lib folder.