This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
     new c5a53e7  fix filter to filter over group and artifact, fix output to 
print service class
c5a53e7 is described below

commit c5a53e792cc4caefb81d28367a4f3f3150d51401
Author: Mike Hummel <[email protected]>
AuthorDate: Tue Mar 24 15:51:32 2020 +0100

    fix filter to filter over group and artifact, fix output to print service 
class
    
    (cherry picked from commit 572c400d123d94a907302244ac1203a86247ec05)
---
 .../apache/karaf/tooling/tracker/GenerateServiceMetadata.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/tooling/karaf-services-maven-plugin/src/main/java/org/apache/karaf/tooling/tracker/GenerateServiceMetadata.java
 
b/tooling/karaf-services-maven-plugin/src/main/java/org/apache/karaf/tooling/tracker/GenerateServiceMetadata.java
index d2fd670..1790330 100644
--- 
a/tooling/karaf-services-maven-plugin/src/main/java/org/apache/karaf/tooling/tracker/GenerateServiceMetadata.java
+++ 
b/tooling/karaf-services-maven-plugin/src/main/java/org/apache/karaf/tooling/tracker/GenerateServiceMetadata.java
@@ -140,7 +140,7 @@ public class GenerateServiceMetadata extends AbstractMojo {
             List<Class<?>> services = 
finder.findAnnotatedClasses(Service.class);
             Set<String> packages = new TreeSet<>();
             for (Class<?> clazz : services) {
-                getLog().info("Service " + clazz.getPackage().getName());
+                getLog().info("Service " + clazz.getCanonicalName());
                 packages.add(clazz.getPackage().getName());
             }
             if (!packages.isEmpty()) {
@@ -196,14 +196,15 @@ public class GenerateServiceMetadata extends AbstractMojo 
{
 
             urls.add(new 
File(project.getBuild().getOutputDirectory()).toURI().toURL());
             for (Artifact artifact : project.getArtifacts()) {
-                if (artifactInclude != null && artifactInclude.length() > 0 && 
artifact.getArtifactId().matches(artifactInclude)) {
+                String name = artifact.getGroupId() + ":" + 
artifact.getArtifactId();
+                if (artifactInclude != null && artifactInclude.length() > 0 && 
name.matches(artifactInclude)) {
                     File file = artifact.getFile();
                     if (file != null) {
-                        getLog().debug("Use artifact " + 
artifact.getArtifactId() + ": " + file);
+                        getLog().debug("Use artifact " + name + " " + file);
                         urls.add(file.toURI().toURL());
                     }
                 } else {
-                    getLog().debug("Ignore artifact " + 
artifact.getArtifactId());
+                    getLog().debug("Ignore artifact " + name);
                 }
             }
             ClassLoader loader = new URLClassLoader(urls.toArray(new 
URL[urls.size()]), getClass().getClassLoader());

Reply via email to