Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CEA0C200CC2 for ; Wed, 5 Jul 2017 16:09:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CD0F31635DF; Wed, 5 Jul 2017 14:09:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 273621635DC for ; Wed, 5 Jul 2017 16:09:08 +0200 (CEST) Received: (qmail 39663 invoked by uid 500); 5 Jul 2017 14:09:07 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 39651 invoked by uid 99); 5 Jul 2017 14:09:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 14:09:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D1F57CF958 for ; Wed, 5 Jul 2017 14:09:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.21 X-Spam-Level: X-Spam-Status: No, score=-99.21 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6roq8QUHlvUH for ; Wed, 5 Jul 2017 14:09:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 9BAE161EFC for ; Wed, 5 Jul 2017 14:09:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 788F5E0DE9 for ; Wed, 5 Jul 2017 14:09:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 61AF824634 for ; Wed, 5 Jul 2017 14:09:00 +0000 (UTC) Date: Wed, 5 Jul 2017 14:09:00 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KARAF-5235) Remove null values from AssemblyMojo configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Jul 2017 14:09:09 -0000 [ https://issues.apache.org/jira/browse/KARAF-5235?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 resolved KARAF-5235. ----------------------------------------- Resolution: Fixed > Remove null values from AssemblyMojo configuration > -------------------------------------------------- > > Key: KARAF-5235 > URL: https://issues.apache.org/jira/browse/KARAF-5235 > Project: Karaf > Issue Type: Improvement > Components: karaf-tooling > Reporter: John Poth > Assignee: Jean-Baptiste Onofr=C3=A9 > Fix For: 4.2.0 > > > When building Karaf distributions, it would be nice to be able to tweak t= he distribution using Maven profiles to add a feature or a bundle (etc..). = However if the Maven profile which adds these bundles/features is not activ= e we currently get an NPE: > {code} > =09at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecut= or.java:212) > =09at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecut= or.java:153) > =09at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecut= or.java:145) > =09at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildPro= ject(LifecycleModuleBuilder.java:116) > =09at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildPro= ject(LifecycleModuleBuilder.java:80) > =09at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleTh= readedBuilder.build(SingleThreadedBuilder.java:51) > =09at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecy= cleStarter.java:128) > =09at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) > =09at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) > =09at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) > =09at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) > =09at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) > =09at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp= l.java:62) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:43) > =09at java.lang.reflect.Method.invoke(Method.java:497) > =09at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(La= uncher.java:289) > =09at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.j= ava:229) > =09at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(= Launcher.java:415) > =09at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.jav= a:356) > Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to buil= d assembly > =09at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:268= ) > =09at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Defau= ltBuildPluginManager.java:134) > =09at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecut= or.java:207) > =09... 20 more > Caused by: java.lang.NullPointerException > =09at org.apache.felix.utils.properties.ConfigurationHandler.writeValue(C= onfigurationHandler.java:724) > =09at org.apache.felix.utils.properties.ConfigurationHandler.write(Config= urationHandler.java:228) > =09at org.apache.felix.utils.properties.TypedProperties.convertToString(T= ypedProperties.java:345) > =09at org.apache.felix.utils.properties.TypedProperties.put(TypedProperti= es.java:172) > =09at org.apache.felix.utils.properties.TypedProperties.put(TypedProperti= es.java:52) > =09at org.apache.karaf.profile.impl.ProfileBuilderImpl.addAgentConfigurat= ion(ProfileBuilderImpl.java:279) > =09at org.apache.karaf.profile.impl.ProfileBuilderImpl.setBundles(Profile= BuilderImpl.java:198) > =09at org.apache.karaf.profile.assembly.Builder.generateProfile(Builder.j= ava:1392) > =09at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builde= r.java:556) > =09at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.= java:446) > =09at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:5= 06) > =09at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:262= ) > {code} > I've updated a [test|https://github.com/apache/karaf/pull/326/commits/46a= 7e81b0d6cc2d9b6b3587e33d843572bb3b25b#diff-856de06d8db7e7a4f3e6edc7ce673166= R82] to better illustrate the enhancement. > The affected properties are: > * startupRepositories=20 > * bootRepositories > * installedRepositories=20 > * startupBundles > * bootBundles > * installedBundles=20 > * blacklistedBundles=20 > * startupFeatures > * bootFeatures > * installedFeatures > * blacklistedFeatures=20 > * startupProfiles > * bootProfiles=20 > * installedProfiles > * blacklistedProfiles > * blacklistedRepositories > Thanks! -- This message was sent by Atlassian JIRA (v6.4.14#64029)