2012-04-13 1 views
3

addon vaadin 타임 라인을 사용하고 싶습니다. 따라서 gwt-maven-plugin 3.1과 내 pom.xml 파일은 다음과 같다 :아티팩트를 해결하지 못했습니다. 누락 : ---------- 1) org.codehaus.mojo : gwt-maven-plugin : jar : 1.3-SNAPSHOT

<?xml version="1.0"?> 

<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>life</groupId> 
<artifactId>life</artifactId> 
<packaging>war</packaging> 
<name>life Portlet</name> 
<version>0.0.1-SNAPSHOT</version> 
<url>http://maven.apache.org</url> 
<properties> 
    <vaadin-widgets-dir>src/main/webapp/VAADIN/widgetsets</vaadin-widgets-dir> 
</properties> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>com.liferay.maven.plugins</groupId> 
      <artifactId>liferay-maven-plugin</artifactId> 
      <version>6.1.0</version> 
      <configuration> 
       <autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir> 
       <liferayVersion>6.1.0</liferayVersion> 
       <pluginType>portlet</pluginType> 
      </configuration> 
     </plugin> 

     <plugin> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <configuration> 
       <encoding>UTF-8</encoding> 
       <source>1.5</source> 
       <target>1.5</target> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-maven-plugin</artifactId> 
      <version>1.0.1</version> 
     </plugin> 
     <!-- Compiles your custom GWT components with the GWT compiler --> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>gwt-maven-plugin</artifactId> 
      <version>2.1.0-1</version> 
      <configuration> 
       <!-- if you don't specify any modules, the plugin will find them --> 
       <!--modules> .. </modules --> 
       <webappDirectory>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</webappDirectory> 
       <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> 
       <runTarget>clean</runTarget> 
       <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp> 
       <noServer>true</noServer> 
       <port>8080</port> 
       <soyc>false</soyc> 
      </configuration> 
      <executions> 
       <execution> 
        <goals> 
         <goal>resources</goal> 
         <goal>compile</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <!-- Updates Vaadin 6.2+ widgetset definitions based on project dependencies --> 
     <plugin> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-maven-plugin</artifactId> 
      <version>1.0.1</version> 
      <executions> 
       <execution> 
        <configuration> 
         <!-- if you don't specify any modules, the plugin will find them --> 
         <!-- <modules> <module>${package}.gwt.MyWidgetSet</module> </modules> --> 
        </configuration> 
        <goals> 
         <goal>update-widgetset</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

    </plugins> 

    <pluginManagement> 
     <plugins> 
      <!--This plugin's configuration is used to store Eclipse m2e settings 
       only. It has no influence on the Maven build itself. --> 
      <plugin> 
       <groupId>org.eclipse.m2e</groupId> 
       <artifactId>lifecycle-mapping</artifactId> 
       <version>1.0.0</version> 
       <configuration> 
        <lifecycleMappingMetadata> 
         <pluginExecutions> 
          <pluginExecution> 
           <pluginExecutionFilter> 
            <groupId> 
             org.codehaus.mojo 
            </groupId> 
            <artifactId> 
             gwt-maven-plugin 
            </artifactId> 
            <versionRange> 
             [2.1.0-1,) 
            </versionRange> 
            <goals> 
             <goal>resources</goal> 
            </goals> 
           </pluginExecutionFilter> 
           <action> 
            <ignore></ignore> 
           </action> 
          </pluginExecution> 
          <pluginExecution> 
           <pluginExecutionFilter> 
            <groupId>com.vaadin</groupId> 
            <artifactId> 
             vaadin-maven-plugin 
            </artifactId> 
            <versionRange> 
             [1.0.1,) 
            </versionRange> 
            <goals> 
             <goal> 
              update-widgetset 
             </goal> 
            </goals> 
           </pluginExecutionFilter> 
           <action> 
            <ignore></ignore> 
           </action> 
          </pluginExecution> 
         </pluginExecutions> 
        </lifecycleMappingMetadata> 
       </configuration> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
