2014-12-19 56 views
1

我使用下面的命令pom.xml中顯示錯誤 - 初級

MVN原型創建的項目:生成-B -DarchetypeGroupId = org.appfuse.archetypes -DarchetypeArtifactId = AppFuse的光 - 彈簧 - 安全 - 原型-DarchetypeVersion = 2.2.1 -DgroupId = com.app.PROJECT1 -DartifactId = PROJECT1 -DarchetypeRepository = https://oss.sonatype.org/content/repositories/appfuse

和i,那麼我打開它在蝕打字mvn eclipse:eclipse之後。

在pom.xml中,我看到以下錯誤,我該如何解決這個問題。

1.

- Multiple annotations found at this line: 
- Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-resources-plugin:2.5:testResources (execution: default- 
testResources, phase: process-test-resources) 
- Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution: default- 
resources, phase: process-resources) 

2.

- cution not covered by lifecycle configuration: org.codehaus.mojo:dbunit- 
maven-plugin:1.0-beta-3:operation (execution: test-compile, phase: test-compile) 

3.

- Plugin execution not covered by lifecycle configuration: 
org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2ddl (execution: default, phase: 
process-test-resources) 

4.

- Multiple annotations found at this line: 
- Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-compiler-plugin:2.4:testCompile (execution: default- 
testCompile, phase: test-compile) 
- Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-compiler-plugin:2.4:compile (execution: default-compile, 
phase: compile) 

5.

Plugin execution not covered by lifecycle configuration: org.zeroturnaround:javarebel- 
maven-plugin:1.0.5:generate (execution: generate-rebel-xml, phase: process-resources) 

問題2.

我已經包含了,當我在本地主機運行下面的應用程序的截圖,我沒有看到CSS工作在這裏,作爲UI是凌亂。我該如何解決這個問題?

enter image description here

問題3.

我收到以下錯誤,當我清理安裝

[ERROR] Failed to execute goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation (test-compile) on project PROJECT1: Error executing database operation: CLEAN_INSERT: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-170] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation (test-compile) on project PROJECT1: Error executing database operation: CLEAN_INSERT 
+0

聖太多次的問題,蝙蝠俠! – 2014-12-19 05:02:37

+2

這只是2個問題。分解成部分。如果你閱讀它,你會知道它。 – Illep 2014-12-19 05:03:30

+1

有兩個問題,是的:問題1,2和3 :) – 2014-12-19 07:23:29

回答

1

我相信#1的答案類似於an answer I just posted on the mailing list

您可以在下面的URL中找到更多信息。

https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html

<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>dbunit-maven-plugin</artifactId> 
           <versionRange>[1.0-beta-3,)</versionRange> 
           <goals> 
            <goal>operation</goal> 
           </goals> 
          </pluginExecutionFilter> 
          <action> 
           <ignore/> 
          </action> 
         </pluginExecution> 
         <pluginExecution> 
          <pluginExecutionFilter> 
           <groupId>org.codehaus.mojo</groupId> 
           <artifactId>hibernate3-maven-plugin</artifactId> 
           <versionRange>[2.2,)</versionRange> 
           <goals> 
            <goal>hbm2ddl</goal> 
           </goals> 
          </pluginExecutionFilter> 
          <action> 
           <ignore/> 
          </action> 
         </pluginExecution> 
         <pluginExecution> 
          <pluginExecutionFilter> 
           <groupId>org.codehaus.mojo</groupId> 
           <artifactId>native2ascii-maven-plugin</artifactId> 
           <versionRange>[1.0-beta-1,)</versionRange> 
           <goals> 
            <goal>native2ascii</goal> 
           </goals> 
          </pluginExecutionFilter> 
          <action> 
           <ignore/> 
          </action> 
         </pluginExecution> 
        </pluginExecutions> 
       </lifecycleMappingMetadata> 
      </configuration> 
     </plugin> 
    </plugins> 
</pluginManagement> 
1

回答問題1:

你的插件執行定義M2Eclipse不真的知道該怎麼做。它知道如何處理默認執行(如何編譯,拉動資源,這類東西),而不是您的自定義事情。您必須告訴它該做什麼,幾乎可以歸結爲執行而不是來執行這些配置的插件執行。有三種方法可以解決這個問題,我只注意到我有answered this before。你可以找到官方解釋here

回答問題2:

不會是一個明確的答案。你的應用程序在哪裏尋找CSS?也許你要明白一個WAR應用程序相關的源文件夾中(假設你的項目是其中之一):

  • src/main/java:Java類,編譯成.class文件,將在您的類路徑中結束了,在WEB-INF/classes您的WAR文件
  • src/main/resources:資源文件,將在您的類路徑中結束了,在你的WAR文件的WEB-INF/classes
  • src/main/webapp:資源文件,會在你的web應用程序的根目錄的最後

換句話說:如果您要製作src/main/webapp/some-folder/my-css.css,它將在http://localhost:8080/PROJECT1/some-folder/my-css.css上可用。

回答問題3:

不會是一個明確的答案。數據庫正在持有某種東西。你確定應用程序已關閉?你是否打開一個數據庫工具來查看數據庫?不要這樣做:)