2012-09-18 20 views
1

我在Eclipse中的Maven web項目(春季工具套件要準確),以及由於某種原因,我的Maven依賴不WEB-INF/lib中結束,所以我得到各種運行時錯誤。這是上週工作,我不知道什麼行動導致它停止工作。項目屬性 - >部署大會展示Maven依賴部署到WEB-INF/lib和我試圖做的Maven - >更新項目,重新啓動IDE,清潔/安裝等,這是我的POM:Maven的依賴不會被複制到WEB-INF/lib目錄中月食

<?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>com.ks</groupId> 
    <artifactId>kdweb</artifactId> 
    <name>kdweb</name> 
    <packaging>war</packaging> 
    <version>1.0.0-BUILD-SNAPSHOT</version> 
    <properties> 
     <org.springframework-version>3.1.2.RELEASE</org.springframework-version> 
     <org.slf4j-version>1.5.10</org.slf4j-version> 
    </properties> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-context</artifactId> 
      <version>${org.springframework-version}</version> 
      <exclusions> 
       <exclusion> 
        <groupId>commons-logging</groupId> 
        <artifactId>commons-logging</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-webmvc</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks</groupId> 
      <artifactId>acommons</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks</groupId> 
      <artifactId>aggregation-common</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>jstl</artifactId> 
      <version>1.2</version> 
     </dependency> 
     <dependency> 
      <groupId>commons-dbcp</groupId> 
      <artifactId>commons-dbcp</artifactId> 
      <version>1.2.2</version> 
     </dependency> 
     <dependency> 
      <groupId>commons-pool</groupId> 
      <artifactId>commons-pool</artifactId> 
      <version>1.6</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.jackson</groupId> 
      <artifactId>jackson-core-asl</artifactId> 
      <version>1.9.9</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.jackson</groupId> 
      <artifactId>jackson-mapper-asl</artifactId> 
      <version>1.9.9</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-asm</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-beans</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-core</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-expression</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jdbc</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-tx</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>commons-digester</groupId> 
      <artifactId>commons-digester</artifactId> 
      <version>2.1</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>javax.servlet-api</artifactId> 
      <version>3.0.1</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.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      <version>${org.slf4j-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>${org.slf4j-version}</version> 
      <scope>runtime</scope> 
     </dependency> 
     <dependency> 
      <groupId>log4j</groupId> 
      <artifactId>log4j</artifactId> 
      <version>1.2.15</version> 
      <exclusions> 
       <exclusion> 
        <groupId>javax.mail</groupId> 
        <artifactId>mail</artifactId> 
       </exclusion> 
       <exclusion> 
        <groupId>javax.jms</groupId> 
        <artifactId>jms</artifactId> 
       </exclusion> 
       <exclusion> 
        <groupId>com.sun.jdmk</groupId> 
        <artifactId>jmxtools</artifactId> 
       </exclusion> 
       <exclusion> 
        <groupId>com.sun.jmx</groupId> 
        <artifactId>jmxri</artifactId> 
       </exclusion> 
      </exclusions> 
      <scope>runtime</scope> 
     </dependency> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.7</version> 
      <scope>test</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.ks.thirdparty</groupId> 
      <artifactId>jconn</artifactId> 
      <version>3</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks</groupId> 
      <artifactId>framework-common</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks.thirdparty</groupId> 
      <artifactId>ojdbc6_g</artifactId> 
      <version>1.0</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks</groupId> 
      <artifactId>abizcommons</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
     <dependency> 
      <groupId>com.ks</groupId> 
      <artifactId>apods-client</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
     </dependency> 
    </dependencies> 
    <build> 
     <plugins> 
      <plugin> 
       <artifactId>maven-eclipse-plugin</artifactId> 
       <version>2.9</version> 
       <configuration> 
        <additionalProjectnatures> 
         <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature> 
        </additionalProjectnatures> 
        <additionalBuildcommands> 
         <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand> 
        </additionalBuildcommands> 
        <downloadSources>true</downloadSources> 
        <downloadJavadocs>true</downloadJavadocs> 
       </configuration> 
      </plugin> 
      <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> 
        <compilerArgument>-Xlint:all</compilerArgument> 
        <showWarnings>true</showWarnings> 
        <showDeprecation>true</showDeprecation> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>exec-maven-plugin</artifactId> 
       <version>1.2.1</version> 
       <configuration> 
        <mainClass>org.test.int1.Main</mainClass> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>tomcat-maven-plugin</artifactId> 
       <version>1.1</version> 
       <configuration> 
        <url>http://xxxxxxxxxxxxxx/manager/text</url> 
        <server>TomcatServer</server> 
        <path>/kdweb</path> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    <distributionManagement> 
     <repository> 
      <id>xxxxxxxxxxxxxxxxxx</id> 
      <name>xxxxxxxxxxxx-releases</name> 
      <url>http://xxxxxxxxxxxxxxx/artifactory/libs-release-local</url> 
     </repository> 
     <snapshotRepository> 
      <id>xxxxxxxxxx</id> 
      <name>xxxxxxxxxx-snapshots</name> 
      <url>http://xxxxxxxxxxxx/artifactory/libs-snapshot-local</url> 
     </snapshotRepository> 
    </distributionManagement> 
</project> 
+0

你是如何製造這場戰爭的?什麼依賴缺失?你會得到什麼錯誤? –

+0

m2e在我運行 - > Maven Install時創建了這場戰爭。所有的依賴都缺失。這些錯誤是由於不在類路徑上的依賴關係導致的類路徑錯誤。 – Jared

+0

您是否嘗試過從命令行運行'mvn package'?我從不相信IDE插件只是自動化命令行構建工具。下降到低級別自己測試它。 –

回答

3

既然你所提及般自己的作品是工作,嘗試切換到新的工作區和重建項目。看看問題是否解決。

+2

這最終解決了它,因爲它涉及太多的Eclipse問題。 – Jared

相關問題