2012-04-08 46 views
1

我想在heils-core中使用hector-core作爲grails maven構建中的依賴項。Gail Maven - OSGI捆綁作爲依賴 - 解決問題

<dependency> 
    <groupId>me.prettyprint</groupId> 
    <artifactId>hector-core</artifactId> 
    <version>1.0-3</version> 
    <type>bundle</type> 
</dependency> 

我得到一個錯誤

[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution. Encountered problems resolving dependencies of the executable in preparation for its execution. Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced 

Failed to execute goal on project igiveplatform: Could not resolve dependencies 
for project com.igivefirst:igiveplatform:war:0.1-SNAPSHOT: Failure to find 
me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core 
was cached in the local repository, resolution will not be reattempted until the 
update interval of grails has elapsed or updates are forced 

構建試圖下載.bundle文件,而不是的.jar這是在Maven倉庫。 Grails通常會構建這個項目。

在此先感謝!

正如下面推薦我刪除的類型標籤...另一個錯誤現在

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution. 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create classpath for Grails execution. 
    at org.grails.maven.plugin.AbstractGrailsMojo.generateGrailsExecutionClasspath(AbstractGrailsMojo.java:427) 
    at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:225) 
    at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:206) 
    at org.grails.maven.plugin.MvnCompileMojo.execute(MvnCompileMojo.java:41) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 

Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced 

回答

4

的依賴類型應該是罐子,不捆綁。

(看看類似的問題,Why can't maven find an osgi bundle dependency?

+0

通過了一個錯誤......謝謝。現在grails插件不開心:( – chrislovecnm 2012-04-08 18:58:15

+0

@chrislovecnm upvote並接受答案 – 2012-04-08 18:58:53

+0

@RobertMunteanu我會如果答案解決了我的問題。我做了upvote,因爲它幫助我部分解決了問題 – chrislovecnm 2012-04-08 19:18:35