2015-07-10 124 views
0

我試圖運行vaadin-charts-demo。無法解決依賴關係,找不到瓶子

類似的問題,這樣的: Maven Could not resolve dependencies, artifacts could not be resolved

[INFO] <<< vaadin-maven-plugin:7.4.6:compile (default-cli) < process-resources @ vaadin-charts-demo <<< 
[WARNING] The POM for com.vaadin.demo:vaadin-charts-examples:jar:3.0-SNAPSHOT is missing, no dependency information available 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.414 s 
[INFO] Finished at: 2015-07-09T20:57:33-05:00 
[INFO] Final Memory: 12M/225M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project vaadin-charts-demo: Could not resolve dependencies for project com.vaadin.demo:vaadin-charts-demo:war:3.0-SNAPSHOT: Failure to find com.vaadin.demo:vaadin-charts-examples:jar:3.0-SNAPSHOT in https://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

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

<parent> 
    <groupId>com.vaadin.addon</groupId> 
    <artifactId>vaadin-charts-parent</artifactId> 
    <version>3.0-SNAPSHOT</version> 
</parent> 

<modelVersion>4.0.0</modelVersion> 

<groupId>com.vaadin.demo</groupId> 
<artifactId>vaadin-charts-demo</artifactId> 
<packaging>war</packaging> 

<name>Vaadin Charts Demo</name> 

<dependencies> 

    <dependency> 
     <groupId>com.vaadin.addon</groupId> 
     <artifactId>vaadin-charts</artifactId> 
     <version>${project.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>com.vaadin.demo</groupId> 
     <artifactId>vaadin-charts-examples</artifactId> 
     <version>${project.version}</version> 
    </dependency> 

    <!-- Vaadin --> 
    <dependency> 
     <groupId>com.vaadin</groupId> 
     <artifactId>vaadin-server</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>com.vaadin</groupId> 
     <artifactId>vaadin-themes</artifactId> 
    </dependency> 

    <dependency> 
     <groupId>org.reflections</groupId> 
     <artifactId>reflections</artifactId> 
     <version>0.9.8</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>servlet-api</artifactId> 
     <version>2.4</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>commons-io</groupId> 
     <artifactId>commons-io</artifactId> 
     <version>2.4</version> 
    </dependency> 

    <dependency> 
     <groupId>org.eclipse.jetty</groupId> 
     <artifactId>jetty-webapp</artifactId> 
     <version>8.1.13.v20130916</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.vaadin.addons</groupId> 
     <artifactId>googleanalyticstracker</artifactId> 
     <version>2.1.0</version> 
    </dependency> 

    <dependency> 
     <groupId>com.vaadin</groupId> 
     <artifactId>vaadin-maven-plugin</artifactId> 
     <version>7.6.0.alpha2</version> 
    </dependency> 

</dependencies> 

<build> 
    <resources> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>true</filtering> 
      <includes> 
       <include>**/config.properties</include> 
      </includes> 
     </resource> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>false</filtering> 
      <excludes> 
       <exclude>**/config.properties</exclude> 
      </excludes> 
     </resource> 
    </resources> 
    <plugins> 
     <plugin> 
      <artifactId>maven-deploy-plugin</artifactId> 
      <configuration> 
       <skip>true</skip> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-war-plugin</artifactId> 
      <version>2.4</version> 
      <configuration> 
       <packagingExcludes>**/gwt-unitCache/*,**/widgetsets/WEB-INF/**/*</packagingExcludes> 
      </configuration> 
     </plugin> 

     <!-- As we are doing "inplace" GWT compilation, ensure the widgetset --> 
     <!-- directory is cleaned properly --> 
     <plugin> 
      <artifactId>maven-clean-plugin</artifactId> 
      <version>2.4.1</version> 
      <configuration> 
       <filesets> 
        <fileset> 
         <directory>src/main/webapp/VAADIN/widgetsets</directory> 
        </fileset> 
       </filesets> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-maven-plugin</artifactId> 
      <configuration> 
       <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> 
       <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. 
        This way compatible with Vaadin eclipse plugin. --> 
       <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets 
       </webappDirectory> 
       <hostedWebapp>${basedir}/target/ignore/VAADIN/widgetsets 
       </hostedWebapp> 
       <noServer>true</noServer> 
       <!-- Remove draftCompile when project is ready --> 
       <draftCompile>false</draftCompile> 
       <compileReport>true</compileReport> 
       <!-- <style>PRETTY</style> --> 
       <strict>true</strict> 
       <runTarget>http://localhost:8080/</runTarget> 
      </configuration> 
      <executions> 
       <execution> 
        <goals> 
         <goal>resources</goal> 
         <goal>update-widgetset</goal> 
        </goals> 
       </execution> 
       <execution> 
        <id>compile-widgetset-on-compile</id> 
        <phase>compile</phase> 
        <goals> 
         <goal>compile</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.mortbay.jetty</groupId> 
      <artifactId>jetty-maven-plugin</artifactId> 
     </plugin> 
    </plugins> 
</build> 

試着用搜索引擎vaadin,圖表,示例和圖表,演示行家,倉庫等但是還沒有找到解決辦法。這怎麼解決?

[編輯] 該項目從這裏進口: https://github.com/vaadin/charts/tree/7a55e8dab5b9941a05603c2624a576866e86045d

按照這些指示: https://github.com/vaadin/charts/blob/7a55e8dab5b9941a05603c2624a576866e86045d/DevInstructions.md

安裝後,無法編譯部件

的說明適用於露娜,我正在使用火星,不知道這是如何影響的。

+0

您是如何最初設置項目的?你從哪裏得到信息來添加這種依賴關係?爲什麼用_eclipse標記問題?_在問題中沒有提及它。 –

+0

我添加了編輯 - 當我嘗試編譯小部件時出現警告/錯誤 – matcha

回答

0

你嘗試添加該存儲庫Vaadin插件:

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

參考:http://vaadin.com/directory/help/using-vaadin-add-ons –

+0

是的,它沒有奏效。它還有另一個項目文件夾作爲其依賴項之一,而且它的存儲庫也是這樣。這是否意味着它們是連通的/相關的/就像它在當前的項目中一樣? – matcha

+0

@newMAD顯然,你仍然需要添加所有的依賴關係到兩個poms。檢查[此鏈接](http://www.avajava.com/tutorials/lessons/how-do-i-add-a-project-as-a-dependency-of-another-project.html?page=1)通過maven依賴項鍊接項目。 – tk12

0

如果你剛剛建成vaadin-charts-demo到目前爲止建立vaadin-charts-parent之前,也是如此。

The parent includes vaadin-charts-examples as <module>.所以,如果你不建立parent(或examples明確地)至少一次,沒有一個模塊的文物可在Eclipse工作區和本地Maven回購從那裏得到解決。

請記住,Aggregation and Inheritance是不同類型的POM Relationships

對於從Eclipse工作區解決依賴看到< 您的Eclipse Maven項目> → 屬性Maven的從工作區項目→ [✔] 解決依賴關係。

相關問題