0

I have a maven project which is running successfully on my local machine eclipse. But when I ran the same on Azure DevOps pipeline it says "Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile"

I have tried all the possible configurations in my pom. I am almost to give up on this.

UTF-8

    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <java.version>1.8</java.version>

</properties>

<build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
        <resource>
            <directory>src</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.14.1</version>
            <configuration>
                <!-- Suite testng xml file to consider for test execution -->
                <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                </suiteXmlFiles>
                <forkMode>never</forkMode>
            </configuration>
        </plugin>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <fork>true</fork>
                <executable>C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe</executable> 

            </configuration>
        </plugin>
    </plugins>
Yuvraj
  • 79
  • 1
  • 2
  • 10
  • Can you share your pipeline? – Shayki Abramczyk Sep 18 '19 at 09:27
  • really sorry to disappoint you but it is not my private pipeline hence can not share. – Yuvraj Sep 18 '19 at 09:33
  • So how we can help you? maybe you have an issue in the pipeline configuration? – Shayki Abramczyk Sep 18 '19 at 09:36
  • I think then I need to replicate this same stuff on the other new pipeline to share with you. how do we share by the pipeline way? – Yuvraj Sep 18 '19 at 09:51
  • I just changed my agent from ubunto to windows. it solved. Thanks @Shyaki . – Yuvraj Sep 18 '19 at 10:52
  • @Yuvraj, It seems you have resolved your question, would you mind share your solution as answer, so it could help other community members who get the same issues and find the answer easier. Thanks. – Leo Liu Sep 19 '19 at 07:02
  • 1
    @Leo Liu-MSFT . I already have, please read the comment just above yours. – Yuvraj Sep 25 '19 at 08:52
  • @Yuvraj, Yes, I have seen it. But that is a comment, would you please convert it to the answer, so so it could help other community members who get the same issues and find the answer more easier, thanks. like: https://stackoverflow.com/questions/58028887/import-repository-from-github-to-azure-repos – Leo Liu Sep 25 '19 at 10:05

1 Answers1

0

I just changed my agent from ubunto to windows. it solved.

Yuvraj
  • 79
  • 1
  • 2
  • 10