We ( dev team ) are trying build the application in the azure enviroment, but we are receiving the following erro:
POM.XML in sequence
2022-07-26T19:02:43.9736202Z [INFO] ------------------------------------------------------------------------
2022-07-26T19:02:43.9737310Z [INFO] BUILD FAILURE
2022-07-26T19:02:43.9738503Z [INFO] ------------------------------------------------------------------------
2022-07-26T19:02:43.9739621Z [INFO] Total time: 0.382 s
2022-07-26T19:02:43.9740583Z [INFO] Finished at: 2022-07-26T19:02:43Z
2022-07-26T19:02:43.9742047Z [INFO] ------------------------------------------------------------------------
2022-07-26T19:02:43.9743721Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: The artifact information is incomplete or not valid:
2022-07-26T19:02:43.9745147Z [ERROR] [0] 'version' is missing.
2022-07-26T19:02:43.9746030Z [ERROR]
2022-07-26T19:02:43.9747289Z [ERROR] -> [Help 1]
2022-07-26T19:02:43.9748009Z [ERROR]
2022-07-26T19:02:43.9749077Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2022-07-26T19:02:43.9750293Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2022-07-26T19:02:43.9751459Z [ERROR]
2022-07-26T19:02:43.9752307Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2022-07-26T19:02:43.9753312Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
2022-07-26T19:02:43.9755256Z ##[debug]Exit code 1 received from tool '/usr/bin/bash'
2022-07-26T19:02:43.9757939Z ##[debug]STDIO streams have closed for tool '/usr/bin/bash'
2022-07-26T19:02:43.9795280Z ##[error]Bash exited with code '1'.
2022-07-26T19:02:43.9806576Z ##[debug]Processed: ##vso[task.issue type=error;]Bash exited with code '1'.
2022-07-26T19:02:43.9808790Z ##[debug]task result: Failed
2022-07-26T19:02:43.9812040Z ##[debug]Processed: ##vso[task.complete result=Failed;done=true;]
2022-07-26T19:02:43.9815121Z ##[section]Finishing: Upload app JAR to Nexus
POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.company.anything</groupId>
<artifactId>company.anything</artifactId>
<version>1.0.13-SNAPSHOT</version>
<name>company.anything</name>
<description>Used for something</description>
<inceptionYear>2021</inceptionYear>
<packaging>jar</packaging>
<organization>
<name>My home</name>
</organization>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.6</version>
<relativePath/>
</parent>
<properties>
<log4j2.version>2.17.0</log4j2.version>
<start-class>br.com.company.anything.Application</start-class>
<spring.boot.version>2.5.6</spring.boot.version>
<project.java.version>11</project.java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<lombok.version>1.18.22</lombok.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
<mockito.version>3.9.0</mockito.version>
<byte-buddy.version>1.11.22</byte-buddy.version>
<snakeyaml.version>1.29</snakeyaml.version>
<json-path.version>2.6.0</json-path.version>
<jackson-databind-nullable>0.2.1</jackson-databind-nullable>
<jakarta.xml.bind-api.version>3.0.1</jakarta.xml.bind-api.version>
<assertj-core.version>3.21.0</assertj-core.version>
<jedis-clients.version>3.7.0</jedis-clients.version>
<org.json.version>20220320</org.json.version>
<!-- Swagger -->
<springfox.version>3.0.0</springfox.version>
<swagger-annotations-version>1.5.22</swagger-annotations-version>
<swagger-annotations.version>2.1.11</swagger-annotations.version>
<!-- Compiler -->
<jacoco.version>0.8.5</jacoco.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<maven.resources.version>3.2.0</maven.resources.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<!-- Test -->
<junit5.version>5.6.2</junit5.version>
<embedded-redis.version>0.7.3</embedded-redis.version>
<!--Sonar -->
<sonar.maven.version>3.7.0.1746</sonar.maven.version>
<sonar.exclusions>src/test/**/*,**/configuration/**,**/exception/**,**/domain/**,**/dto/**</sonar.exclusions>
<sonar.coverage.exclusions>src/test/**/*,**/configuration/**,**/exception/**,**/domain/**,**/dto/**</sonar.coverage.exclusions>
<sonar.test.exclusions>src/test/**/*</sonar.test.exclusions>
<woodstox-core.version>6.2.6</woodstox-core.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<artifactId>log4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<exclusions>
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</exclusion>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
<version>${spring.boot.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>json-path</artifactId>
<groupId>com.jayway.jsonpath</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${org.json.version}</version>
</dependency>
<!-- Swagger -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-oas</artifactId>
<version>${springfox.version}</version>
<exclusions>
<exclusion>
<artifactId>byte-buddy</artifactId>
<groupId>net.bytebuddy</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>mapstruct</artifactId>
<groupId>org.mapstruct</groupId>
</exclusion>
<exclusion>
<artifactId>swagger-annotations</artifactId>
<groupId>io.swagger</groupId>
</exclusion>
<exclusion>
<artifactId>swagger-annotations</artifactId>
<groupId>io.swagger.core.v3</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox.version}</version>
<exclusions>
<exclusion>
<artifactId>mapstruct</artifactId>
<groupId>org.mapstruct</groupId>
</exclusion>
<exclusion>
<artifactId>swagger-annotations</artifactId>
<groupId>io.swagger</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Utils -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable}</version>
<exclusions>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.xml.bind-api.version}</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
<exclusions>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<!-- Database -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>${spring.boot.version}</version>
<scope>compile</scope>
</dependency>
<!-- Cache -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${spring.boot.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis-clients.version}</version>
</dependency>
<!-- Test-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<artifactId>byte-buddy-agent</artifactId>
<groupId>net.bytebuddy</groupId>
</exclusion>
<exclusion>
<artifactId>json-path</artifactId>
<groupId>com.jayway.jsonpath</groupId>
</exclusion>
<exclusion>
<artifactId>jakarta.xml.bind-api</artifactId>
<groupId>jakarta.xml.bind</groupId>
</exclusion>
<exclusion>
<artifactId>assertj-core</artifactId>
<groupId>org.assertj</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<version>${embedded-redis.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>opin-srv-identificacao-cadastramento</finalName>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.6.9</version>
<configuration>
<excludedClasses>
<param>**.domain*</param>
<param>**.dto*</param>
<param>**.exception*</param>
<param>**.configuration*</param>
<param>**.external*</param>
</excludedClasses>
<outputFormats>
<outputFormat>xml</outputFormat>
</outputFormats>
<threads>4</threads>
<avoidCallsTo>
<avoidCallsTo>java.util.logging</avoidCallsTo>
<avoidCallsTo>org.apache.log4j</avoidCallsTo>
<avoidCallsTo>org.slf4j</avoidCallsTo>
<avoidCallsTo>org.apache.commons.logging</avoidCallsTo>
</avoidCallsTo>
</configuration>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>0.12</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.2.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>
${project.basedir}/src/main/resources/specification/company.anything.yaml
</inputSpec>
<generatorName>spring</generatorName>
<apiPackage>br.com.company.anything.interfaceadapter.autogenerated.delegate</apiPackage>
<modelPackage>br.com.company.anything.interfaceadapter.autogenerated.domain</modelPackage>
<templateDirectory>${project.basedir}/src/main/resources/templates</templateDirectory>
<supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>
<configOptions>
<serializableModel>true</serializableModel>
<delegatePattern>true</delegatePattern>
<serializableModel>true</serializableModel>
<basePackage>br.com.company.anything</basePackage>
<invokerPackage>br.com.company.anything</invokerPackage>
<configPackage>br.com.company.anything.external.configuration</configPackage>
<modelPackage>br.com.company.anything.interfaceadapter.autogenerated.domain</modelPackage>
<apiPackage>br.com.company.anything.interfaceadapter.autogenerated.delegate</apiPackage>
<additionalModelTypeAnnotations>
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
</additionalModelTypeAnnotations>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.maven.version}</version>
<dependencies>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>${woodstox-core.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>11</source>
<target>11</target>
<release>${project.java.version}</release>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<addResources>true</addResources>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<!-- Force alphabetical order to have a reproducible build -->
<runOrder>alphabetical</runOrder>
<!-- Excludes integration tests from build execution -->
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*IntTest.java</exclude>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</reporting>
</project>
We read a lot of question but no one until now fix the problem. You can suggest any configuration tha we´ll check.
PS: Our team does not have access to the azure pipeline configuration to change anything, there are others projects running there, we need isolate the problem and to be sure that is not in our code.
Thank you in advance
Hi all,
I resolved my problem configuring th end of line EOF from CRLF to LF
I hope this help who faces this problem
see you