Question: Tool.xml : correct way to define an environment_variable ?
0
gravatar for plindenbaum
2.1 years ago by
plindenbaum90
France
plindenbaum90 wrote:

I'm trying to create some tools.xml that use java. Those tools need to download some library (*.jar) files from http://central.maven.org/ and I want to create a variable $MYTOOLCLASSPATH containing the jars. I've tried the following xml :

    
    <tool_dependency>
      <package name="mytool" version="0.0.1">
        <install version="1.0">
          <actions>
            <action type="shell_command">wget -P "$REPOSITORY_INSTALL_DIR" "http://central.maven.org/lib1.jar"  "http://central.maven.org/lib2.jar"</action>
            <action type="set_environment">
                <environment_variable name="MYTOOLCLASSPATH" action="set_to">$REPOSITORY_INSTALL_DIR/lib1.jar:$REPOSITORY_INSTALL_DIR/lib2.jar</environment_variable>   
            </action>
          </actions>
        </install>
      </package>
    </tool_dependency>

the tool is defined in a macro.xml:

          (...)
          <token name="@MYJAVA@">
    java   -cp "\${MYTOOLCLASSPATH}" 
          </token>
          (...)

and called in my tool.xml:

        <command>@MYJAVA@ tool.Tool ${input} &gt; ${out} </command>

but It seems that $MYTOOLCLASSPATH is empty.

I've also tried to create a set_environment under tool_dependency:

<set_environment version="1.0">
   <environment_variable name="MYTOOLCLASSPATH" action="set_to">$REPOSITORY_INSTALL_DIR/lib1.jar:$REPOSITORY_INSTALL_DIR/lib2.jar</environment_variable>
</set_environment>

same problem: the $MYTOOLCLASSPATH remains empty

What's the correct way to define MYTOOLCLASSPATH ?

ADD COMMENTlink modified 2.1 years ago by Bjoern Gruening5.1k • written 2.1 years ago by plindenbaum90
1
gravatar for plindenbaum
2.1 years ago by
plindenbaum90
France
plindenbaum90 wrote:

the question was answered on http://dev.list.galaxyproject.org/Tool-xml-correct-way-to-define-an-environment-variable-td4670165.html

ADD COMMENTlink written 2.1 years ago by plindenbaum90
1
gravatar for Bjoern Gruening
2.1 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.1k wrote:

Hi Pierre,

how much chocolate do I need to send you that you try bioconda and use this as dependency resolver for your tool?

For example see this one here: https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/meta.yaml

Cheers, Bjoern

ADD COMMENTlink written 2.1 years ago by Bjoern Gruening5.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 173 users visited in the last hour