0
votes

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>
1
Can you share your pipeline?Shayki Abramczyk
really sorry to disappoint you but it is not my private pipeline hence can not share.Yuvraj
So how we can help you? maybe you have an issue in the pipeline configuration?Shayki Abramczyk
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
@Leo Liu-MSFT . I already have, please read the comment just above yours.Yuvraj

1 Answers

0
votes

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