maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: compile-time only depend - how to reference without generating transitive dependency?
Date Mon, 23 Mar 2009 15:31:42 GMT
2009/3/21 sebb <sebbaz@gmail.com>

> On 20/03/2009, Stuart McCulloch <mcculls@gmail.com> wrote:
> > 2009/3/20 sebb <sebbaz@gmail.com>
> >
> >
> >  > On 19/03/2009, Stephen Connolly <stephen.alan.connolly@gmail.com>
> wrote:
> >  >
> >
> > > >  (Note: <optional>true</optional> should have the same effect
but I
> have
> >  > >  never quite got that to work the way it should)
> >  > >
> >  >
> >  > I'm told it doesn't, because the dpendency still ends up in OSGI
> bundles.
> >  >
> >
> >
> > FYI, if you're talking about the maven-bundle-plugin then yes, optional
> >  dependencies are added by default but you can choose to ignore them:
> >
> >
> >
> http://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Maven+Bundle+Plugin+(BND)<http://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Maven+Bundle+Plugin+%28BND%29>
> >
> >  see the "excludeDependencies" configuration option, for example:
> >
> >   <plugin>
> >     <groupId>org.apache.felix</groupId>
> >     <artifactId>maven-bundle-plugin</artifactId>
> >     <version>2.0.0</version>
> >     <extensions>true</extensions>
> >     <configuration>
> >       <excludeDependencies>*;optional=true</excludeDependencies>
> >       <instructions>
> >         <!-- etc -->
> >       </instructions>
> >     </configuration>
> >   </plugin>
> >
> >  or change the <Embed-Dependency> instruction if you're embedding them
> >
> >  HTH
>
> Thanks!
>
> Seems strange that the default is to include optional dependencies.
>

well when you're wrapping a glob of code into a bundle it can be useful,
otherwise you have to remember to explicitly add optional dependencies
or you may end up with a non-working or (more likely) non-useful bundle

so it just happened that most people expected optional dependencies to
be included by default, and of course once it becomes expected it's hard
to change it later ;)

>  >
> >  > >  -Stephen
> >  > >
> >  >
> >
> > --
> >  Cheers, Stuart
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Cheers, Stuart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message