maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS>
Subject Using maven properties inside .java inside annotation in a clean way
Date Wed, 16 Jan 2013 14:01:44 GMT
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:

@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!


Baptiste <Batmat> MATHUS -
Sauvez un arbre,
Mangez un castor !

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