Re: KMP: error message improval

2020-01-24 Thread Jean-Baptiste Onofré
Hi Markus,

It's a fair point. At least the plugin should display "clear/human"
message. I think it's an easy first improvement to do (see my message on
the list this morning about improving error messages).

Regards
JB

On 24/01/2020 15:35, Markus Rathgeb wrote:
> Hi,
> 
> I am using the karaf maven plugin to verify my feature files.
> As I changed some of them and introduced new ones (some restructuring)
> I run into the error that the verification cannot be run anymore.
> 
> I found the error after some time, and it has been caused by a mistake
> I did on the feature restructuring. The error has been in my feature
> definitions and not in the Maven plugin, but the message given by the
> plugin has not been really helpful (and could be perhaps improved).
> 
> So, let's first give you the error in a feature definition:
> * there is feature_b that declares feature_a as repository
> * there is feature_a that declares feature_b as repository (that
> dependency has been introduced by copy and paste and has been my
> fault)
> * both projects can be build and verified at least as long as no
> feature of the one repo needs one of the other
> * there is feature_c that declares feature_b as repository
> * the feature_c depends on features from feature_b
> 
> The verification of feature_c fails with that message (I used the
> Maven option "-e" to get a stracktrace):
> 
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  9.289 s
> [INFO] Finished at: 2020-01-24T14:46:50+01:00
> [INFO] 
> 
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:karaf-maven-plugin:4.2.8:verify (verify) on
> project foo: Unable to load features descriptors: Error:
> [ERROR] null
> [ERROR] null
> [ERROR] null
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.8:verify
> (verify) on project foo: Unable to load features descriptors
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:215)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> 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:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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
> load features descriptors
> at org.apache.karaf.tooling.VerifyMojo.doExecute (VerifyMojo.java:319)
> at org.apache.karaf.tooling.VerifyMojo.execute (VerifyMojo.java:202)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at 
> 

KMP: error message improval

2020-01-24 Thread Markus Rathgeb
Hi,

I am using the karaf maven plugin to verify my feature files.
As I changed some of them and introduced new ones (some restructuring)
I run into the error that the verification cannot be run anymore.

I found the error after some time, and it has been caused by a mistake
I did on the feature restructuring. The error has been in my feature
definitions and not in the Maven plugin, but the message given by the
plugin has not been really helpful (and could be perhaps improved).

So, let's first give you the error in a feature definition:
* there is feature_b that declares feature_a as repository
* there is feature_a that declares feature_b as repository (that
dependency has been introduced by copy and paste and has been my
fault)
* both projects can be build and verified at least as long as no
feature of the one repo needs one of the other
* there is feature_c that declares feature_b as repository
* the feature_c depends on features from feature_b

The verification of feature_c fails with that message (I used the
Maven option "-e" to get a stracktrace):

[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  9.289 s
[INFO] Finished at: 2020-01-24T14:46:50+01:00
[INFO] 
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.8:verify (verify) on
project foo: Unable to load features descriptors: Error:
[ERROR] null
[ERROR] null
[ERROR] null
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.8:verify
(verify) on project foo: Unable to load features descriptors
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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
load features descriptors
at org.apache.karaf.tooling.VerifyMojo.doExecute (VerifyMojo.java:319)
at org.apache.karaf.tooling.VerifyMojo.execute (VerifyMojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain