Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in Eclipse #41

Closed
igor-bbm opened this issue Mar 19, 2018 · 8 comments
Closed

Errors in Eclipse #41

igor-bbm opened this issue Mar 19, 2018 · 8 comments
Assignees
Milestone

Comments

@igor-bbm
Copy link

igor-bbm commented Mar 19, 2018

Here is my pom.xml file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.grpc</groupId>
  <artifactId>examples</artifactId>
  <packaging>jar</packaging>
  <!-- Feel free to delete the comment at the end of these lines. It is just
       for safely updating the version in our release process. -->
  <version>1.10.0</version><!-- CURRENT_GRPC_VERSION -->
  <name>examples</name>
  <url>http://maven.apache.org</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <grpc.version>1.10.0</grpc.version><!-- CURRENT_GRPC_VERSION -->
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-netty</artifactId>
      <version>${grpc.version}</version>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-protobuf</artifactId>
      <version>${grpc.version}</version>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-stub</artifactId>
      <version>${grpc.version}</version>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-testing</artifactId>
      <version>${grpc.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>proto-google-common-protos</artifactId>
      <version>1.0.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.5.0.Final</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.5.1</version>
        <configuration>
          <protocArtifact>com.google.protobuf:protoc:3.5.1-1:exe:${os.detected.classifier}</protocArtifact>
          <pluginId>grpc-java</pluginId>
          <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
          <clearOutputDirectory>false</clearOutputDirectory>
          <outputDirectory>${basedir}/src/main/grpc</outputDirectory>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compile-custom</goal>
            </goals>
          </execution>
        </executions>
      </plugin> 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireUpperBoundDeps/>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Here is what I see in the Problems tab:

Description	Resource	Path	Location	Type
Failure to transfer com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from https://kmklabs.jfrog.io/kmklabs/bbmtek-release was cached in the local repository, resolution will not be reattempted until the update interval of bbmtek-release has elapsed or updates are forced. Original error: Could not transfer artifact com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from/to bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release): Access denied to https://kmklabs.jfrog.io/kmklabs/bbmtek-release/com/google/protobuf/protoc/3.5.1-1/protoc-3.5.1-1-${os.detected.classifier}.exe. Error code 401, Unauthorized
  com.google.protobuf:protoc:exe:3.5.1-1

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=false),
  central (https://kmklabs.jfrog.io/kmklabs/libs-release, releases=false, snapshots=true),
  bbmtek-snapshot (https://kmklabs.jfrog.io/kmklabs/bbmtek-snapshot, releases=false, snapshots=true),
  bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release, releases=true, snapshots=false)
Path to dependency: 
	1) io.grpc:examples:jar:1.10.0
	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

 (org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile-custom:default:generate-sources)

org.apache.maven.plugin.MojoExecutionException: Failure to transfer com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from https://kmklabs.jfrog.io/kmklabs/bbmtek-release was cached in the local repository, resolution will not be reattempted until the update interval of bbmtek-release has elapsed or updates are forced. Original error: Could not transfer artifact com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from/to bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release): Access denied to https://kmklabs.jfrog.io/kmklabs/bbmtek-release/com/google/protobuf/protoc/3.5.1-1/protoc-3.5.1-1-${os.detected.classifier}.exe. Error code 401, Unauthorized
  com.google.protobuf:protoc:exe:3.5.1-1

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=false),
  central (https://kmklabs.jfrog.io/kmklabs/libs-release, releases=false, snapshots=true),
  bbmtek-snapshot (https://kmklabs.jfrog.io/kmklabs/bbmtek-snapshot, releases=false, snapshots=true),
  bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release, releases=true, snapshots=false)
Path to dependency: 
	1) io.grpc:examples:jar:1.10.0
	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1


	at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:964)
	at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.execute(AbstractProtocMojo.java:489)
	at org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo.execute(AbstractProtocCompileMojo.java:31)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
	at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
	at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Failure to transfer com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from https://kmklabs.jfrog.io/kmklabs/bbmtek-release was cached in the local repository, resolution will not be reattempted until the update interval of bbmtek-release has elapsed or updates are forced. Original error: Could not transfer artifact com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from/to bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release): Access denied to https://kmklabs.jfrog.io/kmklabs/bbmtek-release/com/google/protobuf/protoc/3.5.1-1/protoc-3.5.1-1-${os.detected.classifier}.exe. Error code 401, Unauthorized
  com.google.protobuf:protoc:exe:3.5.1-1

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=false),
  central (https://kmklabs.jfrog.io/kmklabs/libs-release, releases=false, snapshots=true),
  bbmtek-snapshot (https://kmklabs.jfrog.io/kmklabs/bbmtek-snapshot, releases=false, snapshots=true),
  bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release, releases=true, snapshots=false)
Path to dependency: 
	1) io.grpc:examples:jar:1.10.0
	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1


	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:225)
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.access$000(DefaultArtifactResolver.java:74)
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver$ResolveTask.run(DefaultArtifactResolver.java:613)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from https://kmklabs.jfrog.io/kmklabs/bbmtek-release was cached in the local repository, resolution will not be reattempted until the update interval of bbmtek-release has elapsed or updates are forced. Original error: Could not transfer artifact com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from/to bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release): Access denied to https://kmklabs.jfrog.io/kmklabs/bbmtek-release/com/google/protobuf/protoc/3.5.1-1/protoc-3.5.1-1-${os.detected.classifier}.exe. Error code 401, Unauthorized
	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.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:215)
	... 5 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from https://kmklabs.jfrog.io/kmklabs/bbmtek-release was cached in the local repository, resolution will not be reattempted until the update interval of bbmtek-release has elapsed or updates are forced. Original error: Could not transfer artifact com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1 from/to bbmtek-release (https://kmklabs.jfrog.io/kmklabs/bbmtek-release): Access denied to https://kmklabs.jfrog.io/kmklabs/bbmtek-release/com/google/protobuf/protoc/3.5.1-1/protoc-3.5.1-1-${os.detected.classifier}.exe. Error code 401, Unauthorized
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
	... 9 more
	pom.xml	/examples	line 77	Maven Build Problem

