7.0.4 doesn't take into account build-helper-maven-plugin settings? Follow
For several important reasons we need more than one source root per Maven project. To accomplish that we use the build-helper-mave-plugin (see exerpt from our global parent-pom below). In 7.0.3 this setting was taken into account upon synchonization and the additional source path was set in the corresponding module. This is extremly important for us. Did I miss a setting in 7.0.4 to make IDEA honour the build-helper settings? Is anybody else seeing this problem?
org.codehaus.mojo build-helper-maven-plugin add-source generate-sources add-source ${basedir}/src/main/db ]]>
Edited by: Jürg Spiess on Aug 13, 2008 10:45 AM
Please sign in to leave a comment.
In the 7.0.4 release there is an option for this behaviour: 'Maven Settings->Import->Automatically ... update folders on import'.
You also can achieve same result either by using 'Update Folders' action (next to 'Re-import Maven projects' button) or by running any goal that includes 'generate-sources' phase with embedded Maven.
Thanks for your reply, Anton. Unfortunately that's not the answer to my problem. Upon import the path "$/src/main/db" should be added to the corresponding IDEA module as a source folder! Maven goals run just fine but in IDEA all references to classes under "src/main/db" are marked red and do not compile with IDEA. In 7.0.3 that path gets added to source folders in IDEA modules automatically on import.
Btw: The build-helper plugin in Maven just adds that source root. It could be tied to any phase prior to the compile phase.
I have the same problem. It seems to work if I run the generate-sources goal before opening the pom.xml file as a project, but if the sources haven't been generated, it doesn't mark src/generated/java as a source folder. This worked in 7.0.3 and I think in 7.0.2. I'm sad to see it broken.
I investigated the problem further:
The only way I can make IDEA add the additional source folder is running generate-sources for each Maven-Module with the embedded Maven. It does not happen if I use the option "Automatically generate sources..." on the import tab or if I press the "Update folders" button!
There are major drawbacks with this situation:
We only use external maven
We have up to 100 seperate Maven-Module open, adding and removing as necessary. Running generate-sources für each one is definitely not an option :(
It worked just perfectly in 7.0.3 (at least regarding this problem)
Dear JetBrains, is there anything you will do about this? We really longed for a better Maven integration an now this show stopper!
Regards
Jürg
Thanks for info, Jürg,
I'll take a look on the problem and, hopefully, fix it in one of the following 8.0 eaps.
One other bit of information:
The "run generate sources on import" works for one colleague. We only found one difference between his setup and ours. He had a different tab order on his maven settings dialog! His order is General/Runner/..., ours is General/Import/Ignored files/Artifacts/Runner/... .
Looking forward to this fix (any chance this makes it into 7.0.5?)
Regards
Jürg
Jürg, is it possible to send me your pom files?
Thanks.