maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Using maven properties inside .java inside annotation in a clean way
Date Wed, 16 Jan 2013 15:07:22 GMT
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 !
>

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