Dependency resolution for a R tool environment



I am developing a new galaxy tool based on R language.
My tool uses R 3.1.2 and it is dependent from a number of libraries.
I deployed my tool in the testtoolshed but It does not find the R libraries when I try to install it from the shed.

What is it wrong in the following tool_dependencies.xml?

<?xml version="1.0"?>
    <package name="R" version="3.1.2">
        <repository name="package_r_3_1_2" owner="iuc" prior_installation_required="True" />
    <package name="mytoolname" version="1.0">
        <install version="1.0">
                <action type="setup_r_environment">
                    <repository name="package_r_3_1_2" owner="iuc">
                        <package name="R" version="3.1.2" />
                    <package sha256sum="d451f2c72c46a7b5fa6dd252a207ba72f0a5a86d1bfc95408935f079efa85f77">
                    <package sha256sum="7585cd13b5ae6c3dd918327803de4918dcc11cf6bea45df4e5051c492e49db2a">
                    <package sha256sum="f3e9781e84e114b7a88eb099825936cc5ae7276bbba5af94d35adb1b3ea2ccdd">
                    <package sha256sum="011131ed104f5be2eed7d7387877e2fe70c1ac72c1052de12cd2284cb61ce2b3">
                    <package sha256sum="4b7fd5c6c1358a7e4c32c10237aa6f3f5279585afef83b0ffa1b3fc74c5f3006">
                <action type="set_environment">
                    <environment_variable action="set_to" name="MYTOOLNAME_ROOT_PATH">$INSTALL_DIR</environment_variable>
        Set up of R environment.


tool_dependencies.xml files have been deprecated a long time ago. I’d recommend installing everything via Conda (or Singularity or Docker). Just make sure the name and version of the package you want to use is available in Conda. Have a look at this section of the planemo documentation: