What's a proper way to import and Make a Maven3 project that generate sources?

Hi there,

Please find a simple maven based project in attachment. This project has generated sources using maven plugin throgh XJC, and it compiles fine on command line.

However when I import this into IntelliJ 12 as Maven project, the first call to Make project will failed due to missing source. Now ofcourse I can go to my command line and run "mvn compile" once, then go back into my IDE and referesh, then it Make project successful after that. But that's a lot of hassle and not IDE friendly.

Now, after a few project imports, I found that I can rigth click project then Maven > Generate Sources and Update Folders. This seems to generate the sources and bring it into the IDE. So my question and sugestion is why this step is not automatic?

Thanks
Zemian



Attachment(s):
maven-gen-src-demo.zip

Please sign in to leave a comment.