How to properly configure multiple modules SpringMVC application created by appfuse in Eclipse?

I am trying to configure a SpringMVC appfuse multi-user application in Eclipse, but it seems that I encountered a lot of errors in Eclipse after importing the project into Eclipse. Can someone help me with a walkthrough showing the perfect way to configure such an application in Eclipse?

+4
source share
4 answers

Have you tried using the maven eclipse plugin? You can simply go to the project root folder (the one containing the pom.xml file) and run "mvn eclipse: eclipse" from the command line.

This will create project files for each of your modules, as well as create interdependencies. You can simply view your multi-module project as a workspace with multiple projects.

Most errors that occur at boot time after mvn eclipse: eclipse are due to the repository variable. You can configure this using "mvn -Declipse.workspace = eclipse: add-maven-repo".

Additional information on the maven eclipse plugin at http://maven.apache.org/plugins/maven-eclipse-plugin/ .

Regards, Bogdan

+4
source

What are the bugs? The most common problem that I can think of is library errors, in which case you need to edit the build path.

0
source

From what I remember for multi-module projects, eclipse just can't handle it. This will help to see the specific errors that you get, and then start from there.

0
source

I know this problem, it is not related to Appfuse, but rather to Maven. I suggest following these steps:

  • customize your project;
  • create all the necessary directories / sources: basically, Java source and resource files, both for testing applications and for modules;
  • make sure everything compiles and all tests pass. for this you can check with

    mvn package

  • use the eclipse maven plugin:

    mvn eclipse: eclipse

Thus, the project will include everything that is needed in the class path: Spring and Log4j configuration files, resources, etc.

If you have already run the mvn eclipse: eclipse command, just delete the project from Eclipse (DO NOT DELETE FILES!), Delete the Eclipse files from the directory, run mvn eclipse: eclipse

My 2 cents

0
source

Source: https://habr.com/ru/post/1277270/


All Articles