Can you generate plugin configs from maven?

We are using checkstyle and other tools to help our development.  For Eclipse we can generate config using the maven eclipse plugin.  Does anyone know of something similar or have suggestions on how I would generate the proper config to do similar things for Idea?  For sake of argument I think we can assume that I have the correct Plugins in Idea and I've figured out what settings for those plugins I want.  The question is how do I get Idea or something to generate the right entries in misc.xml, for example, without having to manually set the same stuff everytime I import a new project or my project files get blown away.

Thanks,
Tom

3 comments

I'm not sure if I am following  your question completely. But it sounds like you are asking how to  retain IDEA settings, including the settings of various IDEA plug-ins,  from project to project. If so, the answer is to go to:

  1. File > Other Settings > Template Settings
  2. File > Other Settings > Template Project Structure


Set your defaults there.

Any  settings you make in there will be used as the defaults when creating  new projects. This will of course only work for IDEA plug-ins that  expose some or all of its settings to the template settings. Most (if  not all) the built in plug-ins do such when appropriate.

If you want to "share" these settings, or use them on another machine, once they are set as desired, go to File >Export Settings and select the "Default Project Settings" option. You can then import on another machine via File > Import Settings.  Other settings can be exported/imported as well.

Also, layout your tool windows the way you like (including open, closed, docked, pinned, size, etc.) and then go to: Window > Set Current Layout as Default

I hope that helps. If not, can you clarify your question?

0

That almost solves the problem but falls a little short for a couple of reasons.  The biggest problem is the CheckStyle-IDEA plugin doesn't appear to allow for that, though maybe it could be made to.  If it did it would require that we put the configuration for the CheckStyle-IDEA plugin be the same for each project.  That would probably be good enough, but idealy there would be a way to specify in the project some configuration details so that when Idea first loads it, it can configure itself correctly.  For Eclipse, there are configuration files contained in each project that the maven eclipse plugin can use to properly configure the Eclipse to find the checkstyle file.  I'd like to be able to do something similar for Idea.

Sorry I am not being more clear.  I'm having a hard time trying to figure out exactly how to articulate it without talking in circles or going through a very specific example.

0

You would need to contact the plug-in developer and ask for sure feature enhancement(s) since that is a third party plug-in and not a bundled plug-in. His contact information is on the plug-in page: http://plugins.intellij.net/plugin/?idea&id=1065 There are bundled plug-in that allow for both global and per project settings. And the per project setting can have defaults set in the Template Settings dialog. So the same could likely be done for this plug-in.

I'm not familiar with CheckStyle, but I do notice there is another plug-in for IDEA listed at the projects website. It looks like the "QA Plug" plug-in has a CheckStyle module. And looking at the website (http://qaplug.com/) it looks like it supports per project settings. And it allows export/import of settings.

0

Please sign in to leave a comment.