[jboss-jira] [JBoss JIRA] (DROOLS-194) Add support in KIE to register custom Wagons

Eric Wittmann (JIRA) jira-events at lists.jboss.org
Wed Oct 2 11:39:02 EDT 2013


    [ https://issues.jboss.org/browse/DROOLS-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12808991#comment-12808991 ] 

Eric Wittmann commented on DROOLS-194:
--------------------------------------

I should also point out that we actually use a proxy class instead of the core SrampWagon class.  The reason is that the Logger is not injected into the wagon when running in this environment (due to how Aether is creating the wagon, presumably).

It might be worth considering how injection might be supported in this context.
                
> Add support in KIE to register custom Wagons
> --------------------------------------------
>
>                 Key: DROOLS-194
>                 URL: https://issues.jboss.org/browse/DROOLS-194
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>            Reporter: Kurt Stam
>            Assignee: Mark Proctor
>         Attachments: kie-srampwagon.tgz
>
>
> The ManualWagonProvider subclass of Aether in KIE registers the HTTPWagon. It should be possible to add your own Wagon through config our automated machinery when another Wagon is put on the classpath and references in the build/extensions of a MavenProject. To get the SrampWagon to work we used the following code:
> {quote}
> private static class ManualWagonProvider implements WagonProvider {
>         public Wagon lookup( String roleHint ) throws Exception {
>             if ( "http".equals( roleHint ) ) {
>                 return new AhcWagon();
>             }
>             if ( "sramp".equals( roleHint ) ) {
>                 return new SrampWagon();
>             }
>             return null;
>         }
>         public void release( Wagon wagon ) { }
>     }
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list