“Can not set org.eclipse.aether.spi.log.Logger” with custom maven plugin

后端 未结 10 1817
长情又很酷
长情又很酷 2021-02-18 13:15

I have written a small custom maven plugin, and it runs fine.. most of the time.

When using it, it\'s configured to run on test phase, and I see it executing, no proble

相关标签:
10条回答
  • 2021-02-18 13:49

    I had same issue but after updating maven version from 3.3.9 to 3.6.3 solved my problem. Please try upgrading maven to 3.6.X . Hope this helps someone. Happy Learning :).

    0 讨论(0)
  • 2021-02-18 13:56

    I had the same issue and changed jdeb plugin version and it fixed.

    0 讨论(0)
  • 2021-02-18 13:58

    After some research, I felt it looked like some version incompatibility. and indeed, it is, between the maven version I am using to build the applications using the plugin, and the maven core version used in the plugin.

    • in my plugin, I was using latest maven core version available as a dependency, ie 3.5.2
    • I am building the plugin with Maven 3.3.1 and build is OK.
    • but when I build a project using the plugin, with Maven 3.3.1, the problem happens.

    I downgraded maven core to 3.3.9, then rebuilt my plugin, and it works now.

    I guess there are some incompatibilities between maven core 3.5.x and previous maven runtime..

    I see on https://jaxenter.com/apache-maven-3-5-0-nothing-see-3-4-0-move-along-133180.html that they switched ... from Eclipse Aether to Maven Artifact Resolver

    but what was very confusing is that my build was failing not at the time of my plugin being called, but after.

    0 讨论(0)
  • 2021-02-18 13:58

    For a spring boot project, if you can't easily update maven version for some reason ( in my case the error appeared in automated builds which used a maven docker container from a custom docker registry )

    Specifying a version for plugin spring-boot-maven-plugin fixed the issue for me

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>1.3.5.RELEASE</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    
    0 讨论(0)
  • 2021-02-18 13:58

    In my case, 3.3.9 maven was mandatory to use as other project were using same maven in jenkins build.

    So I downgraded my com.spotify plugin from 1.4.10 to 1.4.6 by refering to below link

    https://mvnrepository.com/artifact/com.spotify/dockerfile-maven-plugin/1.4.6
    

    in this link we can see maven supported version

    0 讨论(0)
  • 2021-02-18 14:03
    1. Check the version of maven on your command prompt with "mvn --version".
    2. run the "mvn deploy" on command line to see if that works.
    3. Go to Build -> Execution, Deployment > Build tools > Maven in IntelliJ and change the version of maven to the version available on your pc instead of the default bundle provided.
    0 讨论(0)
提交回复
热议问题