tfuchs
Elite Observer

FirstSpirit Gradle Plugin: FsExecuteCliTask does not work as expected

Jump to solution

Hi Community!

I am using the FirstSpirit Gradle Plugin:

 

 

plugins {
    id 'de.espirit.firstspirit' version '1.0.16'
}

 

 
In order to create a task to export elements from FirstSpirit to GIT I would like to create a FsExecuteCliTask but I seem to be unable to render a correct fs-cli command line.
 
My Task looks like this:

 

task fsExportProjectData(type: FsExecuteCliTask) {
    cliConfiguration {
        arguments = [
            "--syncDir ${projectDataDir}",
            "--project \"${fsProjectName}\"",
            "export",
             "--",
             "templatestore",
             "path:/mediastore/layout",
             "projectproperty:ALL"]
    }
}

 

This however does not work.

 

2022-12-19 14:18:44,842 ERROR SystemExitHandler - An unexpected error occurred during command execution
com.espirit.moddev.cli.commands.help.UnknownCommandException: fs-cli --syncDir xxxx/firstspirit/projectData --project "XXXX" export templatestore projectproperty:ALL

 

 

The command line which works and which I am trying to recreate is as follows (paths and project name are correct, of course):

 

fs-cli.sh -sd xxxxx/firstspirit/projectData -p "XXXX" export templatestore path:/mediastore/layout projectproperty:ALL

 

 

The built-in gradle fs-cli tasks like fsImportProject work fine.

Is it possible to create this command line using the FsExecuteCliTask type? 

Thank you!
Timo

0 Kudos
1 Solution

Accepted Solutions
GeMo
Crownpeak employee

Hi,

the following code snippet should work (locally tested on a windows machine):

task fsExportProjectData(type: FsExecuteCliTask) {
    cliConfiguration {
        arguments = [
                "--syncDir",
                ${projectDataDir},
                "--project",
                ${fsProjectName},
                "export",
                "--",
                "templatestore",
                "path:/mediastore/layout",
                "projectproperty:ALL"]
    }
}

View solution in original post

0 Kudos
2 Replies
GeMo
Crownpeak employee

Hi,

the following code snippet should work (locally tested on a windows machine):

task fsExportProjectData(type: FsExecuteCliTask) {
    cliConfiguration {
        arguments = [
                "--syncDir",
                ${projectDataDir},
                "--project",
                ${fsProjectName},
                "export",
                "--",
                "templatestore",
                "path:/mediastore/layout",
                "projectproperty:ALL"]
    }
}
0 Kudos

Hi!

Thank you, that works!

Timo