找不到groovy-eclipse-batch工件 [英] Could not find groovy-eclipse-batch artifact

查看:148
本文介绍了找不到groovy-eclipse-batch工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Java 8运行mvn clean compile,以前我正在使用能正常工作的Java 7.

I am trying to run mvn clean compile with java 8, previously I was working with java 7 that was working correctly.

使用Java 8出现以下错误:

Getting following error with java 8:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3. 1:compile (default-compile) on project orion2-core: Fatal error compiling: Could not find groovy-eclipse-batch artifact. Must add this artifact as an explicit d ependency the pom. -> [Help 1]

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3. 1:compile (default-compile) on project orion2-core: Fatal error compiling: Could not find groovy-eclipse-batch artifact. Must add this artifact as an explicit d ependency the pom. -> [Help 1]

在Pom中进行了以下更改以使用Java 8运行Maven构建:-

Did following changes in Pom to run maven build wtih java 8:-

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <compilerId>groovy-eclipse-compiler</compilerId>
                <source>1.8</source>
                <target>1.8</target>
                <verbose>true</verbose>
                <fork>true</fork>
                <compilerArguments>
                    <javaAgentClass>lombok.core.Agent</javaAgentClass>
                </compilerArguments>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok</artifactId>
                    <version>0.12.0</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-eclipse-compiler</artifactId>
                    <version>2.9.0-01-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-eclipse-batch</artifactId>
                    <version>2.3.4-01</version>
                </dependency>
            </dependencies>
 </plugin>

推荐答案

这对我有用:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <compilerId>groovy-eclipse-compiler</compilerId>
                <verbose>true</verbose>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-eclipse-compiler</artifactId>
                    <version>3.3.0-01</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-eclipse-batch</artifactId>
                    <version>2.5.6-02</version>
                </dependency>
            </dependencies>
        </plugin>

不确定龙目岛.我注意到这很脆弱.并非所有这些JAR版本都能很好地协同工作(例如,编译器3.1不喜欢groovy-eclipse-compiler 3.3).如果出现错误,请尝试其他版本.

Not sure about lombok. What I noticed is that this is brittle. Not all versions of these JARs play well together (compiler 3.1 doesn't like groovy-eclipse-compiler 3.3, for example). If you get errors, try different versions.

使用Maven Central的搜索表查找所有可能的版本: https://search.maven.org/search?q=a:groovy-eclipse-compiler

Use the search form of Maven Central to find all possible versions: https://search.maven.org/search?q=a:groovy-eclipse-compiler

这篇关于找不到groovy-eclipse-batch工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