1

I'm using a third party Puppet module to install IntelliJ IDEA, and I'd like to automatically verify that the installation worked. The current solution fails because there is no license:

$ make test
[...]
/usr/bin/vagrant ssh --command '/opt/idea/bin/inspect.sh "/home/user/dev/root" ~/.IntelliJIdea14/config/inspection/Default.xml /tmp -d "/home/user/dev/root/test/module"'
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Sep 14, 2015 1:40:43 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Sep 14, 2015 1:40:43 AM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /home/vagrant/.java/.userPrefs/prefs.xml
[   1380]  ERROR - nse.impl.GeneralLicenseManager - No valid license found 
java.lang.Throwable
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)
        at com.intellij.ide.a.g.cb.a(cb.java:107)
        at com.intellij.idea.MainImpl$1.start(MainImpl.java:43)
        at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:117)
        at com.intellij.idea.MainImpl.start(MainImpl.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:91)
        at java.lang.Thread.run(Thread.java:745)
[   1389]  ERROR - nse.impl.GeneralLicenseManager - IntelliJ IDEA 14.1.4  Build #IU-141.1532.4 
[   1389]  ERROR - nse.impl.GeneralLicenseManager - JDK: 1.8.0_60 
[   1389]  ERROR - nse.impl.GeneralLicenseManager - VM: OpenJDK 64-Bit Server VM 
[   1390]  ERROR - nse.impl.GeneralLicenseManager - Vendor: Oracle Corporation 
[   1390]  ERROR - nse.impl.GeneralLicenseManager - OS: Linux 
Connection to 127.0.0.1 closed.
Makefile:198: recipe for target 'test-integrated-development-environment' failed
make: *** [test-integrated-development-environment] Error 255

I obviously can't put my own license file in the repo. So the options look like the following:

  1. Create a community license file, include it in the repo, and write it to the license file location only if the file doesn't already exist. I'm not sure how hacky that would be.
  2. Generate the community license file on the fly given the same condition as above. No idea if this is possible.
  3. Run some completely different command which does not require a running X server or license.

The workaround for now is simply to check that /opt/idea/bin/inspect.sh exists at all, which is not a good indicator IMO.

I don't want to do something like installing the community version if there is no license file available. I want to check the installation of the package I'm really going to install.

1 Answer 1

1

The first is probably the best idea. Puppet has an attribute for that on the file builtin type; just do something like

file { "idea-license":
    source => "puppet:///.../community-license",
    replace => false,
}

This will install the community license if the license file doesn't yet exist, but not touch it if it does.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .