`

Maven Related

 
阅读更多

1. Install m2Eclipse

要使用下面这个link.

http://download.eclipse.org/technology/m2e/releases

 

apache-maven-3.2.3\lib\maven-model-builder-3.2.3.jar\org\apache\maven\model\pom-4.0.0.xml

  <repositories>
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
    </pluginRepository>
  </pluginRepositories>

 

2. Maven 需要使用JDK,不能使用JRE.

 

3. setting.xml 中 server 元素的 id 必须与 POM 中需要谁的 repository 元素的 id 完全一致。正是此 id 将认证信息与仓库配置联系在一起。

settings.xml
  <servers>
    <server>
      <id>central</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
  </servers>
  
pom-4.0.0
<project>
  <modelVersion>4.0.0</modelVersion>

  <repositories>
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
</project>

 

4. Change version from 2.3.2 to 3.1, then problem sloved.

DescriptionResourcePathLocationType

Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from https://hostname:8081/nexus/service/local/repositories/mavencentral/content was cached in the local repository, resolution will not be reattempted until the update interval of dsnexus-central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to dsnexus-central (https://hostname:8081/nexus/service/local/repositories/mavencentral/content): Access denied to https://hostname:8081/nexus/service/local/repositories/mavencentral/content/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom. Error code 401, Unauthorizedpom.xml/MavenTest2line 1Maven Configuration Problem

 

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
 
分享到:
评论

相关推荐

    Android.Application.Development.with.Maven

    Whether you are already using Maven or another build tool, this book focuses only on Maven topics that are related to Android development. It would be helpful, but not necessary, if you have some ...

    Apache Maven Dependency Management

    Maven eliminates this need by reading the project files of dependencies to figure out their inter-relations and other related information. Gaining an understanding of project dependencies will allow ...

    Android代码-maven-git-commit-id-plugin

    maven git commit id plugin ... For those who don't know the previous plugins, it basically helps you to help you with the following tasks and answer related questions Which version had

    Android.Application.Development.with.Maven.17

    Whether you are already using Maven or another build tool, this book focuses only on Maven topics that are related to Android development. It would be helpful, but not necessary, if you have some ...

    Android代码-DistilledViewPrefs

    Improvements, code related or suggestions. Fork it if you feel for it as well. :) Screens Implementation example Add this to your gradle build file repositories { maven { url ...

    Android代码-Android列表视图实现

    An Android List View implementation with support for drawable cells and many other swipe related features. Introduction Download Maven Dependency APKLib and others Dependencies XML Usage ...

    Android代码-android-swipelistview

    An Android List View implementation with support for drawable cells and many other swipe related features. Introduction Download Maven Dependency APKLib and others Dependencies Demo XML Usage ...

    concurrency-related-hello-worlds

    #Maven原型mvn原型:generate -DgroupId = com.mycompany -DartifactId =与并发相关的问候世界-DarchetypeGroupId = ...

    docker-jenkins:Jenkins的Docker映像

    docker-jenkins docker pull dustise/jenkins A Customizable docker image for Jenkins. With this image , you can simply add your own init groovy ...Added some CI/CD related tools into the image. Following t

    Android代码-fingerlock

    Check the related post on Medium. Gradle Dependency Repository repositories { maven { url "https://jitpack.io" } } Dependencies Core The core module contains the core class FingerLock to perform ...

    Android代码-Kotlin-Realm-Extensions

    Forget all boilerplate related with Realm API and perform database operations in one line of code with this lightweight library. Full test coverage. Download for Kotlin 1.3 and Realm 5.9 Grab via ...

    mastering-spring-cloud2018

    Maven Git client Chapter 1, Introduction to Microservices, will introduce you to the microservices architecture, cloud environment, etc. You will learn the difference between a microservice based ...

    docker-compose-rule-spark-demo:在“现实世界”项目中演示“ Docker Compose JUnit规则”

    在项目中演示。 挑战 您获得了 -microservice,您希望使用 ( )运行它。... # Builds a docker-image for this git-commit-id, integration-tests against a related container docker-compose-rule-spar

    yosql:Java的零依赖数据库访问

    执照To the extent possible under law, the author(s) have dedicated all copyrightand related and neighboring rights to this software to the public domainworldwide. This software is distributed without ...

Global site tag (gtag.js) - Google Analytics