1

I am using azure build pipeline to package my code, & using maven to compile my code, however i am getting below error.

2021-03-02T09:38:48.1737056Z Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
2021-03-02T09:38:48.1737158Z [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:3.1: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1
2021-03-02T09:38:48.1737237Z Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/flatten-maven-plugin/1.0.0/flatten-maven-plugin-1.0.0.pom
2021-03-02T09:38:48.1737345Z [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:flatten-maven-plugin:1.0.0: Plugin org.codehaus.mojo:flatten-maven-plugin:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:flatten-maven-plugin:jar:1.0.0

2021-03-02T09:38:48.1747396Z [INFO] BUILD FAILURE
2021-03-02T09:38:48.1747597Z [INFO] ------------------------------------------------------------------------
2021-03-02T09:38:48.1747769Z [INFO] Total time:  05:16 min
2021-03-02T09:38:48.1747937Z [INFO] Finished at: 2021-03-02T09:38:48Z
2021-03-02T09:38:48.1748208Z [INFO] ------------------------------------------------------------------------
2021-03-02T09:38:48.1748988Z [ERROR] No plugin found for prefix 'help' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\testuser\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
2021-03-02T09:38:48.1749191Z [ERROR]```
Satyam Pandey
  • 593
  • 2
  • 10
  • 32

2 Answers2

0

You may try to use a plugin directly in the pom, for example:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <testSource>1.8</testSource>
                <testTarget>1.8</testTarget>
                <compilerArgument>-Xlint:deprecation</compilerArgument>
            </configuration>
        </plugin>
    </plugins>
</build>
Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

This might due to maven download problem so I have clean up the .m2 repository on Jenkins slave and the plug in then was downloaded again .It worked for me & no code change required .