karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Papon <francois.pa...@openobject.fr>
Subject Re: [4.2.0.M1] - Assembly build failed with endorsed libraries
Date Mon, 06 Nov 2017 20:28:51 GMT
Ok, I will remove this tag.

Thanks

Le 7 nov. 2017 00:17, Jean-Baptiste Onofré <jb@nanthrax.net> a écrit :
>
> Hi, 
>
> As Karaf 4.2.x targets Java 9, we had to change some stuff. As endorsed doesn't 
> exist anymore in Java 9, <libraries/> tag should stay empty. 
>
> Regards 
> JB 
>
> On 11/06/2017 09:12 PM, Francois Papon wrote: 
> > Hi, 
> > 
> > I just change the Karaf version of my custom distribution from 4.1.2 to 4.2.0.M1

> > and the maven build failed on the assembly. 
> > 
> > The endorsed librairies are found by the plugin in the local repository but not

> > copy in the lib/endorsed target directory. 
> > 
> > Here the plugin declaration with <librairies> 
> > 
> >              <plugin> 
> > <groupId>org.apache.karaf.tooling</groupId> 
> > <artifactId>karaf-maven-plugin</artifactId> 
> >                  <version>${karaf.version}</version> 
> >                  <extensions>true</extensions> 
> >                  <configuration> 
> >                      <installedFeatures> 
> >                          <feature>my-project</feature>

> >                      </installedFeatures> 
> >                      <bootFeatures> 
> >                          <feature>wrapper</feature>

> >                          <feature>wrap</feature>

> > <feature>aries-blueprint</feature> 
> >                          <feature>shell</feature>

> > <feature>shell-compat</feature> 
> >                          <feature>feature</feature>

> >                          <feature>jaas</feature>

> >                          <feature>ssh</feature> 
> >                          <feature>management</feature>

> >                          <feature>bundle</feature>

> >                          <feature>config</feature>

> >                          <feature>deployer</feature>

> >                          <feature>diagnostic</feature>

> >                          <feature>instance</feature>

> >                          <feature>kar</feature> 
> >                          <feature>log</feature> 
> >                          <feature>package</feature>

> >                          <feature>service</feature>

> >                          <feature>system</feature>

> >                          <feature>eventadmin</feature>

> >                          <feature>scr</feature> 
> > 
> >                          <feature>jdbc</feature>

> >                          <feature>jndi</feature>

> >                          <feature>jpa</feature> 
> >                          <feature>jms</feature> 
> >                          <feature>transaction</feature>

> >                          <feature>eclipselink</feature>

> >                          <feature>spring</feature>

> >                          <feature>war</feature> 
> > 
> >                          <feature>cxf</feature> 
> >                          <feature>cxf-jaxrs</feature>

> > <feature>cxf-rs-description-swagger2</feature> 
> > 
> >                          <feature>pax-jdbc</feature>

> > <feature>pax-jdbc-config</feature> 
> > <feature>pax-jdbc-pool-hikaricp</feature> 
> > <feature>pax-jdbc-pool-aries</feature> 
> > <feature>pax-jdbc-postgresql</feature> 
> > 
> > <feature>activemq-client</feature> 
> >                          <feature>activemq-cf</feature>

> >                          <feature>activemq</feature>

> > <feature>activemq-camel</feature> 
> > 
> >                          <feature>camel</feature>

> > <feature>camel-jackson</feature> 
> > <feature>camel-restlet</feature> 
> > <feature>camel-restlet-jackson</feature> 
> >                          <feature>camel-jms</feature>

> > <feature>camel-servlet</feature> 
> > <feature>camel-swagger-java</feature> 
> > 
> >                          <!-- CELLAR --> 
> >                          <feature>cellar</feature>

> >                      </bootFeatures> 
> > *<libraries>** 
> > **<library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true</library>**

> > **<library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true</library>**

> > **                    </libraries>* 
> >                      <javase>1.8</javase> 
> >                  </configuration> 
> >              </plugin> 
> > 
> > 
> > [INFO] Downloading libraries 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.jaxrs-api-2.1:jar:2.9.1)
as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxrs-api-2.1/2.9.1/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar

> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.json-api-1.1:jar:2.9.0)

> > as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.json-api-1.1/2.9.0/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar 
> > ... 
> > [DEBUG] Connection manager is shutting down 
> > [DEBUG] Connection manager shut down 
> > [ERROR] Failed to execute goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly (default-assembly)

> > on project moss-orchestrator-assembly: Unable to build assembly: Error: 
> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar

> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

> > [ERROR] -> [Help 1] 
> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly (default-assembly)

> > on project moss-orchestrator-assembly: Unable to build assembly 
> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)

> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

> >      at 
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

> >      at 
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

> >      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:307) 
> >      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 
> >      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 
> >      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) 
> >      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) 
> >      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 
> >      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)

> > Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build assembly

> >      at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:283)

> >      at 
> > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

> >      ... 20 more 
> > Caused by: org.apache.karaf.features.internal.util.MultiException: Error: 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar

> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

> >      at 
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:91)

> >      at 
> > org.apache.karaf.profile.assembly.CustomDownloadManager$CustomMavenDownloader.<init>(CustomDownloadManager.java:57)

> >      at 
> > org.apache.karaf.profile.assembly.CustomDownloadManager.createDownloader(CustomDownloadManager.java:54)

> >      at 
> > org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:599) 
> >      at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:446)

> >      at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:521)

> >      at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:277)

> >      ... 22 more 
> >      Suppressed: java.nio.file.NoSuchFileException: 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar

> >          at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)

> >          at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)

> >          at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

> >          at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:243) 
> >          at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581) 
> >          at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)

> >          at java.nio.file.Files.copy(Files.java:1274) 
> >          at 
> > org.apache.karaf.profile.assembly.Builder.lambda$downloadLibraries$2(Builder.java:735)

> >          at 
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.lambda$download$0(MavenDownloadManager.java:138)

> >          at 
> > org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:350)

> >          at 
> > org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:299)

> >          at 
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:134)

> >          at 
> > org.apache.karaf.profile.assembly.Builder.downloadLibraries(Builder.java:729) 
> >          at 
> > org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:601) 
> >          ... 25 more 
> >      Suppressed: java.nio.file.NoSuchFileException: 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar

> >          at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)

> >          at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)

> >          at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

> >          at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:243) 
> >          at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581) 
> >          at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)

> >          at java.nio.file.Files.copy(Files.java:1274) 
> >          at 
> > org.apache.karaf.profile.assembly.Builder.lambda$downloadLibraries$2(Builder.java:735)

> >          at 
> > org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.lambda$download$0(MavenDownloadManager.java:138)

> >          at 
> > org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:350)

> >          at 
> > org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:335)

> >          at 
> > org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:259)

> >          at 
> > org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)

> >          at 
> > org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:61)

> >          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

> >          at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> >          at 
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

> >          at 
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

> >          at 
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

> >          at 
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

> >          at java.lang.Thread.run(Thread.java:748) 
> > 
> > 
>
> -- 
> Jean-Baptiste Onofré 
> jbonofre@apache.org 
> http://blog.nanthrax.net 
> Talend - http://www.talend.com 
Mime
View raw message