0
votes

I need to copy this source file to C:\Program Files (x86)\Jenkins\workspace\vb\target\vb3-5.0-SNAPSHOT.war

In this destination folder: C:\Program Files (x86)\Jenkins\workspace\VB_deploy\st-5.0-SNAPSHOT/deploy/

The problem stems from the fact that the internal name of the folder .../.../st-5.0-SNAPSHOT/.../... It may vary over time in 5.1 / 5.2 / 6.0, etc.

I had thought of something like this, but it does not work:

    <project name="copia">
<target name="copia_war">
    <dirset id="destinazione" dir="C:\Program Files(x86)\Jenkins\workspace\VB_deploy\">
        <include name="st-*/deploy"/> 
     </dirset>

    <fileset id="origine" dir="C:\Program Files (x86)\Jenkins\workspace\vb\target\" includes="vb*-*-SNAPSHOT.war"/>


    <copy todir="${destinazione}" >         
        <fileset refid="origine" /> 

    </copy>

</target>
</project>

copy the file to a variable, but not to the right destination directory. How can I do?

1

1 Answers

0
votes
   <target name="copia_war">
        <dirset id="mia_variabile" dir="C:\Program Files (x86)\Jenkins\workspace\VB_deploy\">                           
            <include name="st-*/deploy"/>
        </dirset>
        <pathconvert property="mia_variabile_2" refid="mia_variabile"/>                     

        <copy todir="${mia_variabile_2}" >                                                  
            <fileset dir="C:\Program Files (x86)\Jenkins\workspace\vb\target\" includes="vb*-*-SNAPSHOT.war" /> 
        </copy>
    </target>

solution