maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS <bmat...@batmat.net>
Subject Re: Using maven properties inside .java inside annotation in a clean way
Date Thu, 17 Jan 2013 08:45:43 GMT
Yes, we use JBoss 7. But we don't use any deployment descriptor since
EJB3.x has a much leaner development model.


2013/1/16 Anders Hammar <anders@hammar.net>

> What app server? If you're using JBoss I believe you could configure this
> in the jboss specific deployment descriptor, which you can filter. May be
> similar support in other app servers.
>
> /Anders
>
>
> On Wed, Jan 16, 2013 at 3:01 PM, Baptiste MATHUS <ml@batmat.net> wrote:
>
> > Hi all,
> >
> > Note: I know the standard approach to this subject: filtering a
> .properties
> > file and reading it.
> > But this does not work when you actually want to use the value inside an
> > annotation attribute (needs to be a real constant).
> >
> > We actually bind our EJB on specific JNDI URL by doing something like:
> >
> > @Stateless
> > @EJB(name = "java:global/someejb-${project.version}")
> > public class SomeEJB31 { ... }
> >
> > Does someone have an idea on how to solve this cleanly?
> >
> > We already have a running solution using a dark magical combination of
> > antrun/build-helper manipulations, but this gives us a complicated pom to
> > maintain and moreover M2E doesn't like it at all.
> >
> > Thanks for any hint!
> >
> > Cheers
> >
> >
> > --
> > Baptiste <Batmat> MATHUS - http://batmat.net
> > Sauvez un arbre,
> > Mangez un castor !
> >
>



-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

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