maven nexus spring-data-jpa-examples导入报错

发布于 2022-08-24 10:34:36 字数 3035 浏览 6 评论 0

问题描述:
spring-data-jpa-examples一个基于maven的项目 ,我用nexus管理构件,但是项目导入myeclipse的时候会提示下面的错误

我的想法:
系统提示的意思就是"maven-plugin:1.0.0.RELEASE"这个构件不能从nexus上下载,
随后我在http://repo.springsource.org/ 上找到了该构件,我想问通过怎样的配置可以解决上面的问题,下面有我的maven配置和MyEclipse提示的错误

1.maven配置
setting.xml中关于nexus的配置
------------------------------

  <mirrors>
    <mirror>  
      <!--This sends everything else to /public -->  
      <id>nexus</id>  
      <mirrorOf>*</mirrorOf>  
      <url>http://127.0.0.1:8089/nexus/content/groups/public</url>  
    </mirror> 
  </mirrors>


 <profiles>
    <profile>  
      <id>nexus</id>  
      <!--Enable snapshots for the built in central repo to direct -->  
      <!--all requests to nexus via the mirror -->  
      <repositories>  
        <repository>  
          <id>central</id>  
          <url>http://central</url>  
          <releases><enabled>true</enabled></releases>  
          <snapshots><enabled>true</enabled></snapshots>  
        </repository>  
      </repositories>  

      <pluginRepositories>  
        <pluginRepository>  
          <id>central</id>  
          <url>http://central</url>  
          <releases><enabled>true</enabled></releases>  
          <snapshots><enabled>true</enabled></snapshots>  
        </pluginRepository>  		
      </pluginRepositories>  
    </profile> 	
  </profiles>

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

2.MyEclipse提示的错误:

Description	Resource	Path	Location	Type
Could not calculate build plan: Missing:
----------
1) com.springsource.bundlor:com.springsource.bundlor.maven:maven-plugin:1.0.0.RELEASE

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.springsource.bundlor -DartifactId=com.springsource.bundlor.maven -Dversion=1.0.0.RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.springsource.bundlor -DartifactId=com.springsource.bundlor.maven -Dversion=1.0.0.RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

----------
1 required artifact is missing.

for artifact: 
  com.springsource.bundlor:com.springsource.bundlor.maven:maven-plugin:1.0.0.RELEASE

from the specified remote repositories:
nexus (http://127.0.0.1:8089/nexus/content/groups/public, releases=true, snapshots=true)
spring-data-jpa-example		Unknown	Maven Problem

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文