2011-02-16 13 views
1

에서 Grails의 프로젝트를 생성 : 나는 오류를 얻을메이븐 원형

mvn archetype:generate -DarchetypeGroupId=org.grails 
-DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.3.6 
-DgroupId=example -DartifactId=my-app 
-DarchetypeRepository=http://repo1.maven.org/maven2 

[ERROR]을 목표 을 실행하지 못했습니다

org.apache.maven.plugins : maven-archetype-plugin : 2.0 : 프로젝트에서 (default-cli)을 생성하십시오. standalone-pom : 원하는 아키 타입 이 존재하지 않습니다. (org.grails : grails-maven-archetype : 1.3 .6)

the repository과 1.3.6 버전이 존재합니다. 또한 위의 명령에서 1.3.6을 1.3.2로 바꾸면 작동합니다.

답변

1

실행 mvn archetype:generate (대화 형 모드) 선택 옵션은 286

286 : 원격 -> Grails의-받는다는 - 원형 (. Grails의 프로젝트에 메이븐 원형) 일반적으로

, 나는 방법이 더 문제를 했어 Maven 아키 타입을 가진 솔루션보다 : S.

0

특정 구성에서 어떤 일이 벌어지는 지 모르겠지만 거기에 나열된 정확한 명령을 실행하여 성공적으로 작성했습니다. 필자는이 문제가 의존성을 지정하는 방법에 대한 이전 질문과 관련이 있다고 생각하기 때문에 pom 파일의 내용에 대해 실제로 생각하는 것보다는 아키타 입을 어떻게 처리하는지 궁금해합니다. pom.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>example</groupId> 
    <artifactId>my-app</artifactId> 
    <packaging>war</packaging> 
    <version>1.0-SNAPSHOT</version> 

    <name>A custom grails project</name> 
    <description>A custom grails project</description> 
    <url>http://www.myorganization.org</url> 

    <properties> 
    <grails.version>1.3.6</grails.version> 
    </properties> 

    <dependencies> 
    <dependency> 
     <groupId>org.grails</groupId> 
     <artifactId>grails-bootstrap</artifactId> 
     <version>${grails.version}</version> 
     <exclusions> 
     <exclusion> 
      <groupId>org.codehaus.gpars</groupId> 
      <artifactId>gpars</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.codehaus.gant</groupId> 
      <artifactId>gant_groovy1.7</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.gparallelizer</groupId> 
      <artifactId>GParallelizer</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.codehaus.gant</groupId> 
      <artifactId>gant_groovy1.6</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant-launcher</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ivy</groupId> 
      <artifactId>ivy</artifactId> 
     </exclusion> 
     </exclusions> 
    </dependency> 

    <dependency> 
     <groupId>org.grails</groupId> 
     <artifactId>grails-crud</artifactId> 
     <version>${grails.version}</version> 
     <exclusions> 
     <exclusion> 
      <groupId>org.grails</groupId> 
      <artifactId>grails-docs</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant-launcher</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-test</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>radeox</groupId> 
      <artifactId>radeox</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>commons-digester</groupId> 
      <artifactId>commons-digester</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>javax.persistence</groupId> 
      <artifactId>persistence-api</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
     </exclusion> 
     </exclusions> 
    </dependency> 

    <dependency> 
     <groupId>org.grails</groupId> 
     <artifactId>grails-gorm</artifactId> 
     <version>${grails.version}</version> 
     <exclusions> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.apache.ant</groupId> 
      <artifactId>ant-launcher</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>commons-digester</groupId> 
      <artifactId>commons-digester</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-annotations</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-commons-annotations</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>antlr</groupId> 
      <artifactId>antlr</artifactId> 
     </exclusion> 
     </exclusions> 
    </dependency> 

    <dependency> 
     <groupId>org.grails</groupId> 
     <artifactId>grails-test</artifactId> 
     <version>${grails.version}</version> 
     <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>jstl</artifactId> 
     <version>1.1.2</version> 
    </dependency> 

    <dependency> 
     <groupId>taglibs</groupId> 
     <artifactId>standard</artifactId> 
     <version>1.1.2</version> 
    </dependency> 

    <!-- Grails defaults to Ehache for the second-level Hibernate cache. --> 
    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-ehcache</artifactId> 
     <version>3.3.1.GA</version> 
     <exclusions> 
      <!-- See http://www.slf4j.org/faq.html#IllegalAccessError --> 
      <exclusion> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      </exclusion> 

      <!-- We are pulling in ehcache-core below --> 
      <exclusion> 
      <groupId>net.sf.ehcache</groupId> 
      <artifactId>ehcache</artifactId> 
      </exclusion> 
     </exclusions> 
    </dependency> 

    <dependency> 
     <groupId>net.sf.ehcache</groupId> 
     <artifactId>ehcache-core</artifactId> 
     <version>1.7.1</version> 
     <exclusions> 
     <exclusion> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
     </exclusion> 
     </exclusions> 
    </dependency> 

    <!-- For ease of development and testing, we include the HSQLDB database. --> 
    <dependency> 
     <groupId>hsqldb</groupId> 
     <artifactId>hsqldb</artifactId> 
     <version>1.8.0.10</version> 
    </dependency> 

    <!-- Use Log4J for logging. This artifact also pulls in the Log4J JAR. --> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-api</artifactId> 
     <version>1.5.8</version> 
     <scope>runtime</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-log4j12</artifactId> 
     <version>1.5.8</version> 
     <scope>runtime</scope> 
    </dependency> 

    <!-- Needed in the case of AOP usage --> 
    <dependency> 
     <groupId>org.aspectj</groupId> 
     <artifactId>aspectjweaver</artifactId> 
     <version>1.6.8</version> 
    </dependency> 

    <dependency> 
     <groupId>org.aspectj</groupId> 
     <artifactId>aspectjrt</artifactId> 
     <version>1.6.8</version> 
    </dependency> 

    <dependency> 
     <groupId>commons-codec</groupId> 
     <artifactId>commons-codec</artifactId> 
     <version>1.3</version> 
    </dependency> 

    <dependency> 
     <groupId>commons-collections</groupId> 
     <artifactId>commons-collections</artifactId> 
     <version>3.2.1</version> 
    </dependency> 

    <dependency> 
     <groupId>commons-pool</groupId> 
     <artifactId>commons-pool</artifactId> 
     <version>1.5.3</version> 
    </dependency> 

    </dependencies> 

    <dependencyManagement> 
    <dependencies> 
     <dependency> 
     <groupId>log4j</groupId> 
     <artifactId>log4j</artifactId> 
     <version>1.2.16</version> 
     <scope>runtime</scope> 
     </dependency> 
    </dependencies> 
    </dependencyManagement> 

    <repositories> 
     <!-- Required to get hold of javassist:javassist --> 
    <repository> 
     <id>jboss.org</id> 
     <name>jboss.org</name> 
     <url>http://repository.jboss.com/maven2/</url> 
    </repository> 
    </repositories> 

    <build> 
    <pluginManagement /> 

    <plugins> 
     <plugin> 
     <groupId>org.grails</groupId> 
     <artifactId>grails-maven-plugin</artifactId> 
     <version>${grails.version}</version> 
     <extensions>true</extensions> 
     <executions> 
      <execution> 
      <goals> 
       <goal>init</goal> 
       <goal>maven-clean</goal> 
       <goal>validate</goal> 
       <goal>config-directories</goal> 
       <goal>maven-compile</goal> 
       <goal>maven-test</goal> 
       <goal>maven-war</goal> 
       <goal>maven-functional-test</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 

     <plugin> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <configuration> 
      <source>1.5</source> 
      <target>1.5</target> 
     </configuration> 
     </plugin> 
    </plugins> 
    </build> 

    <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> 
0

grails 2의 새로운 maven archetype이 곧 제공 될 예정입니다. MAVEN-162

을 참조하십시오.