Maven plugin still not working correctly

Hi, I have just recreated my project from scratch. I still don't have my Maven project working correctly. I'm starting to get angry with this. So many version updates but the Maven plugin still doesn't work right. I admit there was significant improvement in the usability of the plugin in the past few months - from useless to at least usable but it still needs some fixing please.

I have some more details which would be hopefully helpful for fixin the plugin.

1) When I use the default value ${env.M2_REPOSITORY_LOCAL} then I get error from the plugin that parent pom file of my pom file is not found. Of course it is in my local rep as well as in remote.

2) So I have to specify my Maven repository path manually. After refresh the Maven plugin resolves the pom file and loads all libs. But then I have more warnings:

Unresolved build extension: 'org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2:runtime'
Unresolved plugin: 'org.apache.maven.plugins:maven-compiler-plugin:RELEASE'
Unresolved plugin: 'org.apache.maven.plugins:maven-resources-plugin:RELEASE'

Of course everything is working from command line

3) To get any of the lifecycle goals working I have to switch to use external Maven to get it working

4) IDEA does not support version wildcards in pom file. E.g. in dependecy, version you can specify wildcards like RELEASE or <1.).

5) Often for no apparent reason the autoresolve feature in pom file (resolving groupId, artifactId and version) does not resolve some artifacts (they are red). But the artifact exists in remote and local repository and from command line maven it works fine.

6) Remote repository update is not working - I get Error transfering nexus file. More details in

7) Because of bug in 6) I have no sources and javadocs for any of the libs including all seam and jee libs I use. It is quite awful to work blind.

My build is #7935

Comment actions Permalink

8) I have one submodule pom in the Maven Integration / Ingored files. The checkbox is checked. On plugin synchronize button click the module is not ignored and is created anyway.

Comment actions Permalink

Hi, Steve,

1) What is the default variable M2_REPOSITORY_LOCAL? I couldn't find anything about it. If your repository isn't located under $user_home$/.m2/repository you have to explicitly specify it, otherwise the plugin isn't able to locate it.
2) Could you please check if these warnings are gone after project reopen?
3) The external maven is likely will become the default option. The embedder still have many problems running the builds and it has a quite different validation model.
4) Here is a relevant issue
5) What are there artifacts? Does local repository index update help?
7) Does 'Download Artifact' help? Tell me please one of the public artifacts that you couldn't get sources and javadocs for - I'll check it.
8) Working on it. Fix will only be available in the 8.0 branch.

Anyway, thanks for your feedback,
Anton Makeev.

Comment actions Permalink

Hi Anton, so I have looked for answers for you questions.

1) I looked into that and found that this is a speciality we have here. Apparently Maven supports ${env.XXX} in the settings.xml file. In my case ${env.M2_REPOSITORY_LOCAL}]]> The XXX can be any system environment variable, in my case M2_REPOSITORY_LOCAL which contains path to local repository. I copied my settings.xml file from my colleague and point behind this was so that we don't have hardcoded path in the file :) Now I realize that IDEA of course does not recognize $ syntax. No problem for me to do override here. Also if I hardcode the path in the xml file it is working ok in IDEA.

2) The warnings are still there after reopen/restart. But I can see now that only this 3 plugins I mentioned above have the warnings. All other plugins are ok, e.g. I have maven-antrun-plugin:1.1, maven-ear-plugin:2.3.1, maven-idea-plugin, maven-war-plugin:2.1-alpha-1, maven-ejb-plugin:2.1 and they are ok, without warnings. I don't know about unresolved build extension but the unresolved plugins which are specified above have RELEASE version. Maybe it is not recognized?

3) Good to know. Changing the default is good idea if there are this kind of problems.

4) I can see there is example [3.8.1,4.0). 4.1) What about RELEASE keyword? 4.2) Planned for Diana Final, ok one more reason to switch to 8.0, I just hope we don't have to wait too long for final. Maybe it can get into some of earlier Diana EAPs? 5) So I deploy new version of our library to artifactory. Then I use this lib as dependency in pom file in my project. In pom file I have 1.1]]>. The 1.1 is red. If I use old version 1.0 it is black. Another example is that my colleague deploys new lib to artifactory. Again I use this lib in my pom as dependency. Both groupId and artifactId are red. I understand that IDEA must see it in local/remote artifactory (indexed) to recognize it. So I tried re-import maven projects, used command line mvn-compile, execute mvn-compile in idea (downloads the lib from remote repo to local), restart idea, update folders, download artifacts. No change. This was last week. Today however nothing is red anymore, I don't know what changed :-). But I believe that when I add another new library/version it will be red again. I will watch it to try to get some pattern from it.

7) It is not downloading ANY javadoc/sources public or internal. Download artifacts button downloads only standard plugins like maven-plugin-api:2.0 etc. We have the javadoc/sources available in our artifactory. Example is org.jboss.seam:jboss-seam:2.0.3.CR1 or org.richfaces.ui:richfaces-ui:3.2.1.GA but really it is not working for any. There is no relevant exception in the idea log file so I don't know how else I can help. Maybe it can be related to the fact that indexing the remote repository is not working for me.

8) Yeah it looks to me that the concept of ignoring is not fine tuned. If I want to ignore the pom I want that it will be ignored on import so that no module is created. I added some comments into the relevant Jira issue.

I plan to install the new 8.0 M1 this week so I guess I will be reporting on that one afterwards.


Please sign in to leave a comment.