2012-01-09 61 views
0

我需要帮助如何构建这个例子:从本教程 http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services如何构建此源代码? - 缺少相关

我安装了NetBeans 7.1 http://blogs.oracle.com/arungupta/resource/totd154.zip 。当我点击清理并生成出现此错误:

Failed to execute goal on project helloworld-cdiclient: Could not resolve dependencies for project org.samples.osgi.helloworld:helloworld-cdiclient:war:1.0-SNAPSHOT: Could not find artifact org.glassfish:osgi-cdi-api:jar:3.1-SNAPSHOT -> [Help 1] 

To see the full stack trace of the errors, re-run Maven with the -e switch. 
Re-run Maven using the -X switch to enable full debug logging. 

For more information about the errors and possible solutions, please read the following articles: 
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

After correcting the problems, you can resume the build with the command 
    mvn <goals> -rf :helloworld-cdiclient 

我想,我需要一个特定的GlassFish资源库添加到Maven配置。我需要哪个存储库?

+0

要回答你的问题,http://download.java.net/maven/glassfish应该帮助 – alf 2012-01-09 14:33:06

+0

如何将此存储库添加到maven配置? – 2012-01-09 14:44:14

+1

'<库> 的glassfish回购 在GlassFish库 http://download.java.net/maven/glassfish/ ' – alf 2012-01-09 14:45:12

回答

1

引述我的意见(对不起,我虽然它会给机会给别人正确,而不是回答有关运行):

要回答你的问题,download.java.net/maven/glassfish应该有所帮助。配置线是,

<repositories> 
    <repository> 
     <id>glassfish-repo</id> 
     <name>The Glassfish repository</name> 
     <url>http://download.java.net/maven/glassfish/</url> 
    </repository> 
    <!-- all the rest... --> 
</repositories> 

玩得开心!