10 Replies Latest reply on Jan 29, 2018 8:45 PM by user7235020

    Could not transfer artifact from maven.oracle.com: Not authorized , ReasonPhrase:Unauthorized

    Luis

      Hello there,

       

      I have configured a build in my Oracle Developer Cloud service instance that looks like this (just the relevant parts for brevity):

       

       

       

      As it is stated in the docs: When a build runs, Oracle Developer Cloud Service creates an internal environment to access the Oracle Maven repository. It updates the internal settings.xml (not accessible to you) to add your Oracle Account credentials, encrypts your password, run the Maven commands defined in the Build Steps tab of the Job Configuration page, and then reverts the updates made to the Maven files after the build is complete.

       

      And it seems that it is doing what it promises because if we have a look at the build logs, we can see that the settings.xml is being rightly generated by chef with my OTN password encrypted.

       

      <settings xmlns="http://maven.apache.org/settings/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">  
        <!-- This file is geneated by Chef -->  
        <localRepository>/home/builder/.m2/repository</localRepository>  
        .../...  
        <servers>
        <server>
        <id>maven.oracle.com</id>
       .../...
        </server>
        </servers>
      </settings>
      

       

      However I am getting the below error:

       

      [ERROR] Failed to execute goal on project test-developer-cloud: Could not resolve dependencies for project ch.cern.openlab.oracle:test-developer-cloud:war:0.0.1: Failed to collect dependencies    at com.oracle.jdbc:ojdbc7:jar:12.1.0.2: Failed to read artifact descriptor for com.oracle.jdbc:ojdbc7:jar:12.1.0.2: Could not transfer artifact com.oracle.jdbc:ojdbc7:pom:12.1.0.2 from/to maven.oracle.com (https://maven.oracle.com): Not authorized , ReasonPhrase:Unauthorized.

       

      I am 99.99% that I am using the right credentials, I even asked a colleague to try with his own ones, but no luck .

       

      My pom.xml looks like this:

       

      <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>ch.cern.openlab.oracle</groupId>
        <artifactId>test-developer-cloud</artifactId>
        <version>0.0.1</version>
        <packaging>war</packaging>
      
      
        <build>
        <finalName>${project.artifactId}</finalName>
        </build>
      
      
        <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        </properties>
      
      
        <dependencies>
        <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
        </dependency>
        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        </dependency>
        <dependency>
        <groupId>com.oracle.jdbc</groupId>
        <artifactId>ojdbc7</artifactId>
        <version>12.1.0.2</version>
        </dependency>
        </dependencies>
        <repositories>
        <repository>
        <id>maven.oracle.com</id>
        <releases>
        <enabled>true</enabled>
        </releases>
        <snapshots>
        <enabled>false</enabled>
        </snapshots>
        <url>https://maven.oracle.com</url>
        <layout>default</layout>
        </repository>
        </repositories>
        <pluginRepositories>
        <pluginRepository>
        <id>maven.oracle.com</id>
        <url>https://maven.oracle.com</url>
        </pluginRepository>
        </pluginRepositories>
      </project>
      

       

      Am I missing something?

       

      Thanks in advance,

       

      Luis