nexus-2.1.2
introduction
install nexus
you can download nexus from http://www.sonatype.org/nexus/ here we use nexus-on-jetty version
add nexus-2.1.2-bundle\nexus-2.1.2\bin to environment variable "path"
change nexus-2.1.2-bundle\nexus-2.1.2\bin\jsw\conf\wrapper.conf like this:
# Set the JVM executable
# (modify this to absolute path if you need a Java that is not on the OS path)
wrapper.java.command=C:\Java\jdk1.6.0_22\bin\java
then use "nexus install" command to register service, and use "nexus start" command to start nexus.
finally we access nexus console by http://localhost:8081/nexus/ (jetty default http port is 8081).
And click login, enter the following username=admin and password=admin123. You can have more operation.
nexus repository - private repository
nexus has the following repository
host repository - repository which you can deploy your project to it
proxy repository - remote repository
group repository - group mutil repository together
How To
how to configure nexus private repository
update central proxy repository indexes
configure mirror in apache-maven-3.0.4\conf\settings.xml
the following configuration will mirror all repository to nexus private repository.
<mirror>
<id>central</id>
<mirrorOf>*</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://localhost:8081/nexus/content/repositories/central/</url>
</mirror>
how to deploy your project to nexus
configure Deployment Policy
add distributionManagement element in your pom.xml
<distributionManagement>
<snapshotRepository>
<id>user-snapshot</id>
<name>User Project SnapShot</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>user-release</id>
<name>User Project Release</name>
<url>localhost:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
configure apache-maven-3.0.4\conf\settings.xml servers element
<server>
<id>user-snapshot</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>user-release</id>
<username>deployment</username>
<password>deployment123</password>
</server>
then you can run pom.xml of your project to deploy project (command clean deploy).