</build> 
<dependencies> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>portal-service</artifactId> 
     <version>6.1.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-bridges</artifactId> 
     <version>6.1.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.vaadin.addons</groupId> 
     <artifactId>vaadin-timeline-agpl-3.0</artifactId> 
     <version>1.2.4</version> 
    </dependency> 

    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-taglib</artifactId> 
     <version>6.1.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-java</artifactId> 
     <version>6.1.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.portlet</groupId> 
     <artifactId>portlet-api</artifactId> 
     <version>2.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>servlet-api</artifactId> 
     <version>2.4</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet.jsp</groupId> 
     <artifactId>jsp-api</artifactId> 
     <version>2.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <!-- sqx --> 

    <dependency> 
     <groupId>javax.activation</groupId> 
     <artifactId>activation</artifactId> 
     <version>1.1.1</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>antlr</groupId> 
     <artifactId>antlr</artifactId> 
     <version>2.7.6</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>aopalliance</groupId> 
     <artifactId>aopalliance</artifactId> 
     <version>1.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>asm</groupId> 
     <artifactId>asm</artifactId> 
     <version>1.5.3</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>asm</groupId> 
     <artifactId>asm-attrs</artifactId> 
     <version>1.5.3</version> 
     <scope>provided</scope> 
    </dependency> 

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

    <dependency> 
     <groupId>org.aspectj</groupId> 
     <artifactId>aspectjweaver</artifactId> 
     <version>1.6.8</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>bsh</groupId> 
     <artifactId>bsh</artifactId> 
     <version>1.3.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>cglib</groupId> 
     <artifactId>cglib</artifactId> 
     <version>2.1_3</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>commons-collections</groupId> 
     <artifactId>commons-collections</artifactId> 
     <version>3.1</version> 
     <scope>provided</scope> 
    </dependency> 

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

    <dependency> 
     <groupId>commons-logging</groupId> 
     <artifactId>commons-logging</artifactId> 
     <version>1.1</version> 
    </dependency> 

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

    <dependency> 
     <groupId>dom4j</groupId> 
     <artifactId>dom4j</artifactId> 
     <version>1.6.1</version> 
    </dependency> 

    <dependency> 
     <groupId>net.sf.ehcache</groupId> 
     <artifactId>ehcache</artifactId> 
     <version>1.2.3</version> 
    </dependency> 

    <dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-core</artifactId> 
     <version>3.3.1.GA</version> 
    </dependency> 

    <dependency> 
     <groupId>hsqldb</groupId> 
     <artifactId>hsqldb</artifactId> 
     <version>1.8.0.10</version> 
    </dependency> 


    <!-- <dependency> <groupId>jboss</groupId> <artifactId>jboss-backport-concurrent</artifactId> 
     <version>2.1.0.GA</version> </dependency> --> 

    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-parent</artifactId> 
     <version>1.5.0</version> 
    </dependency> 


    <dependency> 
     <groupId>javax.jcr</groupId> 
     <artifactId>jcr</artifactId> 
     <version>1.0</version> 
    </dependency> 

    <!-- <dependency> <groupId>javax.sql</groupId> <artifactId>jdbc-stdext</artifactId> 
     <version>2.0</version> </dependency> --> 


    <dependency> 
     <groupId>jdom</groupId> 
     <artifactId>jdom</artifactId> 
     <version>1.0</version> 
    </dependency> 


    <dependency> 
     <groupId>javax.transaction</groupId> 
     <artifactId>jta</artifactId> 
     <version>1.1</version> 
    </dependency> 


    <dependency> 
     <groupId>log4j</groupId> 
     <artifactId>log4j</artifactId> 
     <version>1.2.14</version> 
    </dependency> 


    <dependency> 
     <groupId>javax.mail</groupId> 
     <artifactId>mail</artifactId> 
     <version>1.4.3</version> 
    </dependency> 


    <dependency> 
     <groupId>com.sun.portal.portletcontainer</groupId> 
     <artifactId>container</artifactId> 
     <version>1.1-m4</version> 
    </dependency> 

    <dependency> 
     <groupId>postgresql</groupId> 
     <artifactId>postgresql</artifactId> 
     <version>8.4-702.jdbc3</version> 
    </dependency> 



    <!-- sl4j-api-1.5.0 manquante --> 

    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-parent</artifactId> 
     <version>1.5.0</version> 
    </dependency> 


    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-log4j12</artifactId> 
     <version>1.5.0</version> 
    </dependency> 


    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-aop</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-aspects</artifactId> 
     <version>3.0.3.RELEASE</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-beans</artifactId> 
     <version>2.5.6</version> 
    </dependency> 


    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>2.5.6</version> 
    </dependency> 


    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context-support</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jdbc</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jms</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>javax.jms</groupId> 
     <artifactId>jms</artifactId> 
     <version>1.1</version> 
     <scope>compile</scope> 
    </dependency> 

    <!-- <dependency> <groupId>org.springmodules</groupId> <artifactId>spring-modules-jbpm31</artifactId> 
     <version>0.9</version> <scope>provided</scope> </dependency> --> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-orm</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.ws</groupId> 
     <artifactId>spring-oxm</artifactId> 
     <version>1.5.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.security</groupId> 
     <artifactId>spring-security-core</artifactId> 
     <version>2.0.4</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-tx</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-web</artifactId> 
     <version>2.5.6</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc-portlet</artifactId> 
     <version>2.5</version> 
    </dependency> 

    <dependency> 
     <groupId>com.atomikos</groupId> 
     <artifactId>transactions-hibernate3</artifactId> 
     <version>3.6.4</version> 
    </dependency> 

    <dependency> 
     <groupId>com.atomikos</groupId> 
     <artifactId>transactions-osgi</artifactId> 
     <version>3.7.0</version> 
    </dependency> 

    <dependency> 
     <groupId>com.vaadin</groupId> 
     <artifactId>vaadin</artifactId> 
     <version>6.7.0</version> 
    </dependency> 

    <dependency> 
     <groupId>com.thoughtworks.xstream</groupId> 
     <artifactId>xstream</artifactId> 
     <version>1.3.1</version> 
    </dependency> 




    <!-- this is the dependency to the "jar"-subproject --> 


    <dependency> 
     <groupId>org.codehaus.plexus</groupId> 
     <artifactId>plexus-utils</artifactId> 
     <version>1.5.9</version> 
    </dependency> 

    <dependency> 
     <groupId>com.google.gwt</groupId> 
     <artifactId>gwt-user</artifactId> 
     <version>2.1.1</version> 
     <scope>provided</scope> 
    </dependency> 

