Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Error:Cannot build Artifact 'XXX:war exploded' because it is included into a circular dependency

The project was working well before, but suddenly can not update war file in "target" directory.When I want to "Build Artifacts", error shows: Error:Cannot build Artifact 'XXX:war exploded' because it is included into a circular dependency

What is the wrong with this?

the artifacts :

enter image description here enter image description here

like image 909
learner Avatar asked Feb 20 '17 02:02

learner


People also ask

What is exploded war in Intellij?

It means that instead of deploying a war file, it will deploy a directory with the exact same tructure as a war file, but just not zipped into a war archive.

What is war exploded?

WAR files are convenient because they are a single package that is easy to copy, and the contents of the WAR file are compressed making it quite a compact package. The second way is to deploy all the individual files that make up a web application. This is called an exploded deployment, or an exploded WAR.


1 Answers

The solution is to remove "MavenDemo:war" artifact and "MavenDemo:war exploded" artifact from the project, and rebuild the project、rebuild artifacts. set the deployment artifact from MavenDemo:war to MaterialManager:war.

I think the problem of this project is that the "MavenDemo:war" artifact and "MavenDemo:war exploded" artifact are repeated. So the solution is to remove them from the project.

1:

1

2:

2

3

3:

4

4:

5

And then, Everytime after I make some update in my code, I can click "Run" Button to deploy the updated project to Tomcat successfully.

Hope it can help somebody else ~

like image 128
learner Avatar answered Sep 24 '22 19:09

learner