Introduce `idea-plugin` goal to invoke intellij pants plugin via CLI

Review Request #3664 — Created April 7, 2016 and submitted — Latest diff uploaded

wisechengyi
pants
3187
3670
pants-reviews
benjyw, nhoward_tw, peiyu, stuhood, zundel

This change enables calling intellij pants plugin from cli to import the targets/directories specified. https://github.com/pantsbuild/intellij-pants-plugin/issues/58

Similar to idea goal, idea-plugin goal makes a skeleton ipr project file, and in addition fill in the workspace iws file with target specs and project path, so the plugin will know how to continue to import the project as if the user is doing so.

Only dep is bootstrap.

[tw-mbp-yic pants (from_cli)]$ ./pants --explain idea-plugin 
Goal Execution Order:

bootstrap -> idea-plugin

Goal [TaskRegistrar->Task] Order:

bootstrap [jar-dependency-management->JarDependencyManagementSetup_bootstrap_jar_dependency_management, bootstrap-jvm-tools->BootstrapJvmTools_bootstrap_bootstrap_jvm_tools]
idea-plugin [idea-plugin->PluginGen_idea_plugin]

Example:
./pants idea-plugin --no-open examples/src/python/example/hello/main/ examples/tests/java/org/pantsbuild/example/hello/greet/ will generate a iws file containing targets and project path. (only one project path because that's the directory intellij is going to zoom into):

<?xml version="1.0"?>
<project version="4">
  <component name="PropertiesComponent">
    <property name="targets" value="['/Users/yic/workspace/pants/examples/src/python/example/hello/main/', '/Users/yic/workspace/pants/examples/tests/java/org/pantsbuild/example/hello/greet/']" />
    <property name="project_path" value="/Users/yic/workspace/pants/examples/src/python/example/hello/main/" />
  </component>
</project>

Other change:
set default java language level to 8 for IdeGen

https://travis-ci.org/pantsbuild/pants/builds/128569526

Loading...