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

Tobias Bocanegra updated JCRVLT-214:
------------------------------------
    Description: 
the classpath analyzer uses the compile scoped dependencies of the project, 
which might include the ones from the parent project and transitive 
dependencies. choosing the correct set of libraries is a bit tricky, and it 
should be possible to exclude the ones that are not required.

suggest to add new property:

- *{{excludedLibraries}}* comma separated string of partial maven coordinates 
of libraries to ignored in the import package analyzer. 

example:

{code:xml}
<plugin>
    <groupId>org.apache.jackrabbit</groupId>
    <artifactId>filevault-package-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <excludedLibraries>
            org.osgi:org.osgi.service.component.annotations,
            org.osgi:org.osgi.service.metatype.annotations,
            org.osgi:osgi.annotation
        </excludedLibraries>
    </configuration>
</plugin>
{code}

  was:
due to the setup of the class analyzer, it is almost impossible to get a clean 
class path for detecting the unused jars. also, for HTL scripting validation 
support, certain libraries, like the HTL script compiler are not really project 
dependencies, but only using at runtime.
but we can't use the maven _runtime_ scope to declare those dependencies, 
otherwise they don't get added to the compile classpath.

suggest to add new property:

- *{{ignoredUnusedLibs}}* comma separated string of partial maven coordinates 
of libraries to ignored in the import package analyzer. 

example:

{code:xml}
<plugin>
    <groupId>org.apache.jackrabbit</groupId>
    <artifactId>filevault-package-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <ignoredUnusedLibraries>
            org.osgi:org.osgi.service.component.annotations,
            org.osgi:org.osgi.service.metatype.annotations,
            org.osgi:osgi.annotation
        </ignoredUnusedLibraries>
    </configuration>
</plugin>
{code}


> auto-import package analyzer needs option to exclude compiletime bundles
> ------------------------------------------------------------------------
>
>                 Key: JCRVLT-214
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-214
>             Project: Jackrabbit FileVault
>          Issue Type: Improvement
>          Components: package maven plugin
>            Reporter: Tobias Bocanegra
>            Assignee: Tobias Bocanegra
>             Fix For: package-maven-plugin-1.0.0
>
>
> the classpath analyzer uses the compile scoped dependencies of the project, 
> which might include the ones from the parent project and transitive 
> dependencies. choosing the correct set of libraries is a bit tricky, and it 
> should be possible to exclude the ones that are not required.
> suggest to add new property:
> - *{{excludedLibraries}}* comma separated string of partial maven coordinates 
> of libraries to ignored in the import package analyzer. 
> example:
> {code:xml}
> <plugin>
>     <groupId>org.apache.jackrabbit</groupId>
>     <artifactId>filevault-package-maven-plugin</artifactId>
>     <extensions>true</extensions>
>     <configuration>
>         <excludedLibraries>
>             org.osgi:org.osgi.service.component.annotations,
>             org.osgi:org.osgi.service.metatype.annotations,
>             org.osgi:osgi.annotation
>         </excludedLibraries>
>     </configuration>
> </plugin>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to