Maven war module artifact not working

已回答

Hello,

I'm on 2022.1.3 and using the Maven Helper plugin.

My problem:

The war artifact of a Maven war project build is not showing up in project settings / artifacts.

When I test to add it manually, I see no Maven tab (https://www.jetbrains.com/help/idea/maven-tab.html) and it looks like my maven project build artifact (for example target/projectname-1.0.0-SNAPSHOT.war) just is not detected / recognized.

Maybe this missing tab could be a hint for some detail configuration problem...

Another hint may be that I have to changes project/web manually to project/src/main/webapp regarding the web facet.

Which configuration details should I check? What can I do to solve this? I checked many settings against workmates settings and everything is looking equal so far...

I'm working with Maven projects all the time without other problems. But I usually work without server starters and module artifacts, I usually deploy via pom.xml and attach to servers when I want to debug.

Regards,
Gunnar

评论操作 固定链接

Could be that some required plugins were disabled. Make sure you have Maven bundled plugin and all Java EE Web related bundled plugins enabled in Settings (Preferences) | Plugins. Try also re-import the project from Maven: File " New | Project from Existing Sources and select main pom.xml file to import from.

If the problem remains, provide IDE logs zipped after IDE restart and Reload action in Maven tool window. For uploading you can use https://uploads.jetbrains.com or any file sharing service.

1
评论操作 固定链接

One relevant bundled plugin was not active: Maven extensions.

Since I had just committed, I removed the project from disc and cloned it again via IDE and now I initially see "projectname:war" and "projectname:war exploded" in the artifacts.

"target" is set as output directory, facet recognizes "src/main/webapp", problem looks solved.

Maven tab is shown.

Thanks and regards,
Gunnar

0

请先登录再写评论。