我正试图使用Maven构建一个新的Grails2.5.0应用程序,但不断出现与GrailsMaven插件相关的错误。
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.4:clean (defau
lt-clean) on project grails_2.5.0_test: Execution default-clean of goal org.grai
ls:grails-maven-plugin:2.4.4:clean failed: java.lang.reflect.InvocationTargetExc
eption: org.codehaus.groovy.runtime.DefaultGroovyMethods.each(Ljava/util/Collect
ion;Lgroovy/lang/Closure;)Ljava/util/Collection; -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.grails:grails-maven-plugin:2.4.4:clean (default-clean) on project grails_2.5.
0_test: Execution default-clean of goal org.grails:grails-maven-plugin:2.4.4:cle
an failed: java.lang.reflect.InvocationTargetException
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:224)
复制步骤:
我在JDK 1.7上运行这个。
同样的例子也适用于Grails2.4.4。我是否遗漏了什么,或者这是2.5.0中的一个bug?
波姆。XML
<?xml version="1.0" encoding="utf-8"?>
<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>test</groupId>
<artifactId>grails_2.5.0_test</artifactId>
<packaging>grails-app</packaging>
<version>0.1</version>
<name>grails_2.5.0_test</name>
<description>grails_2.5.0_test</description>
<properties>
<grails.version>2.5.0</grails.version>
<h2.version>1.3.170</h2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-test</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>1.0-groovy-2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-datastore-test-support</artifactId>
<version>1.0.2-grails-2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>scaffolding</artifactId>
<version>2.1.2</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.1.8</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>asset-pipeline</artifactId>
<version>2.1.5</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate4</artifactId>
<version>4.3.8.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>database-migration</artifactId>
<version>1.4.0</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.11.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>7.0.55.2</version>
<scope>provided</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>webxml</artifactId>
<version>1.4.1</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<pluginManagement/>
<plugins>
<!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>2.4.4</version>
<configuration>
<grailsVersion>${grails.version}</grailsVersion>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>https://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>https://repo.grails.org/grails/plugins</url>
</repository>
</repositories>
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
GrailsMaven插件(2.4.6)的新版本已经发布,修复了这个问题。我已经对此进行了测试,可以确认问题已经解决。
我是maven的新手,并用hello World创建了一个简单的maven项目。当我尝试运行Maven项目时,它会说:- [错误]尚未为此生成指定目标。必须指定有效的生命周期阶段或格式为:或:[:]:的目标。可用的生命周期阶段有:验证、初始化、生成源、过程源、生成资源、过程资源、编译、过程类、生成测试源、过程测试源、生成测试资源、过程测试资源、测试编译、过程测试类、测试、准备包、包、集成前测试、集
在我的xamarin Android应用程序上得到以下错误。请帮助我解决这个问题。 C:\程序文件(x86)\msbuild\xamarin\android\xamarin.android.common.targets(5,5):错误MSB4018:“LinkAssemblies”任务意外失败。xamarin.android.xamarinandroidException:错误XA2006:无法解
生成服务器输出:
我正在尝试构建Quarkus本机应用程序,但在Docker内部构建过程中,我被拒绝访问。我在跟踪这个医生 Dockerfile: 错误: 似乎本机映像命令不会创建app-1.0.0-runner。构建人工制品。txt。 你能帮我一下吗? 顺致敬意,
我升级了 Eclipse ADT 插件,并在一个项目上执行了导出,以使用 Gradle,然后将其导入到最新的 Android Studio 0.3.2.中,选择“build.gradle”,就像他们希望你的那样。 我下载了最新的Gradle 1.9,但我收到的错误基本上是“需要Gradle 1.6,找到1.9”。 我让构建达到了抱怨构建中的“依赖项”类路径的地步。 那么,我怎样才能找到它满意的类路
问题内容: 从某人的项目中,我收到此错误: 我有最新的JDK(jdk1.6.0_25)。据我了解,我可以执行以下操作之一: 下载J2SE-1.5环境以匹配项目。 编辑项目以与最新的JDK保持一致。 我怎样才能做到这一点? 问题答案: 这是一个很好的讨论: 如何在1.5兼容模式下使用JDK 1.6 基本上你应该 下载并安装1.5 JDK。(下载链接) 在Eclipse中,转到 窗口 → 首选项 →