Any idea how to fix this? I tried force-update, no luck. Thx.

@igor-bbm
Copy link
Author

igor-bbm commented Mar 19, 2018

Description Resource Path Location Type
Missing:

  1. com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) io.grpc:examples:jar:1.10.0
2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1


1 required artifact is missing.

for artifact:
io.grpc:examples:jar:1.10.0

from the specified remote repositories:
maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
(org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile-custom:default:generate-sources)

org.apache.maven.plugin.MojoExecutionException: Missing:

  1. com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) io.grpc:examples:jar:1.10.0
2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1


1 required artifact is missing.

for artifact:
io.grpc:examples:jar:1.10.0

from the specified remote repositories:
maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:962)
at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.execute(AbstractProtocMojo.java:489)
at org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo.execute(AbstractProtocCompileMojo.java:31)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

  1. com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) io.grpc:examples:jar:1.10.0
2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1


1 required artifact is missing.

for artifact:
io.grpc:examples:jar:1.10.0

from the specified remote repositories:
maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

at org.apache.maven.artifact.resolver.DefaultResolutionErrorHandler.throwErrors(DefaultResolutionErrorHandler.java:71)
at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:960)
... 36 more
pom.xml	/examples	line 77	Maven Build Problem

@sergei-ivanov
Copy link
Member

Hi,
It's most likely a known Eclipse M2E issue. Have you tried following the instructions here:
https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides
?

@igor-bbm
Copy link
Author

igor-bbm commented Mar 20, 2018

Hi, thanks for your reply. I did follow the link and have downloaded the jar and put it in <ECLIPSE_HOME>/ plugins directory. It did not help, unfortunately.
The error seems to be the same.

Missing:
----------
1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
  	1) io.grpc:examples:jar:1.10.0
  	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

----------
1 required artifact is missing.

for artifact: 
  io.grpc:examples:jar:1.10.0

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
  maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
 (org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile-custom:default:generate-sources)

org.apache.maven.plugin.MojoExecutionException: Missing:
----------
1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
  	1) io.grpc:examples:jar:1.10.0
  	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

----------
1 required artifact is missing.

for artifact: 
  io.grpc:examples:jar:1.10.0

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
  maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

	at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:962)
	at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.execute(AbstractProtocMojo.java:489)
	at org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo.execute(AbstractProtocCompileMojo.java:31)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
	at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
	at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.1-1 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
  	1) io.grpc:examples:jar:1.10.0
  	2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.5.1-1

----------
1 required artifact is missing.

for artifact: 
  io.grpc:examples:jar:1.10.0

from the specified remote repositories:
  maven_central (http://repo1.maven.org/maven2, releases=true, snapshots=true),
  maven_central_2 (http://central.maven.org/maven2, releases=true, snapshots=true),
  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

	at org.apache.maven.artifact.resolver.DefaultResolutionErrorHandler.throwErrors(DefaultResolutionErrorHandler.java:71)
	at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:960)
	... 36 more

Any other ideas?

I am using external, not built-in maven for my eclipse IDE.

Eclipse IDE for Java Developers
Version: Oxygen.1a Release (4.7.1a)
Build id: 20171005-1200
OS: Linux, v.4.13.0-36-generic, x86_64 / gtk 3.18.9

@sergei-ivanov
Copy link
Member

sergei-ivanov commented Mar 20, 2018

Unfortunately, I am not sure I can help. It is a known Eclipse issue, and it's not even related to protobuf-maven-plugin, it is related to the way Eclipse substitutes properties in the POM files. As you can see, ${os.detected.classifier} remained unexpanded, and that is the main cause of the problem. Try raising an issue with Eclipse or asking around on Eclipse community forums.

@sergei-ivanov
Copy link
Member

Duplicates #18
Please see an old issue that describes the same or very similar problem.

@iwan-hybrit
Copy link

iwan-hybrit commented Aug 22, 2018

I fixed this by adding the following sniplet to my maven settings.xml:

<profiles>
	<profile>
		<id>protobuf</id>
		<properties>
			<os.detected.classifier>windows-x86_64</os.detected.classifier>
		</properties>
	</profile>
</profiles>
	
<activeProfiles>
	<activeProfile>protobuf</activeProfile>
</activeProfiles>

Of course the value of the property would need to be changed depending on what OS you're on.

@sergei-ivanov
Copy link
Member

Please see also an alternative solution here:
#10 (comment)

I am going to close this issue, because it has nothing to do with the plugin. It is a problem with Maven integration in Eclipse, and I cannot help there. I shall add the proposed workarounds to the plugin documentation.

@sergei-ivanov
Copy link
Member

Raised a PR (see above) in os-maven-plugin to add extra documentation and plugin lifecycle metadata for Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants