repackage is failed using spring-boot-maven-plugin 2.0.0 as follow:

...
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ demo ---
[INFO] Building jar: /Users/xxx/Downloads/demo/target/demo-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:repackage (default) @ demo ---
Downloading: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-maven-plugin/2.0.0.BUILD-SNAPSHOT/spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.pom
[WARNING] The POM for org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.BUILD-20171009.040825-10 is missing, no dependency information available
[WARNING] Error injecting: org.springframework.boot.maven.RepackageMojo
java.lang.NoClassDefFoundError: org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getDeclaredConstructors(Class.java:2020)
    at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
    at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
    at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:658)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:882)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:805)
    at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:282)
    at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:214)
    at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1006)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1038)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1001)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
    at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
    at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
    at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
    at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
    at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:519)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
    at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
    at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 61 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.516 s
[INFO] Finished at: 2017-10-09T20:51:18+09:00
[INFO] Final Memory: 29M/262M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:repackage (default) on project demo: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:repackage failed: A required class was missing while executing org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:repackage: org/apache/maven/shared/artifact/filter/collection/ArtifactsFilter
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/xxx/.m2/repository/org/springframework/boot/spring-boot-maven-plugin/2.0.0.BUILD-SNAPSHOT/spring-boot-maven-plugin-2.0.0.BUILD-SNAPSHOT.jar
[ERROR] urls[1] = file:/Users/xxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Comment From: snicoll

[WARNING] The POM for org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.BUILD-20171009.040825-10 is missing, no dependency information available

The snapshot is either corrupted or you're facing another issue with recent snapshots build. Can you try with -U ?

ping @philwebb

Comment From: kazuki43zoo

I've tried -U option. However, still failing. And I've deleted all artifacts of spring in the local repository, the result is same.

Comment From: snicoll

@kazuki43zoo that error is definitely related to the repository, not the code. As long as you have the warning I've pasted, this error will be present (as the classpath won't be correct).

Comment From: kazuki43zoo

@snicoll Thanks for your comment.

Repository status.

mavne-metadata.xml

<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <version>2.0.0.BUILD-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20171009.005124</timestamp>
      <buildNumber>9</buildNumber>
    </snapshot>
    <lastUpdated>20171009040826</lastUpdated>
    <snapshotVersions>
      <snapshotVersion>
        <classifier>javadoc</classifier>
        <extension>jar</extension>
        <value>2.0.0.BUILD-20171009.005124-9</value>
        <updated>20171009005124</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>sources</classifier>
        <extension>jar</extension>
        <value>2.0.0.BUILD-20171009.005124-9</value>
        <updated>20171009005124</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>jar</extension>
        <value>2.0.0.BUILD-20171009.040825-10</value>
        <updated>20171009040825</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>2.0.0.BUILD-20171009.005124-9</value>
        <updated>20171009005124</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>site</classifier>
        <extension>jar</extension>
        <value>2.0.0.BUILD-20171009.005124-9</value>
        <updated>20171009005124</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
</metadata>

https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-maven-plugin/2.0.0.BUILD-SNAPSHOT/

Name                                                                     Last modified      Size
../
maven-metadata.xml                                                        09-Oct-2017 04:08  1.44 KB
maven-metadata.xml.asc                                                    07-Apr-2017 14:16  183 bytes
maven-metadata.xml.asc.md5                                                07-Apr-2017 14:16  32 bytes
maven-metadata.xml.asc.sha1                                               07-Apr-2017 14:16  40 bytes
maven-metadata.xml.md5                                                    09-Oct-2017 04:08  32 bytes
maven-metadata.xml.sha1                                                   09-Oct-2017 04:08  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-javadoc.jar        08-Oct-2017 15:52  108.04 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-javadoc.jar.md5    08-Oct-2017 15:52  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-javadoc.jar.sha1   08-Oct-2017 15:52  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-site.jar           08-Oct-2017 15:52  378.73 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-site.jar.md5       08-Oct-2017 15:52  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-site.jar.sha1      08-Oct-2017 15:52  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-sources.jar        08-Oct-2017 15:52  36.88 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-sources.jar.md5    08-Oct-2017 15:52  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171006.173235-6-sources.jar.sha1   08-Oct-2017 15:52  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-javadoc.jar        09-Oct-2017 00:51  108.04 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-javadoc.jar.md5    09-Oct-2017 00:51  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-javadoc.jar.sha1   09-Oct-2017 00:51  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-site.jar           09-Oct-2017 00:51  378.75 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-site.jar.md5       09-Oct-2017 00:51  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-site.jar.sha1      09-Oct-2017 00:51  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-sources.jar        09-Oct-2017 00:51  36.88 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-sources.jar.md5    09-Oct-2017 00:51  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8-sources.jar.sha1   09-Oct-2017 00:51  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8.pom                09-Oct-2017 00:51  4.42 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8.pom.md5            09-Oct-2017 00:51  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005123-8.pom.sha1           09-Oct-2017 00:51  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-javadoc.jar        09-Oct-2017 04:08  108.06 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-javadoc.jar.md5    09-Oct-2017 04:08  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-javadoc.jar.sha1   09-Oct-2017 04:08  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-site.jar           09-Oct-2017 04:08  378.75 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-site.jar.md5       09-Oct-2017 04:08  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-site.jar.sha1      09-Oct-2017 04:08  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-sources.jar        09-Oct-2017 04:08  36.88 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-sources.jar.md5    09-Oct-2017 04:08  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9-sources.jar.sha1   09-Oct-2017 04:08  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.jar                09-Oct-2017 00:51  64.25 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.jar.md5            09-Oct-2017 00:51  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.jar.sha1           09-Oct-2017 00:51  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.pom                09-Oct-2017 04:08  4.42 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.pom.md5            09-Oct-2017 04:08  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.pom.sha1           09-Oct-2017 04:08  40 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.jar               09-Oct-2017 04:08  64.25 KB
spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.jar.md5           09-Oct-2017 04:08  32 bytes
spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.jar.sha1          09-Oct-2017 04:08  40 bytes

Comment From: kazuki43zoo

Probably, a root cause is same with #10534.

Comment From: philwebb

People internally and on gitter are also reporting problems.

Comment From: philwebb

I'm pretty sure this is due to checksum checks confusing artifactory. Looking at spring-boot-maven-plugin we have a spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.jar file that was uploaded in spring-boot-build-26 but we don't have a POM file. The spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.pom however seems to have had its properties updated and it now shows that it was part of spring-boot-build-26 (but it should have been from an earlier build).

Spring Security have also hit similar issues recently and JFrog have told them that it might be related to the order that files are uploaded. I've tried to refine our artifactory concourse resource so we'll see if that makes any difference.

Comment From: philwebb

Here are the Spring Security issue:

  • https://github.com/spring-projects/spring-security/issues/4609
  • https://github.com/spring-projects/spring-session/issues/895

I think our changes to the concourse resource means we're now OK but I'll leave this one open a little longer.

@kazuki43zoo Does a build with -U now work for you?

Comment From: kazuki43zoo

@philwebb Working fine now!!

Comment From: philwebb

Thanks @kazuki43zoo, I'll close it quick :)

Please comment back if you find it happens again.

Comment From: sanwancoder



spring plugins

<activation>  
  <jdk>spring plugins</jdk>  
</activation>

<pluginRepositories>  
  <pluginRepository>  
    <id>spring plugins</id>  
    <name>Spring plugins</name>  
    <url>https://maven.aliyun.com/repository/spring-plugin</url>  
    <layout>default</layout>  
    <snapshotPolicy>always</snapshotPolicy>  
  </pluginRepository>  
</pluginRepositories>


Comment From: xasnow

I'm pretty sure this is due to checksum checks confusing artifactory. Looking at spring-boot-maven-plugin we have a spring-boot-maven-plugin-2.0.0.BUILD-20171009.040825-10.jar file that was uploaded in spring-boot-build-26 but we don't have a POM file. The spring-boot-maven-plugin-2.0.0.BUILD-20171009.005124-9.pom however seems to have had its properties updated and it now shows that it was part of spring-boot-build-26 (but it should have been from an earlier build).

Spring Security have also hit similar issues recently and JFrog have told them that it might be related to the order that files are uploaded. I've tried to refine our artifactory concourse resource so we'll see if that makes any difference.

When I replaced 1.5.7 with spring-boot-maven-plugin-2.0.0, my problem was solved, thank you very much

Comment From: wind57

this is back for un in spring-cloud-kubernetes, see here. I still can't make any sense of what is going on, though

Comment From: snicoll

@wind57 there's no need to comment in multiple places for the same problem.