Categories
discuss

What are the hidden features of Maven2? [closed]

What are the hidden features of Maven2?

Answer

You can use the settings.xml to force ALL maven builds running on your local machine to also use a locally installed maven proxy. Saving yourself and the network time.

<settings xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                  http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <profile>
        <id>localcacheproxies</id>

        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>

        <repositories>
            <repository>
                <id>localCacheProxy</id>
                <url>http://my-local-proxy.com/maven-proxy</url>
            </repository>
        </repositories>
    </profile>
</profiles>

Note that the namespace headings in this settings.xml also gives a decent intellisense as opposed to other examples posted here. (create in your home directory .m2 folder on windows, linux and mac and all os’es)

Source: stackoverflow
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Privacy Policy, and Copyright Policy. Content is available under CC BY-SA 3.0 unless otherwise noted. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 © No Copyrights, All Questions are retrived from public domain..