POM.xml Shows errors - Beginner

3.7k views Asked by At

I created a project using the following command

mvn archetype: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

and i then i opened it in eclipse after typing mvn eclipse:eclipse.

In the pom.xml i see the following errors, how can i resolve this.

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)

QUESTION 2.

I have included a screenshot of the app below when i run it in localhost, and i don't see the CSS is working here, as the UI is messy. How can i solve this ?

enter image description here

QUESTION 3.

I get the following error when i clean install

[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
2

There are 2 answers

0
Matt Raible On BEST ANSWER

I believe the answer to #1 is similar to an answer I just posted on the mailing list.

You can find more information at the URL below.

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>
0
Sander Verhagen On

Answer to question 1:

You have plugin executions defined that M2Eclipse does not really know what to do with. It knows what to do with default executions (how to compile, pull resources together, that kind of stuff), not your custom things. You will have to tell it what to do, which pretty much comes down to telling it to execute or not to execute these configured plugin executions. There is three ways to go about this, and I just noticed that I have answered this before. You can find the official explanation here.

Answer to question 2:

Not going to be a clear-cut answer. Where is your application looking for the CSS? Perhaps you have to understand the relevant source folders of a WAR application (assumption that your project is one of those):

  • src/main/java: Java classes, compiled into .class files, will end up in your class path, in WEB-INF/classes of your WAR file
  • src/main/resources: resource files, will end up in your class path, in WEB-INF/classes of your WAR file
  • src/main/webapp: resource files, will end up in the root of your web application

In other words: if you were to make a src/main/webapp/some-folder/my-css.css, it will become available on http://localhost:8080/PROJECT1/some-folder/my-css.css.

Answer to question 3:

Not going to be a clear-cut answer. Something is holding on to the database. Are you sure the application is down? Are you having a database tool open to look into the database? Don't do that :)