Maven FAQ

1.   Referenced Projects Classpath Entries

If, when configuring Deploy Assemble, Maven's dependency Add is Referenced Projects Classpath Entries, and you encounter "Class Not found" during Debug, it may be that Maven's package has not been published in the WEB-INF/LIB directory, then go to project , open the .classpath file and put the

<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">  
        <attributes>  
            <attribute name="org.eclipse.jst.component.dependency" value="../"/>  
        </attributes>  
</classpathentry>  

 of

../

  replace with 

/WEB-INF/lib

 

 

2. Do not perform the clean, install, and package operations of pom.xml during debugging, otherwise the folder under the target may be denied access.

 

 

3.   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:create (default-cli) on project standalone-pom: Unable to parse configuration of mojo org.apache.maven.plugins:maven-archetype-plugin:2.3:create for parameter #: Cannot create instance of interface org.apache.maven.artifact.repository.ArtifactRepository -> [Help 1]

An error occurred when creating a project with Idea.

Reason: cannot use the archetype:create command

Solution: Use the archetype:generate command

mvn archetype:generate -DgroupId=com.test -DartifactId=websocket -D
archetypeArtifactId=maven-archetype-webapp

 

 

4. Information:java: javacTask: Source release 1.7 requires target release 1.7

reason:

The compiled version of the source file is inconsistent with the compiled version specified by the Module

Solution:

The first:

File --> Settings ---> Compiler ---> Java Compiler ---> Project bytecode version  改成 1.7 

The second:

Re-import the project, Import Project -> select the folder where the project is located -> Create Project from exsting sources -> next

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326526650&siteId=291194637