简体   繁体   中英

Maven Project Import

I imported maven project into my eclipse from external resource. But when i try to create my own class in that project under a package i see

" Source folder is not on the Java build class path."

When i tried to run java classes of that project i see a "Launch Error- Editor does not contain a main type"

Please provide the steps to configure maven project from external source into our eclipse and how to configure build path and other dependencies as i am a newbie to Maven.

Import the existing maven project using, File->Import->Maven->Existing Maven Projects

After import, do maven clean package to check it doesn't have any build errors.

Then try adding your own class and see if it works and of course to run the java class alone you need to have the main method in it.

有时,当我导入一个项目并且它是一个Maven项目时,我必须右键单击该项目,选择“配置”,然后选择“转换为Maven多面项目”(或类似的东西)-我记不清了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM