Introduction
I have inherited a project that I am able to build using the maven command mvn clean install -DskipTests
. However, I am not able to make
using the inteliJ
button. I am able to deploy the project using Remote debugging
but I am not able to hotswap new code in/out due to make not working
.
Errors during make
When I run make I get a series of errors such as:
Older Maven Version
I have been told to use an older version of maven
, specifically 3.0.3
.
I have gone to the settings for the current project
and manually set maven 3.0.3
as the default.
- Question 1) Is there a chance this does not apply to the sub directories? Should I change my system path variable and set the old maven as the system default?
Red Highlighting in POM.XML
I am seeing that InteliJ
is highlighting a pom.xml
in one of the sub-modules for errors. This code has been committed by colleagues so it is strange that there would be errors.
and
and
- Question 2) Could Maven be the issue here? Or could there legitimately be an error in the
POM.xml
?
Maven > Reimport does not solve the issue
Additionally, running Maven > re-import
does not solve the issue.
Updating Indices
I tried selecting the proposed option to Update Maven Indices
. This has brought up the following dialogs and is downloading in the background from both the maven servers but also a private artifactory
.
The indices were taking too long to update so I invalidated the cache/restarted and will try again as proposed @ Intelli J IDEA takes forever to update indices .
Summary of Questions
Question 1) Is there a chance this does not apply to the sub directories? Should I change my system path variable and set the old maven as the system default?
Question 2) Could Maven be the issue here? Or could there legitimately be an error in the
POM.xml
?
Update
Indices finished downloading after some time.
I removed some of the problematic entries in the pom.xml
and the project now is not red-underlying the various packages that they do not exist.
I am starting to believe the pom.xml
was problematic. However, if someone downloads the dependencies/indices, then the problem no longer appears.
Update - Remove Module
I talked with a colleague and he said the specific modules are no longer used (even if they do include faulty pom.xml
files). I was told to right click the module and select "remove module". This pretty much stopped the problem.