Enonic CLI 3 has been released!

New major version of Enonic CLI is available for download from npm, brew, scoop and snapcraft!

What’s new?

  • A sandbox will be started in dev mode by default, unless --prod flag is provided
  • New “sandbox copy” command makes a copy of an existing sandbox with all the contents
  • New “project test” command executes tests in current project
  • Prompt to start a new sandbox after it’s created

Complete list of all the new features and improvements can be found here. Pay special attention to the upgrade notes.

If you are on an earlier version of CLI, simply run enonic upgrade in your terminal (snapcraft users may have to run snap refresh enonic). If you don’t have CLI yet, read here how to install.

3 Likes

Hi guys!

Great job on the 3.0.0 version! :tada:


I have a few issues with the Snapcraft CLI on Ubuntu.

  1. enonic project deploy --c produces error:
    Deploying to sandbox 'item'...
    Watching the file system is not supported.
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Continuous build does not work when file system watching is disabled
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    > Get more help at https://help.gradle.org.
    
    BUILD FAILED in 414ms
    
  2. Trying to run tests from the CLI (e.g with enonic project test) produces the following error. Note that running tests from Gradle works fine. Googleing the stacktrace gives hits on trying to run the tests with JRE instead of JDK. I don’t know if this is relevant for you.
    > Task :test
    
    no.item.SortTest > initializationError FAILED
    java.lang.RuntimeException at ScriptRunner.java:141
    Caused by: java.lang.IllegalStateException at PluginLoader.java:84
    Caused by: java.lang.IllegalStateException at DefaultMockitoPlugins.java:105
    Caused by: java.lang.reflect.InvocationTargetException at NativeConstructorAccessorImpl.java:-2
    Caused by: org.mockito.exceptions.base.MockitoInitializationException at InlineDelegateByteBuddyMockMaker.java:260
    Caused by: java.lang.IllegalStateException at ByteBuddyAgent.java:706
    
    no.item.ZipCodeToEmailTest > initializationError FAILED
    java.lang.RuntimeException at ScriptRunner.java:141
    Caused by: java.lang.IllegalStateException at PluginLoader.java:84
    Caused by: java.lang.IllegalStateException at DefaultMockitoPlugins.java:105
    Caused by: java.lang.reflect.InvocationTargetException at NativeConstructorAccessorImpl.java:-2
    Caused by: org.mockito.exceptions.base.MockitoInitializationException at InlineDelegateByteBuddyMockMaker.java:260
    Caused by: java.lang.IllegalStateException at ByteBuddyAgent.java:706
    
    2 tests completed, 2 failed
    

Hi Tom!

Thanks for reporting this.

  1. Usual question - did it work before you upgraded CLI? Snapcraft is always very strict about permissions so it’s possible it never worked at all. You can also try this (for fun) and see if it makes any difference:

enonic project gradle deploy -t

  1. You said that running tests from Gradle works fine. How do you run tests with Gradle - gradlew test?
  1. I haven’t tried this in a long while, so I honestly don’t know.

  2. Running tests trough the CLI did not work before the upgrade either. It workes fine when I do ./gradlew test or ./gradlew build.