2012-02-03 1 views
0

は、私はJavaのMavenプロジェクトでは、JavaとGroovyの使用しようとしているこんにちは、私はよくそれを実行するために必要なすべての成果物やプラグインを提供すると思いますが、ここで私のポンポンであります私はこのプロジェクトに触発され、gmaven 1.4、グルーヴィー2.0とJava 7での作業ポンポンを取得する方法を発見した。最後trace正しいmaven groovy gmaven pomの設定は何ですか?ここで構築しようとした後にキャッチされた例外さ <a href="http://pastebin.com/0mcUmbES" rel="nofollow" title="pom">pom content</a> と:

+0

それはしばらくしているが、GMavenのスポックの使用量は、いつも私が行く私のGroovyのものを得る助け - > http://code.google.com/p/spock/wiki/HelloSpockPom –

答えて

2

フルスタックトレースを取得するには、-Xオプションを有効に原因 は、私はそれがペーストビンにリンク"primefaces-groovy-cassandra"

ここには、戦争タイプのアプリケーションの単純なポン:

`<?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>office</groupId> 
<artifactId>gmOffice</artifactId> 
<name>gmOffice</name> 
<version>0.0.1</version> 
<packaging>war</packaging> 

<properties> 
    <!-- Configuration --> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <java.version>1.7</java.version> 

    <!-- Dependencies --> 
    <javax.servlet.api.version>3.0.1</javax.servlet.api.version> 
    <primefaces.version>3.2</primefaces.version> 
    <myfaces.version>2.1.7</myfaces.version> 


    <!-- Maven plugins --> 
    <maven.compiler.version>2.4</maven.compiler.version> 
    <maven.enforcer.version>1.0.1</maven.enforcer.version> 
    <maven.war.version>2.2</maven.war.version> 
    <maven.gmaven.version>1.4</maven.gmaven.version> 
    <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server> 
    <slf4j.version>1.6.1</slf4j.version> 
</properties> 

<repositories> 
    <repository> 
     <id>sonatype-releases</id> 
     <name>Sonatype Releases Repository</name> 
     <url>http://oss.sonatype.org/content/repositories/releases/</url> 
    </repository> 
    <repository> 
     <id>primefaces-releases</id> 
     <name>PrimeFaces Releases Repository</name> 
     <url>http://repository.primefaces.org</url> 
    </repository> 
</repositories> 

<prerequisites> 
    <maven>3.0.0</maven> 
</prerequisites> 

<dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.10</version> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.primefaces</groupId> 
     <artifactId>primefaces</artifactId> 
     <version>${primefaces.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.codehaus.groovy</groupId> 
     <artifactId>groovy-all</artifactId> 
     <version>2.0.0</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.19</version> 
    </dependency> 
    <dependency> 
     <groupId>com.h2database</groupId> 
     <artifactId>h2</artifactId> 
     <version>1.3.164</version> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-validator</artifactId> 
     <version>4.2.0.Final</version> 
    </dependency> 

    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-entitymanager</artifactId> 
     <version>4.1.2</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.commons</groupId> 
     <artifactId>commons-lang3</artifactId> 
     <version>3.1</version> 
    </dependency> 




    <dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-api</artifactId> 
     <version>2.1.7</version> 
    </dependency> 
    <dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-impl</artifactId> 
     <version>2.1.7</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>log4j-over-slf4j</artifactId> 
     <version>${slf4j.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-simple</artifactId> 
     <version>${slf4j.version}</version> 
     <scope>test</scope> 
    </dependency> 

</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>${maven.compiler.version}</version> 
      <configuration> 
       <source>${java.version}</source> 
       <target>${java.version}</target> 
       <showDeprecation>true</showDeprecation> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-enforcer-plugin</artifactId> 
      <version>${maven.enforcer.version}</version> 
      <executions> 
       <execution> 
        <id>enforce-versions</id> 
        <goals> 
         <goal>enforce</goal> 
        </goals> 
        <configuration> 
         <rules> 
          <requireMavenVersion> 
           <version>[3.0.0,)</version> 
          </requireMavenVersion> 
          <requireJavaVersion> 
           <version>[1.6.0,)</version> 
          </requireJavaVersion> 
         </rules> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.gmaven</groupId> 
      <artifactId>gmaven-plugin</artifactId> 
      <version>${maven.gmaven.version}</version> 
      <configuration> 
       <source>src/main/groovy</source> 
       <providerSelection>2.0</providerSelection> 
      </configuration> 
      <dependencies> 
       <dependency> 
        <groupId>org.codehaus.groovy</groupId> 
        <artifactId>groovy-all</artifactId> 
        <version>2.0.0</version> 
       </dependency> 
      </dependencies> 
      <executions> 
       <execution> 
        <goals> 
         <goal>generateStubs</goal> 
         <goal>compile</goal> 
         <goal>generateTestStubs</goal> 
         <goal>testCompile</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-checkstyle-plugin</artifactId> 
      <version>2.9.1</version> 
      <configuration> 
       <configLocation>config/sun_checks.xml</configLocation> 
      </configuration> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-war-plugin</artifactId> 
      <version>${maven.war.version}</version> 
      <configuration> 
       <archive> 
        <manifest> 
         <addDefaultImplementationEntries>true</addDefaultImplementationEntries> 
        </manifest> 
        <manifestEntries> 
         <Implementation-Version>${project.version}</Implementation-Version> 
         <Implementation-Timestamp>${maven.build.timestamp}</Implementation-Timestamp> 
        </manifestEntries> 
       </archive> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

関連する問題

 関連する問題