Ted*_*pin 5 java eclipse eclipse-plugin maven
我正在忍受无法解决的maven-protoc-plugin问题,os.detected.classifier导致日食报告我的pom错误。
我找到了此修复程序,但我怀疑它仅适用于较旧的Eclipse版本,<eclipse>/plugins氧气中不再有文件夹。
我尝试os.detected.classifier在eclipse.ini和Windows环境变量中进行设置均无济于事。
这是一些认为会有所帮助的pom的剪辑。
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.3.0.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.4.3</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
Run Code Online (Sandbox Code Playgroud)
还有部分错误...
Missing:
----------
1) com.google.protobuf:protoc:exe:${os.detected.classifier}:2.6.1
Try downloading the file manually from the project website.
Run Code Online (Sandbox Code Playgroud)
小智 6
将以下扩展添加到您的 pom 文件中:`
<project>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.1</version>
</extension>
</extensions>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
`
如果它不适合您而不是使用“扩展”语法,您可以将其注册为插件:
<plugin>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>detect</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我知道这是一个老问题,但我刚刚遇到了同样的问题并找到了适合我的解决方案。
Eclipse m2e 无法正确处理 Maven 操作系统插件/扩展。有一些建议可供参考。
对我来说最省力的方法是将插件 jar 添加到 Eclipse dropins 目录中。在我的 mac 上是这样
~/eclipse/java-2018-12/Eclipse.app/Contents/Eclipse/dropins
Run Code Online (Sandbox Code Playgroud)
该文件位于 Maven 存储库中
将文件复制到那里,重新启动 Eclipse,然后 os.Detected.classifier 将在 Eclipse 上的 m2e 中正确展开。
| 归档时间: |
|
| 查看次数: |
1539 次 |
| 最近记录: |