<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2007 the original author or authors. Licensed under the Apache
License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->
<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>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>2.2.2</version>
<packaging>maven-plugin</packaging>
<name>Maven plugin for GRAILS applications</name>
<description>This plugin allows you to integrate GRAILS applications into maven 2 builds.</description>
<url>http://github.com/grails/grails-maven</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://github.com/grails/grails-maven-plugin</url>
<developerConnection>scm:git:git://github.com/grails/grails-maven-plugin.git</developerConnection>
<connection>scm:git:git@github.com:grails/grails-maven-plugin.git</connection>
</scm>
<developers>
<developer>
<id>graemerocher</id>
<name>Graeme Rocher</name>
<email>graeme.rocher@gmail.com</email>
</developer>
</developers>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<properties>
<!-- Prerequisites -->
<maven.version>2.0.5</maven.version>
<!-- Dependencies -->
<groovy.version>2.0.8</groovy.version>
<grails.version>2.2.2</grails.version>
<grails-bootstrap.version>${grails.version}</grails-bootstrap.version>
<grails-core.version>${grails.version}</grails-core.version>
<grails-scripts.version>${grails.version}</grails-scripts.version>
<grails-maven-archetype.version>${grails.version}</grails-maven-archetype.version>
<grails-launcher.version>1.0.5</grails-launcher.version>
<maven-model.version>2.0.7</maven-model.version>
<maven-project.version>2.0.7</maven-project.version>
<maven-plugin-api.version>2.0.7</maven-plugin-api.version>
<maven-archiver.version>2.2</maven-archiver.version>
<plexus-utils.version>1.4.5</plexus-utils.version>
<junit.version>3.8.2</junit.version>
<spring.version>3.1.4.RELEASE</spring.version>
<maven-plugin-testing-harness.version>1.1</maven-plugin-testing-harness.version>
<xmlunit.version>1.0</xmlunit.version>
<aspectjweaver.version>1.6.10</aspectjweaver.version>
<aspectjrt.version>1.6.10</aspectjrt.version>
<!-- Reporting plugins -->
<maven-project-info-reports-plugin.version>2.0.1</maven-project-info-reports-plugin.version>
<maven-plugin-plugin.version>2.4.1</maven-plugin-plugin.version>
<plexus-maven-plugin.version>1.3.5</plexus-maven-plugin.version>
<maven-javadoc-plugin.version>2.4</maven-javadoc-plugin.version>
<maven-jxr-plugin.version>2.1</maven-jxr-plugin.version>
<maven-changelog-plugin.version>2.1</maven-changelog-plugin.version>
<maven-surefire-report-plugin.version>2.4.3</maven-surefire-report-plugin.version>
<maven-checkstyle-plugin.version>2.1</maven-checkstyle-plugin.version>
<maven-pmd-plugin.version>2.2</maven-pmd-plugin.version>
<findbugs-maven-plugin.version>1.1.1</findbugs-maven-plugin.version>
<rat-maven-plugin.version>1.0-alpha-3</rat-maven-plugin.version>
<cobertura-maven-plugin.version>2.4</cobertura-maven-plugin.version>
</properties>
<prerequisites>
<maven>${maven.version}</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-bootstrap</artifactId>
<version>${grails-bootstrap.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.uaa</groupId>
<artifactId>org.springframework.uaa.client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-launcher</artifactId>
<version>${grails-launcher.version}</version>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-core</artifactId>
<version>${grails-core.version}</version>
<exclusions>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-web</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-web</artifactId>
<version>${grails.version}</version>
<exclusions>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-web</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-scripts</artifactId>
<version>${grails-scripts.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-tomcat</artifactId>
</exclusion>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-hibernate</artifactId>
</exclusion>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-docs</artifactId>
</exclusion>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-resources</artifactId>
<version>${grails-scripts.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-tomcat</artifactId>
<version>${grails.version}</version>
<exclusions>
<exclusion>
<groupId>org.grails</groupId>
<artifactId>grails-web</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
</exclusion>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>3.7.1</version>
<scope>runtime</scope>
</dependency>
<!-- Required by the "create-pom" goal because it contains the template
POM for a Grails project. -->
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-maven-archetype</artifactId>
<version>${grails-maven-archetype.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${maven-model.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${maven-project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>${maven-archiver.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>${plexus-utils.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>${maven-plugin-testing-harness.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>${xmlunit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>descriptor</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources/plexus</outputDirectory>
</configuration>
</execution>
<execution>
<id>merge</id>
<goals>
<goal>merge-descriptors</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-docck-plugin</artifactId>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven-project-info-reports-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>${plexus-maven-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<tags>
<tag>
<name>plexus.component</name>
<placement>a</placement>
<head>This class is a plexus component</head>
</tag>
<tag>
<name>component</name>
<placement>a</placement>
<head>This property is a component injected by plexus.</head>
</tag>
<tag>
<name>readonly</name>
<placement>a</placement>
<head>The user cannot override this property from the command
line.</head>
</tag>
<tag>
<name>description</name>
<placement>a</placement>
<head>Description :</head>
</tag>
<tag>
<name>requiresProject</name>
<placement>a</placement>
<head>This Mojo needs to be launched in a maven 2 project</head>
</tag>
<tag>
<name>goal</name>
<placement>a</placement>
<head>The goal name for the Mojo :</head>
</tag>
</tags>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven-jxr-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-changelog-plugin</artifactId>
<version>${maven-changelog-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${maven-surefire-report-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-maven-plugin.version}</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
<linkXref>true</linkXref>
<minimumTokens>20</minimumTokens>
<targetJdk>1.4</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
<version>${rat-maven-plugin.version}</version>
<configuration>
<excludes>
<exclude>**/it/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>integration-tests</id>
<activation>
<property>
<name>integration-tests</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>shitty-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>clean</goal>
<goal>install</goal>
<goal>test</goal>
</goals>
<configuration>
<projects>
<fileset>
<directory>src/it</directory>
<includes>
<include>${includeITs}</include>
</includes>
<excludes>
<exclude>${excludeITs}</exclude>
</excludes>
</fileset>
</projects>
<parallel>true</parallel>
<threadCount>2</threadCount>
<flags>-DgrailsHome-0.5.6=${grailsHome-0.5.6}
-DgrailsHome-0.6=${grailsHome-0.6}
</flags>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<includeITs>**/pom4test.xml</includeITs>
<excludeITs>**/run-webtest/pom4test.xml</excludeITs>
</properties>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk_windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>jdk_unix</id>
<activation>
<os>
<family>unix</family>
<name>!mac os x</name> <!-- needed due to MNG-4983 -->
</os>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
相关推荐
在Grails 3.2.8中使用Maven,开发者可以方便地管理Grails应用的各种依赖,包括Grails核心库、插件、第三方Java库等。Maven的POM.xml文件是项目的核心配置文件,其中包含了项目的元数据、依赖、构建指令等信息。对于...
本文主要介绍Grails和Maven集成。Grails2.1版本以后,对Maven的集成有了很大的改进。本文通过实例讲述Grails与Maven集成的各种方法,使读者可以学会使用Maven对Grails项目进行构建。Grails简介:Grails是一个开源的...
Grails还支持Ant和Maven,这意味着可以利用这两种构建工具的生态来管理Grails项目。 对象关系映射(GORM)是Grails框架中的一个重要组成部分,它为Groovy语言提供了对象持久化的支持。GORM支持基本的CRUD操作,并且...
标题 "grails-maven-archetype-2.3.4.zip" 暗示这是一个Grails框架的Maven构建模板,版本为2.3.4。Grails是基于Groovy语言的开源Web应用框架,它简化了开发过程,提供了一种更加简洁、高效的编程模型。Maven则是一个...
Maven不仅支持Java和JVM平台上的其他语言,如Scala、JRuby、Groovy和Grails,还能编译C、C++和.NET代码。此外,Maven还允许编写自定义插件来补充构建流程,可以重用Ant中的任何组件,体现了高度的灵活性和可扩展性。...
- 提供了Maven集成,使得Grails项目可以轻松发布到Maven存储库。 - 支持将Grails项目部署到Maven存储库。 - 支持插件依赖,允许在项目之间共享代码。 #### 四、命令行 **交互模式** - Grails提供了交互式命令行...
总的来说,这个Grails REST教程涵盖了项目配置、依赖管理、REST控制器的创建以及安全性的考虑。通过学习这个教程,开发者可以快速上手Grails,构建出高效、安全的RESTful API,服务于互联网应用。
Maven是Java开发中常用的项目管理工具,可以帮助开发者管理项目的构建、编译、测试、打包和部署。Maven仓库是存储Maven项目依赖项的仓库,用于存储项目需要的jar包和其他依赖项。阿里云Maven仓库镜像是阿里云提供的...
10. **Gradle构建系统**: 从3.0.x版本开始,Grails使用Gradle作为默认构建工具,替代了之前的Ant和Maven,Gradle提供了更高效、灵活的构建流程。 11. **Testing**: Grails支持单元测试、集成测试和功能测试,提供了...
3. **插件生态系统**:Grails 集成了 Maven 等插件管理系统,使得开发者可以方便地安装、升级和使用各种插件和工具。 #### 数据库配置 Grails 支持三种运行环境:开发、测试和生产,每种环境可以配置独立的数据库...
- **依赖管理**:利用Gradle或Maven进行依赖管理,确保项目的可维护性和可移植性。 - **单元测试与集成测试**:编写单元测试和集成测试来确保代码质量和功能的正确性。 - **部署策略**:采用持续集成/持续部署(CI/CD...
- **Ant和Maven**:Grails与这些主流构建工具的集成。 4. **对象关系映射(GORM)**: - **GORM快速指南**:讲解了基本的CRUD操作,即创建、读取、更新和删除数据。 - **领域建模**:GORM提供了强大的领域模型支持...
3. **安装Grails**:可以通过Maven或直接下载二进制文件的方式进行安装。 4. **配置环境变量**:将Grails的bin目录添加到系统的PATH环境变量中,以便于全局访问Grails命令行工具。 #### 五、Grails项目创建与运行 ...
3. **Maven**: Maven是另一种流行的Java项目管理和构建工具,它使用XML文件(pom.xml)来定义项目配置和依赖关系。Maven有一套标准的目录结构和生命周期,使得项目构建标准化。然而,对于大型复杂项目,Maven的灵活...