</dependencies> 



<!-- Define our plugin repositories --> 
<pluginRepositories> 
    <pluginRepository> 
     <id>Codehaus</id> 
     <name>Codehaus Maven Plugin Repository</name> 
     <url>http://repository.codehaus.org/org/codehaus/mojo</url> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
    </pluginRepository> 

    <pluginRepository> 
     <id>codehaus-snapshots</id> 
     <url>[http://nexus.codehaus.org/snapshots]</url> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
     <releases> 
      <enabled>false</enabled> 
     </releases> 
    </pluginRepository> 

</pluginRepositories> 

<repositories> 
    <repository> 
     <id>vaadin-addons</id> 
     <url>http://maven.vaadin.com/vaadin-addons</url> 
    </repository> 

    <repository> 
     <id>demoiselle.sourceforge.net</id> 
     <name>Demoiselle Maven Repository</name> 
     <url>http://demoiselle.sourceforge.net/repository/release</url> 
    </repository> 

</repositories> 

그러나 나는 내 프로젝트를 빌드 할 mvn clean install을 수행 할 때, 콘솔은 나에게이 오류 보여줍니다

[INFO] Unable to find resource 'org.codehaus.mojo:gwt-maven-plugin:jar:1.3-SNAPSHOT' in repository demoiselle.sourceforge.net (http://demoiselle.sourceforge.net/repository/release) 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Failed to resolve artifact. 

Missing: 
---------- 
1) org.codehaus.mojo:gwt-maven-plugin:jar:1.3-SNAPSHOT 

Try downloading the file manually from the project website. 

Then, install it using the command: 
    mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=gwt-maven-plugin - Dversion=1.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file 

Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=org.codehaus.mojo -DartifactId=gwt-maven-plugin -Dversion=1.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 

Path to dependency: 
1) com.vaadin:vaadin-maven-plugin:maven-plugin:1.0.1 
2) org.codehaus.mojo:gwt-maven-plugin:jar:1.3-SNAPSHOT 

