You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Daniel Estermann (JIRA)" <ji...@apache.org> on 2018/02/05 19:29:00 UTC

[jira] [Updated] (ARIES-1772) Add an option to blueprint-maven-plugin to exclude dependencies.

     [ https://issues.apache.org/jira/browse/ARIES-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Estermann updated ARIES-1772:
------------------------------------
    Description: 
Currently the list of scanned classes by blueprint-maven-plugin can be restricted using scanPath parameter, so the list can also contain the classes of the project dependencies. With my projects I experience two kind of issues with it:
 * If the the scan path is chosen too widely it may lead to a build failure. For example: Assume project A has a dependency to project B an both have the same base package, which is chosen as the scan path. Project B has a blueprint bean, which implements an interface from some +provided+ dependency of it. The build of project A will fail then, because it will try to scan a blueprint bean of project B but it will miss its provided dependency. An example error message:

 
{code:java}
Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate (default) on project email-template-editor-core: Execution default of goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate failed: A required class was missing while executing org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate: com/mycorporation/scheduler/api/ScheduledService{code}
 
 * If a bean of project B appears in the autowire.xml of project A, but the package of that bean is not imported in the manifest of project A, a ClassNotFoundException will be thrown during runtime:

 
{code:java}
java.lang.ClassNotFoundException: com.mycorporation.project-a.commons.notification.IncomingNotificationService from [Module "deployment.com.mycorporation.project-b.commons.core:0.0.1.SNAPSHOT" from Service Module Loader]
{code}
 

I suggest to add an option, to exclude dependencies from the list of scanned classes, like [maven-bundle-plugin's excludeDependencies|http://felix.apache.org/components/bundle-plugin/bundle-mojo.html#excludeDependencies] for example, and give this option per default such value as to exclude all dependencies.

 

  was:
Currently the list of scanned classes by blueprint-maven-plugin can be restricted using scanPath parameter, so the list can also contain the classes of the project dependencies. With my projects I experience two kind of issues with it:
 * If the the scan path is chosen too widely it may lead to a build failure. For example: Assume project A has a dependency to project B an both have the same base package, which is chosen as the scan path. Project B has a blueprint bean, which implements an interface from some +provided+ dependency of it. The build of project A will fail then, because it will try to scan a blueprint bean of project B but it will miss its provided dependency. An example error message:

 
{code:java}
Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate (default) on project email-template-editor-core: Execution default of goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate failed: A required class was missing while executing org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate: com/mycorporation/scheduler/api/ScheduledService{code}
 
 * If a bean of project B appears in the autowire.xml of project A, but the package of that bean is not imported in the manifest of project A, a ClassNotFoundException will be thrown during runtime:

 
{code:java}
java.lang.ClassNotFoundException: com.mycorporation.project-a.commons.notification.IncomingNotificationService from [Module "deployment.com.mycorporation.project-b.commons.core:0.0.1.SNAPSHOT" from Service Module Loader]
{code}
I suggest to add an option, to exclude dependencies from the list of scanned classes, like [maven-bundle-plugin's excludeDependencies|http://felix.apache.org/components/bundle-plugin/bundle-mojo.html#excludeDependencies] for example.

 


> Add an option to blueprint-maven-plugin to exclude dependencies.
> ----------------------------------------------------------------
>
>                 Key: ARIES-1772
>                 URL: https://issues.apache.org/jira/browse/ARIES-1772
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>    Affects Versions: blueprint-maven-plugin-1.9.0
>            Reporter: Daniel Estermann
>            Assignee: Dominik Przybysz
>            Priority: Major
>
> Currently the list of scanned classes by blueprint-maven-plugin can be restricted using scanPath parameter, so the list can also contain the classes of the project dependencies. With my projects I experience two kind of issues with it:
>  * If the the scan path is chosen too widely it may lead to a build failure. For example: Assume project A has a dependency to project B an both have the same base package, which is chosen as the scan path. Project B has a blueprint bean, which implements an interface from some +provided+ dependency of it. The build of project A will fail then, because it will try to scan a blueprint bean of project B but it will miss its provided dependency. An example error message:
>  
> {code:java}
> Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate (default) on project email-template-editor-core: Execution default of goal org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate failed: A required class was missing while executing org.apache.aries.blueprint:blueprint-maven-plugin:1.9.0:blueprint-generate: com/mycorporation/scheduler/api/ScheduledService{code}
>  
>  * If a bean of project B appears in the autowire.xml of project A, but the package of that bean is not imported in the manifest of project A, a ClassNotFoundException will be thrown during runtime:
>  
> {code:java}
> java.lang.ClassNotFoundException: com.mycorporation.project-a.commons.notification.IncomingNotificationService from [Module "deployment.com.mycorporation.project-b.commons.core:0.0.1.SNAPSHOT" from Service Module Loader]
> {code}
>  
> I suggest to add an option, to exclude dependencies from the list of scanned classes, like [maven-bundle-plugin's excludeDependencies|http://felix.apache.org/components/bundle-plugin/bundle-mojo.html#excludeDependencies] for example, and give this option per default such value as to exclude all dependencies.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)