0

I am trying to deploy my mule application build on anypoint studio, to cloud hub via Azure Devops. To do so I am doing the following:

  1. Created a repository on azure and upload the mulesoft application files on it. (success)
  2. Started a runtime server from cloud hub using mulesoft stand alone runtime on my device(via cmd). (success)
  3. create a secure file and upload setting.xml to it so that it could be used to create the pipeline.(could'nt find setting.xml file)

Hence I am not able to create the pipeline I tried uploading an setting.xml file using the following script, but maven pom.xml throws error for it:

<server>
        <id>Exchange2</id>
        <username>guest-mule</username>
        <password>Mulesoft1</password>
    </server>
    <id>Mule</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <repositories>
        <repository>
            <id>Exchange2</id>
            <name>Exchange2</name>
            <url>https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
                       <snapshots>
                <enabled>true</enabled>
           </snapshots>
        </repository>
    </repositories>
</profile>

Where to find the setting.xml file I tried searching it in .m2 folder in my system (also enabling the hidden items option)

1 Answers1

0

By default, the .m2 folder is in users folder, such as c:\Users\xxx\.m2. But it is not required, so it is make sense that there isn't .m2 folder in your system.

You could create it manually: Missing maven .m2 folder

After that you could upload this settings.xml file to Azure DevOps as secure file, then add Download Secure File task to your Azure DevOps pipeline. Then the file will be download to temp folder ($(Agent.TempDirectory)) during build/release.

You could specify settings.xml file for mvn commmand (-s or --settings ), more information, please call mvn --help to check detail options.

If you are using Maven task in your Azure DevOps pipeline, you could specify settings.xml file path (in temp folder) in Options box.

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • Thank you @starian chen-MSFT , I found that setting.xml file is for enterprise edition, So I changed the approach and followed this [link](https://dzone.com/articles/deploying-mule-application-to-cloudhub-via-aws-azu) But I am getting some error while deploying the build It would be very helpful you could give look to this [link](https://stackoverflow.com/questions/62642637/unknown-lifecycle-phase-mvn-you-must-specify-a-valid-lifecycle-phase-or-a-go) – Raghvendra Kumar Jun 29 '20 at 16:39
  • @RaghvendraKumar Others provided the solution for that issue. – starian chen-MSFT Jun 30 '20 at 02:02
  • @RaghvendraKumar For current thread, you could add an answer or [mark a solution as answer](https://stackoverflow.com/help/someone-answers) that helped you solve your issue. – starian chen-MSFT Jun 30 '20 at 02:04