---------- 
1 required artifact is missing. 

for artifact: 
com.vaadin:vaadin-maven-plugin:maven-plugin:1.0.1 

from the specified remote repositories: 
    demoiselle.sourceforge.net (http://demoiselle.sourceforge.net/repository/release), 
    central (http://repo1.maven.org/maven2), 
    Codehaus (http://repository.codehaus.org/org/codehaus/mojo), 
    codehaus-snapshots ([http://nexus.codehaus.org/snapshots]), 
    vaadin-snapshots (http://oss.sonatype.org/content/repositories/vaadin-snapshots/), 
    vaadin-releases (http://oss.sonatype.org/content/repositories/vaadin-releases/), 
    vaadin-addons (http://maven.vaadin.com/vaadin-addons) 

가 어떻게이 문제를 해결 할를?

답변

0

이후 GWT-받는다는 - 플러그인 버전 2.4.0까지의이 특정 스냅 샷이 더 이상 존재하지 않음을 확실히 가능 ...입니다

비슷한에 종속 버전을 잠금 시도, 즉 1.3.1 :

<dependencyManagement> 
    <dependency> 
     <artifactId>gwt-maven-plugin</artifactId> 
     <groupId>org.codehaus.mojo</groupId> 
     <version>1.3.1</version> 
    </dependency> 
</dependencyManagement> 
0

gwt-maven-plugin은 빌드 영역 대신 pluginManagement 블록 내에서 정의해야합니다. 멀리 내가 gwt - 메이븐 - 플러그인 다른 그렇지 않으면 당신의 출력을 이해하지 못하는 것으로 사용됩니다 이해합니다. 또한 플러그인의 SNAPSHOT 릴리스에 의존하지 마십시오. 빌드에서 현실감있는 결과를 얻으려면 플러그인 버전을 수정하십시오. 그리고 마지막으로 저장소 관리자 (Artifactory, Archive, Nexus)를 사용하여 저장소의 저장소 정의를 제거하십시오. 인생을 더 가깝게 만듭니다.

1

이전 답변 관련 : 종속성은 부모 POM에 정의되어 있지 않은 한 pluginManagement 내에 있지 않습니다. Using Vaadin with Maven 문서에서도 pluginManagement과 같은 것은 없습니다.

꽤 오래된 버전의 Vaadin (6.7.0)을 사용하고 있으므로 이전 플러그인이 작동하지 않습니다. 다음을 시도해보십시오

  • 가장 중요한 것은 다음의 경우 vaadin-maven-plugingwt-maven-plugin 버전 gwt-user 종속 버전 변경
  • 2.3.0-1로 변경
  • 1.0.2에 2.3.0

변경 위의 수정 사항이 작동하지 않으면 다음을 호출하여 새로운 Vaadin 프로젝트를 작성하십시오.

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-clean -DarchetypeVersion=LATEST -DgroupId=com.example -DartifactId=exampleArtifact -Dversion=1.0 -Dpackaging=war 
을 입력하고 POM 구조와 플러그인 버전을 비교하십시오.

+0

그냥이 문제가 있었는데 더 이상 존재하지 않는 다른 플러그인의 스냅 샷 버전을 나타내는'vaadin-maven-plugin' 1.0.1을 사용하고있었습니다. 버전 번호를 1.0.2로 변경하면 문제가 해결되었습니다. – Draken

관련 문제