Setting up local maven repositories on your POM

Posted: January 8, 2013 in web

If for some reason you could not add a dependency on your pom, or maybe its not on nexus/maven central. You can manually add a local repo on your pom. On my case I need to test the latest version of primefaces which only have a nightly build or snapshot at the moment.


		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>3.5-SNAPSHOT</version>
		</dependency>

....
	<repositories>
        <repository>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
            <id>prime-repo</id>
            <name>Prime Repo</name>
            <url>http://repository.primefaces.org</url>
        </repository>               
	</repositories>

Be sure to Run maven build again on your project, you can also clean project if needed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s