0

I am looking to use Azure SDK in my Spring Boot app.

This is the repo URLin my POM file : http://maven.apache.org/maven2

I am not getting to add Azure dependency to the file. I have found the BOM file:https://repo.maven.apache.org/maven2/com/azure/azure-sdk-bom/

It does not work in my case.

More precisely, the storage dependency is not working (cannot find) The BOM dependency works but I cannot download any dependency inside.

Below is a preview of my pom file.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.test</groupId>
    <artifactId>tesrt</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>tesrt</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jbcrypt.version>0.4</jbcrypt.version>
        <java.version>1.8</java.version>
    </properties>

    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <activatedProperties>dev</activatedProperties>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <activatedProperties>prod</activatedProperties>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
    </profiles>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.4.RELEASE</version>
    </parent>

    <dependencies>

        <!-- AZURE SDK-->

        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-storage-queue</artifactId>
            <version>12.3.0</version>
        </dependency>

        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-sdk-bom</artifactId>
            <version>1.0.4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>


        
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>2.2.4.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>com.twilio.sdk</groupId>
            <artifactId>twilio</artifactId>
            <version>7.47.3</version>
        </dependency>

I have another problem in the BOM file:

It says the following cannot be found:

<plugin>
            <groupId>net.jonathangiles.tools</groupId>
            <artifactId>dependencyChecker-maven-plugin</artifactId>
            <version>1.0.6</version> 


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
Nesan Mano
  • 1,892
  • 2
  • 26
  • 43
  • 1
    You should be using `dependencyManagement` section for BOM imports, then remove the version from anything else you import into the `dependencies` section that you want from the BOM – OneCricketeer Oct 02 '21 at 20:45
  • Also, if you look at the BOM xml, storage queue uses version 12.11.0, so it's unclear why you are trying to use something else – OneCricketeer Oct 02 '21 at 20:47
  • I have another problem in the BOM file : dependencyChecker-maven-plugin & maven-antrun-plugin cannot be found – Nesan Mano Oct 02 '21 at 21:27
  • What do those have to do with your Azure problem? You don't appear to have ant tasks to run, so why do you need this plugin? And it's current version is 3.0.0, not 1.8... The errors you're getting seem to be very specific to the versions you're trying to use, which all don't appear to exist. The dependency checker project is at 1.0.5 in its github, for example, so where are you getting 1.0.6? – OneCricketeer Oct 03 '21 at 06:16

0 Answers0