2013-07-13 3 views
1

Привет, У меня проблема с maven. Я хочу, чтобы запустить мое приложение, но когда я печатаю «чистая установку причала: запустить» Я получаю эту ошибку:Не удалось разрешить зависимости для проекта из рабочей области

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
    SLF4J: Defaulting to no-operation (NOP) logger implementation 
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 
    [INFO] Scanning for projects... 
    [INFO]                   
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Building frontend 0.0.1-SNAPSHOT 
    [INFO] ------------------------------------------------------------------------ 
    [WARNING] The POM for laud.b2b:logic:jar:0.0.1-SNAPSHOT is missing, no dependency information available 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] BUILD FAILURE 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 1.585s 
    [INFO] Finished at: Sat Jul 13 20:17:27 CEST 2013 
    [INFO] Final Memory: 6M/15M 
    [INFO] ------------------------------------------------------------------------ 
    [ERROR] Failed to execute goal on project Frontend: Could not resolve dependencies for project laud.b2b:Frontend:war:0.0.1-SNAPSHOT: Failure to find laud.b2b:logic:jar:0.0.1-SNAPSHOT in http://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 из проекта Frontend:

<?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> 
    <parent> 
     <artifactId>laud.b2b-root</artifactId> 
     <groupId>laud.b2b</groupId> 
     <version>0.0.1-SNAPSHOT</version> 
    </parent> 
    <groupId>laud.b2b</groupId> 
    <artifactId>Frontend</artifactId> 
    <packaging>war</packaging> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>frontend</name> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <vaadin.version>7.1.0</vaadin.version> 
     <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version> 
     <org.springframework.version>3.0.5.RELEASE</org.springframework.version> 
    </properties> 
    <repositories> 
     <repository> 
      <id>vaadin-addons</id> 
      <url>http://maven.vaadin.com/vaadin-addons</url> 
     </repository> 
     <repository> 
      <id>vaadin-snapshots</id> 
      <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url> 
      <releases> 
       <enabled>false</enabled> 
      </releases> 
      <snapshots> 
      </snapshots> 
     </repository> 
    </repositories> 
    <pluginRepositories> 
     <pluginRepository> 
      <id>vaadin-snapshots</id> 
      <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url> 
      <releases> 
       <enabled>false</enabled> 
      </releases> 
      <snapshots> 
      </snapshots> 
     </pluginRepository> 
    </pluginRepositories> 
    <dependencies> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-server</artifactId> 
      <version>${vaadin.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-client-compiled</artifactId> 
      <version>${vaadin.version}</version> 
     </dependency> 
     <!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory). 
      For widgetset compilation, vaadin-client-compiler is automatically added 
      on the compilation classpath by vaadin-maven-plugin so normally there is 
      no need for an explicit dependency. --> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-client-compiler</artifactId> 
      <version>${vaadin.version}</version> 
      <scope>provided</scope> 
     </dependency> 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-client</artifactId> 
      <version>${vaadin.version}</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-push</artifactId> 
      <version>${vaadin.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>laud.b2b</groupId> 
      <artifactId>logic</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-themes</artifactId> 
      <version>${vaadin.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>ru.xpoft.vaadin</groupId> 
      <artifactId>spring-vaadin-integration</artifactId> 
      <version>2.0.1</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>javax.servlet-api</artifactId> 
      <version>3.0.1</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-beans</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-core</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-config</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-web</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-context</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>1.6.6</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      <version>1.6.6</version> 
     </dependency> 
     <dependency> 
      <groupId>log4j</groupId> 
      <artifactId>log4j</artifactId> 
      <version>1.2.16</version> 
     </dependency> 

    </dependencies> 


    <profiles> 
     <profile> 
      <id>compile-widgetset</id> 
      <build> 
       <plugins> 
        <plugin> 
         <groupId>org.apache.maven.plugins</groupId> 
         <artifactId>maven-compiler-plugin</artifactId> 
         <configuration> 
          <source>1.6</source> 
          <target>1.6</target> 
         </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>org.apache.maven.plugins</groupId> 
         <artifactId>maven-war-plugin</artifactId> 
         <version>2.2</version> 
         <configuration> 
          <failOnMissingWebXml>false</failOnMissingWebXml> 
         </configuration> 
        </plugin> 
        <plugin> 
         <groupId>com.vaadin</groupId> 
         <artifactId>vaadin-maven-plugin</artifactId> 
         <version>${vaadin.plugin.version}</version> 
         <configuration> 
          <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> 
          <!-- <runTarget>mobilemail</runTarget> --> 
          <!-- 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}/src/main/webapp/VAADIN/widgetsets</hostedWebapp> 
          <noServer>true</noServer> 
          <!-- Remove draftCompile when project is ready --> 
          <draftCompile>false</draftCompile> 
          <compileReport>true</compileReport> 
          <style>OBF</style> 
          <strict>true</strict> 
          <runTarget>http://localhost:8080/</runTarget> 
         </configuration> 
         <executions> 
          <execution> 
           <configuration></configuration> 
           <goals> 
            <goal>clean</goal> 
            <goal>resources</goal> 
            <goal>update-theme</goal> 
            <goal>update-widgetset</goal> 
            <goal>compile-theme</goal> 
            <goal>compile</goal> 
           </goals> 
          </execution> 
         </executions> 
        </plugin> 
       </plugins> 
      </build> 
     </profile> 
    </profiles> 

    <build> 
     <plugins> 
      <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> 
     </plugins> 
     <pluginManagement> 
      <plugins> 
       <plugin> 
        <groupId>org.mortbay.jetty</groupId> 
        <artifactId>jetty-maven-plugin</artifactId> 
        <configuration> 
         <scanIntervalSeconds>3</scanIntervalSeconds> 
        </configuration> 
       </plugin> 
       <!--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>com.vaadin</groupId> 
             <artifactId>vaadin-maven-plugin</artifactId> 
             <versionRange>[7.1.0,)</versionRange> 
             <goals> 
              <goal>resources</goal> 
              <goal>update-widgetset</goal> 
              <goal>compile</goal> 
             </goals> 
            </pluginExecutionFilter> 
            <action> 
             <ignore></ignore> 
            </action> 
           </pluginExecution> 
          </pluginExecutions> 
         </lifecycleMappingMetadata> 
        </configuration> 
       </plugin> 
      </plugins> 
     </pluginManagement> 
    </build> 
</project> 

(AD2)

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
SLF4J: Defaulting to no-operation (NOP) logger implementation 
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 
[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building frontend 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ Frontend --- 
[INFO] Deleting C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\target 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ Frontend --- 
[debug] execute contextualize 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\src\main\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Frontend --- 
[INFO] Compiling 2 source files to C:\Users\mateu\git\LPMavenProblem\laud\laud.b2b-root\Frontend\target\classes 
[INFO] ------------------------------------------------------------- 
[ERROR] COMPILATION ERROR : 
[INFO] ------------------------------------------------------------- 
[ERROR] Unable to locate the Javac Compiler in: 
    C:\Program Files (x86)\Java\jre7\..\lib\tools.jar 
Please ensure you are using JDK 1.4 or above and 
not a JRE (the com.sun.tools.javac.Main class is required). 
In most cases you can change the location of your Java 
installation by setting the JAVA_HOME environment variable. 
[INFO] 1 error 
[INFO] ------------------------------------------------------------- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.744s 
[INFO] Finished at: Sat Jul 13 21:13:52 CEST 2013 
[INFO] Final Memory: 8M/19M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project Frontend: Compilation failure 
[ERROR] Unable to locate the Javac Compiler in: 
[ERROR] C:\Program Files (x86)\Java\jre7\..\lib\tools.jar 
[ERROR] Please ensure you are using JDK 1.4 or above and 
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required). 
[ERROR] In most cases you can change the location of your Java 
[ERROR] installation by setting the JAVA_HOME environment variable. 
[ERROR] -> [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/MojoFailureException 
+0

Вставить в вас 'pom.xml'. –

+0

@ Grzegorz- Теперь мой pom-файл находится под вопросом –

+0

Вы сделали «mvn clean install» для логического проекта? Он не находит, что Jar в вашем местном репо. –

ответ

4

Скорее всего, вам убежище» t установить все зависимости, необходимые для создания артефакта frontend. Если frontend зависит от laud.b2b.logic, вы должны сначала установить этот артефакт на локальное хранилище, прежде чем вы можете создать артефакты, которые зависят от него, то есть:

  1. Перейти к дереву logic источника и выполнить mvn install
  2. Затем перейдите к frontend и попробовать еще раз процесс сборки

Может быть, это хорошая идея, чтобы создать корень pom.xml для всех суб-проектов и определить их как модули, а затем начать процесс сборки из нового корневого проекта. Maven будет компилировать и устанавливать их в правильном порядке.

Ссылки:

+0

Теперь у меня есть ошибка, указанная в моем вопросе (AD2) –

+0

Установили ли вы ** JDK ** 7? Кажется, что в вашей системе присутствует только JRE. – nif

+0

Я установил JRE 1.7 и JRE 1.7 –