Spring OSGI Bundle项目的配置--修正了官方的错误

本文介绍如何使用Maven命令创建Spring OSGi Bundle项目,并添加必要的仓库到项目的POM文件中。通过运行特定的Maven命令,可以完成项目的创建。之后还需要将指定的仓库添加到项目的POM文件中,最后通过运行mvn compile来验证项目配置是否正确。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. The Maven Command:

 
  1. mvn archetype:create  
  2. -DarchetypeGroupId=org.springframework.osgi  
  3. -DarchetypeArtifactId=spring-osgi-bundle-archetype  
  4. -DarchetypeVersion=1.0-SNAPSHOT  
  5. -DremoteRepositories=http://static.springframework.org/maven2-snapshots  
  6. -DgroupId=maventest  
  7. -DartifactId=maventest  
  8. -Dversion=1.0.0  


2. After the project is successfully created, please add the following repositories to the POM

 
  1. <repository>    
  2.    <id> springframework.org</id>    
  3.     <name>Springframework Maven SNAPSHOT Repository</name>    
  4.     <url> http://static.springframework.org/maven2-snapshots/</url>    
  5.  </repository>                     
  6.                            
  7. <repository>                                            
  8.     <id>safehaus-repository</id>                           
  9.     <name>Safehaus Repository</name>                       
  10.     <url>http://m2.safehaus.org</url>                      
  11. </repository>    

3. run "mvn compile", everything is ok! :-)

Thanks for the help of every guys。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值