我正在尝试构建maven,每次当我使用maven update
构建eclipse
时
Missing: ---------- 1)
com.google.protobuf:protoc:exe:${os.detected.classifier}:3.6.1 error.
从command line
我得到以下错误。
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-
plugin:0.5.1:compile (default) on project ivf-sample: protoc did not exit
cleanly. Review output for more information. -> [Help 1]
Maven对如何解决这个错误有什么建议吗?
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.32.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.32.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.32.1</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.2</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.1</version>
<configuration>
<protocArtifact>
com.google.protobuf:protoc:3.6.1:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:1.22.1:exe:${os.detected.classifier}
</pluginArtifact>
<protoSourceRoot>
${basedir}/src/main/proto/
</protoSourceRoot>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
2条答案
按热度按时间g6ll5ycj1#
我尝试使用pom.xml中的以下代码片段,并且能够成功地构建我的Maven项目。
pftdvrlh2#
eclipse可能无法获取value的属性:${os.detected.classifier},以便您可以在maven settings.xml的profiles.profile.properties中对其进行配置。
<os.detected.classifier> windows -x86_64</os.detected.classifier>