maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro.E...@miranda.com
Subject move data from pom to class or class to pom
Date Wed, 16 Jul 2014 18:18:01 GMT
I have a java class that has a constant in it (static final String). This 
string is a version number, e.g. "1.3.2-test". I need to have this same 
value in a maven plugin configuration (the jaxb plugin) so I am wondering, 
is it better to keep the actual declaration in the code and somehow tell 
maven to take it from the code, or is it better to declare it in the pom 
and tell java to take the literal value to define the constant from the 
pom??

I don't know how to do either so I would also like to hear some ideas. I 
am hoping i don't have to use resource filtering since having a source 
file as a resource is kind of problematic to me. It has to be ONLY that 
file that gets filtered, it would need to be in a non-standard location 
not src/main/java (maybe this is not true), and in general, it seems to me 
that treating source code as resource is counter-intuitive

Has anyone else solved this issue with the DRY principle across behaviour 
and build system?

The short background is that maven generates an XML schema via jaxb and 
this schema file is then made available at runtime via a service

Thank you,

Alejandro Endo | Software Designer/Concepteur de logiciels 


DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.

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