[英]POM.xml Shows errors - Beginner
我使用以下命令創建了一個項目
mvn原型:generate -B -DarchetypeGroupId = org.appfuse.archetypes -DarchetypeArtifactId = appfuse-light-spring-security-archetype -DarchetypeVersion = 2.2.1 -DgroupId = com.app.PROJECT1 -DartifactId = PROJECT1 -DarchetypeRepository https: /oss.sonatype.org/content/repositories/appfuse
然后我在鍵入mvn eclipse: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。
當我在localhost中運行該應用程序時,我在下面包含了該應用程序的屏幕快照,由於UI混亂,因此我看不到CSS在這里工作。 我該如何解決?
問題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
回答問題1:
您已定義了M2Eclipse並不真正知道該怎么做的插件執行。 它知道如何處理默認執行(如何編譯,將資源整合在一起,諸如此類),而不是您的自定義內容。 您將不得不告訴它該怎么做,這幾乎可以歸結為告訴它執行還是不執行這些已配置的插件執行。 有三種解決方法,我只是注意到我之前已經回答了這個問題 。 您可以在此處找到官方說明。
對問題2的回答:
不會是一個明確的答案。 您的應用程序在哪里尋找CSS? 也許您必須了解WAR應用程序的相關源文件夾(假設您的項目是其中之一):
src/main/java
:編譯成.class
文件的Java類將最終出現在您的類路徑中,即WAR文件的WEB-INF/classes
中 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:
不會是一個明確的答案。 某些東西正在保留在數據庫中。 您確定應用程序已關閉嗎? 您是否正在打開數據庫工具來查看數據庫? 不要那樣做:)
我相信#1 的答案類似於我剛剛在郵件列表中發布的答案 。
您可以在下面的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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.