settings.xml、pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  
  <localRepository>D:\boke\technology\maven\apache-maven-3.0.5\m2\repository</localRepository>
  <interactiveMode>true</interactiveMode>
  <offline>false</offline>

  <pluginGroups>
          <pluginGroup>org.mortbay.jetty</pluginGroup>
          <pluginGroup>org.jenkins-ci.tools</pluginGroup>
  </pluginGroups>
    
    <!--
  <proxies>
  </proxies>
    -->
    
  <servers>
             <server>
                     <id>releases</id>
                    <username>admin</username>
                    <password>admin123</password>
            </server>

            <server>
                    <id>snapshots</id>
                    <username>admin</username>
                    <password>admin123</password>
            </server>

  </servers>

    <!--
  <mirrors>
     <mirror>
         <id>nexus</id>
         <mirrorOf>*</mirrorOf>
         <url>http://localhost:8080/nexus-2.1.2/content/groups/public/</url>
     </mirror>
  </mirrors>
  -->
  
  <profiles>
        <profile>
                     <id>nexus</id>
                     <activation>
                             <activeByDefault></activeByDefault>
                             <jdk>1.6</jdk>
                     </activation>    
                     
                     
                     <repositories>
                             <repository>
                                     <id>central</id>
                                  <url>http://192.168.0.231:8081/nexus/content/groups/public/</url>
                                  <releases>
                                          <enabled>true</enabled>
                                  </releases>
                                   <snapshots>
                                           <enabled>true</enabled>
                                   </snapshots>
                             </repository>
                     </repositories>
                     
                  <pluginRepositories>
                          <pluginRepository>
                                  <id>central</id>
                                  <url>http://192.168.0.231:8081/nexus/content/groups/public/</url>
                                  <releases>
                                          <enabled>true</enabled>
                                  </releases>
                                  
                                  <snapshots>
                                          <enabled>true</enabled>
                                  </snapshots>
                          </pluginRepository>
                  </pluginRepositories>
            </profile>
  </profiles>

  <activeProfiles>
      <activeProfile>nexus</activeProfile>
  </activeProfiles>
</settings>

pom.xml

<project 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/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.sniper</groupId>
  <artifactId>maven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>maven</name>
  <url>http://maven.apache.org</url>

  <!-- 配置distributionManagement,deploy命令才能正常执行 -->
  <distributionManagement>
      <repository>
          <id>releases</id>
          <name>releases</name>
          <url>http://192.168.0.231:8081/nexus/content/repositories/releases/</url>
      </repository>
      <snapshotRepository>
          <id>snapshots</id>
          <name>snapshots</name>
          <url>http://192.168.0.231:8081/nexus/content/repositories/snapshots/</url>
      </snapshotRepository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


你可能感兴趣的:(settings.xml、pom.xml)