Workaround for the Src/main/java Resource folder cannot be established after Eclipse builds the MAVEN project

Source: Internet
Author: User

After you establish the good one MAVEN project, if there is no Src/main/java folder under the Java Resources Resource file, and you manually create the file, you are prompted for "existing file." This shows that in this project configuration already has Src/main/java this folder, as for why not show, I am still not clear, hope who understand with me under, thanks. (resolved) The first method: Open the project's Classpath file: The following <?xml version="1.0"encoding="UTF-8"?>
<classpath>
<classpathentry kind="src"output="Target/test-classes"Path="Src/test/java">
< attributes>
<attribute name="Optional" value="true"/>
<attribute name="Maven.pomderived" value="true"/>
</ attributes>
</classpathentry>
<classpathentry kind="src"Path="Src/main/java"/>
<classpathentry kind="src"Path="Src/main/resources"/>
<classpathentry kind="src"output="Target/test-classes"Path="Src/test/resources"/>
<classpathentry kind="Con"Path="Org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
< attributes>
<attribute name="Maven.pomderived" value="true"/>
<attribute name="Org.eclipse.jst.component.dependency" value="/web-inf/lib"/>
</ attributes>
</classpathentry>
<classpathentry kind="Con"Path="org.eclipse.jdt.launching.jre_container/org.eclipse.jdt.internal.debug.ui.launcher.standardvmtype/ JavaSE-1.6 ">
< attributes>
<attribute name="Owner.project.facets" value="Java"/>
</ attributes>
</classpathentry>
<classpathentry kind="Output"Path="Target/classes"/>
</classpath> will appear with the Path property: Src/main/java's Classpathentry node, then delete the nodes we need to create, such as <classpathentry kind="src"Path="Src/main/java"/>.     If you re-establish the Src/main/java folder under Java Resources, there will be no problem. The second method: This is the most convenient one. On the project, right-select Properties, then click Java Build Path, under Librarys, edit the JRE System Library, select workspace Default JRE.

Workaround for the Src/main/java Resource folder cannot be established after Eclipse builds the MAVEN project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.