2017-11-17 1 views
1

현재 Cumulocity에서 지원하지 않는 일부 Tinkerforge 센서 용 새 드라이버를 개발하려고합니다. 프로젝트 https://bitbucket.org/m2m/cumulocity-examples을 복제하고 새 드라이버를 tinkerforge-driver 프로젝트 https://bitbucket.org/m2m/cumulocity-examples/src/c2b5da5b234510085804dcc947f682941ccbed20/java-agent/tinkerforge-driver/?at=default에 추가했습니다. 내가 메이븐 의존성과 관련된 문제로 실행 해요 항아리를 만드는 프로젝트를 빌드 할 때 :누에 고치 Maven 저장소 오류로드 종속성

[ERROR] Failed to execute goal on project tinkerforge-driver: Could not resolve dependencies for project c8y.example:tinkerforge-driver:jar:8.14.0: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

매개 변수 -X으로 빌드를 실행, 나는 로그에 다음과 같은 예외를 참조하십시오

[ERROR] Failed to execute goal on project tinkerforge-driver: Could not resolve dependencies for project c8y.example:tinkerforge-driver:jar:8.14.0: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project tinkerforge-driver: Could not resolve dependencies for project c8y.example:tinkerforge-driver:jar:8.14.0: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) 
     at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221) 
     at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) 
     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:116) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 
     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
     at java.lang.reflect.Method.invoke(Unknown Source) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project c8y.example:tinkerforge-driver:jar:8.14.0: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) 
     at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211) 
     at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195) 
     ... 23 more 
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) 
     at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384) 
     at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205) 
     ... 24 more 
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: c8y.example:jv-driver:jar:8.14.0, c8y.example:jv-agent-assembly:tar.gz:tar:8.14.0: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) 
     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) 
     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) 
     at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367) 
     ... 25 more 
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact c8y.example:jv-driver:jar:8.14.0 in cumulocity-maven-repo (http://resources.cumulocity.com/maven/repository) 
     at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:893) 
     at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1) 
     at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673) 
     at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310) 
     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520) 
     at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421) 
     ... 27 more 

http://resources.cumulocity.com/maven/repository/을 통해 저장소에 직접 액세스하려고하면 403 Forbidden 오류가 발생합니다. 여기에 지정된

나는 받는다는 Settings.XML이를 업데이트했습니다 : https://bitbucket.org/m2m/cumulocity-examples

<?xml version="1.0" encoding="UTF-8"?> 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
         http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
    <localRepository>C:/dev/.m2</localRepository> 
    <activeProfiles> 
    <activeProfile>cumulocity</activeProfile> 
    </activeProfiles> 
    <profiles> 
     <profile> 
     <id>cumulocity</id> 
     <repositories> 
     <repository> 
      <id>cumulocity-maven-repo</id> 
      <url>http://resources.cumulocity.com/maven/repository</url> 
     </repository> 
     </repositories> 
     <pluginRepositories> 
     <pluginRepository> 
      <id>cumulocity-plugins-repo</id> 
      <url>http://resources.cumulocity.com/maven/repository</url> 
     </pluginRepository> 
     </pluginRepositories> 
    </profile> 
    </profiles> 

</settings> 

내가 Cumulocity 메이븐의 repo에 대한 자격 증명을 제공해야합니까?

답변

1

예, 전체 프로젝트를 구축하는 것은 당신이해야 할 일이다. 우리는 프로젝트의 사전 구성 요소를 우리의 Maven 저장소에 가지고 있지 않습니다.

0

저장소 문제 : "탐색 가능한"웹 페이지가 아닙니다. Cumulocity는 Maven settings.xml 또는 pom.xml 파일에서 URL을 구성하는 방법을 안내합니다.

예 : http://cumulocity.com/guides/java/hello-world-basic/ 참조.

희망이 있습니다.

안부 마이클

+0

실제로 settings.xml에서 Maven 저장소를 지정했으며 pom.xml에도 직접 지정했습니다. 나는 tinkerforge-driver 프로젝트를 독자적으로 만들려고 노력했다. 그 결과 내 초기 게시물에 오류가 나온다. 지금 내가 한 일은 실제로 c8y-jv 프로젝트 전체를 빌드하는 것이 었습니다. 왜냐하면 모든 필요한 c8y 라이브러리가 로컬에서 빌드되기 때문에 maven에 호스팅 된 libs에 의존 할 필요가 없기 때문입니다 ... – BrickTop