私は現在、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の依存関係に関連する問題に実行しているjarファイルを作成するために、プロジェクトをビルドしようとすると:Cumulocity 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エラーが発生します。
ここで指定したように私は、Mavenのの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 Mavenのレポのための資格情報を提供する必要がありますか?
私は実際にsettings.xmlでMavenリポジトリを指定しましたが、pom.xmlにも直接格納しました。私はtinkerforge-driverプロジェクトを独自に構築しようとしましたが、その結果、私の最初の投稿に誤りがありました。私が今やったのは実際に私のために働いたのは、c8y-jvプロジェクト全体をビルドすることでした。なぜなら、必要なc8yライブラリはすべてローカルにビルドされているからです。 – BrickTop