You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hal Arnold <ha...@cj.com> on 2005/02/23 01:39:52 UTC

how to 'point' to another properties file

Sorry if this has been asked and answered, but I searched to no avail:

 

I'm autogenerating hibernate mappings and so I have my usual
project.properties file with the following:

 

maven.xdoclet.hibernatedoclet.fileset.0=true

maven.xdoclet.hibernatedoclet.fileset.0.dir=${maven.src.dir}/java

maven.xdoclet.hibernatedoclet.fileset.0.include=**/*.java

maven.xdoclet.hibernatedoclet.hibernate.0.Version=2.0

 

I noted somewhere that you should be able to do something like this in
the project.properties:

maven.hibernate.properties=conf/hibernate.properties

 

This would allow you to remove the maven.xdoclet.hibernatedoclet.xx
lines 

and move them into the new hibernate.properties

located in conf. this doesn't seem to work 

 

I've also tried the usual (in the project.xml):

 

<resource>

       <directory>conf</directory>

       <includes>                    

            <include>hibernate.properties</include>

        </includes>

 </resource>

 

And even:

<properties>conf/hibernate.properties</properties>

 

Nada, zip, bupkis,

 

Any help?

 

/hba 

 


Re: how to 'point' to another properties file

Posted by David Cao <Da...@LightSurf.com>.
Hi, this is a real need.  I need:
1 Change the property file name by command line;
2 Or, change the property value in Maven.xml (the current solution only
enable change to properties to plugin, which is not good enough in my
case).

I had been working on creating a process to use Maven in our production.
But there are few properties are different from dev environment to
stage/ft/production. 

I cannot find way to change properties after defined in the property
files. This might be a blocker if cannot be solved. I had tried to setup
different project.xml for different environment. But this is an
expensive solution. Any suggestion?

-David

On Tue, 2005-02-22 at 16:39, Hal Arnold wrote:
> Sorry if this has been asked and answered, but I searched to no avail:
> 
>  
> 
> I'm autogenerating hibernate mappings and so I have my usual
> project.properties file with the following:
> 
>  
> 
> maven.xdoclet.hibernatedoclet.fileset.0=true
> 
> maven.xdoclet.hibernatedoclet.fileset.0.dir=${maven.src.dir}/java
> 
> maven.xdoclet.hibernatedoclet.fileset.0.include=**/*.java
> 
> maven.xdoclet.hibernatedoclet.hibernate.0.Version=2.0
> 
>  
> 
> I noted somewhere that you should be able to do something like this in
> the project.properties:
> 
> maven.hibernate.properties=conf/hibernate.properties
> 
>  
> 
> This would allow you to remove the maven.xdoclet.hibernatedoclet.xx
> lines 
> 
> and move them into the new hibernate.properties
> 
> located in conf. this doesn't seem to work 
> 
>  
> 
> I've also tried the usual (in the project.xml):
> 
>  
> 
> <resource>
> 
>        <directory>conf</directory>
> 
>        <includes>                    
> 
>             <include>hibernate.properties</include>
> 
>         </includes>
> 
>  </resource>
> 
>  
> 
> And even:
> 
> <properties>conf/hibernate.properties</properties>
> 
>  
> 
> Nada, zip, bupkis,
> 
>  
> 
> Any help?
> 
>  
> 
> /hba 
> 
>  
-- 
David  -- Powered by Thinking
Lead Java Engineer


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