Maven

Maven
  • Version: apache-maven-2.2.1
  • official web site: http://maven.apache.org/
  • Download Page: http://maven.apache.org/download.html
  • Note: I strongly recommend that you use maven 2 rather than maven 3; maven 3 is not yet stable enough when I write this document.

    Now open the "MAVEN_HOME\conf\setting.xml" and make some changes to make the Nexus take effective in maven.

    Xml代码
    1. <mirror>
    2. <id>nexus</id>
    3. <mirrorOf>*</mirrorOf>
    4. <url>http://localhost:8080/nexus/</url>
    5. </mirror>

    And make the following changes to make sonar take effective in maven.
    Xml代码
    1. <profile>
    2. <id>sonar</id>
    3. <activation>
    4. <activeByDefault>true</activeByDefault>
    5. </activation>
    6. <properties>
    7. <!--EXAMPLEFORMYSQL-->
    8. <sonar.jdbc.url>
    9. jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8
    10. </sonar.jdbc.url>
    11. <sonar.jdbc.driverClassName>com.mysql.jdbc.Driver</sonar.jdbc.driverClassName>
    12. <sonar.jdbc.username>sonar</sonar.jdbc.username>
    13. <sonar.jdbc.password>sonar</sonar.jdbc.password>
    14. <!--optionalURLtoserver.Defaultvalueishttp://localhost:9000-->
    15. <sonar.host.url>
    16. http://localhost:8080/sonar
    17. </sonar.host.url>
    18. </properties>
    19. </profile>

    Xml代码
    1. <activeProfiles>
    2. <activeProfile>sonar</activeProfile>
    3. </activeProfiles

  • 你可能感兴趣的:(maven)