You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lucie Chan <lu...@hotmail.com> on 2006/03/24 02:04:28 UTC

Looking for a better way to copy properties files from an external module?

Looking for a better solution....

My web application relies on a database laye (which is packaged and 
installed as a *.jar file and made available to the web layer at runtime).  
In order to copy some of the property files (such as jdbc.properties, 
hibernate.cfg.xml, etc) from database layer's resource directory to WEB-INF/ 
classes directory, I specified the the following in the web layer's pom.xml 
(see below).

The only trouble is that when I run "mvn eclipse:eclipse", I notice the path 
I specified in the <directory>
tag is added to the .classpath which is not what I want (I only want the 
directory for its property files).  For now, I have to go into .classpath to 
delete the entry manually.  Just wondering if there's a way to exclude this 
from the ?


<build>
    <finalName>treebase-web</finalName>
	<defaultGoal>install</defaultGoal>
  	<resources>
  		<resource>
			<directory>${basedir}/../database-object/src/main/resources</directory>
			<includes>
			   <include>*.*</include>
			</includes>
  		</resource>
  	</resources>
  </build>



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


Re: Looking for a better way to copy properties files from an external module?

Posted by Paul Li <pa...@gmail.com>.
hi,

I am not sure if I undtand you correctly, so please excuse me if i
gave you the wrong approach here...

maybe you could add an ant task in your web pom.xml that copies these
files to the web's resources directory.

And remove the resources stuff from below. Then when you run mvn
eclipse:eclipse it wont pick these up as a resource any more ... and
hence wont add the entry to .classpath

This is prob a bit of a hack ;-) Maybe there is way to tell the mvn
eclipse plugin to igore certain directories, which is probably the
'clean' way to do things.

hth
pauli

On 3/24/06, Lucie Chan <lu...@hotmail.com> wrote:
> Looking for a better solution....
>
> My web application relies on a database laye (which is packaged and
> installed as a *.jar file and made available to the web layer at runtime).
> In order to copy some of the property files (such as jdbc.properties,
> hibernate.cfg.xml, etc) from database layer's resource directory to WEB-INF/
> classes directory, I specified the the following in the web layer's pom.xml
> (see below).
>
> The only trouble is that when I run "mvn eclipse:eclipse", I notice the path
> I specified in the <directory>
> tag is added to the .classpath which is not what I want (I only want the
> directory for its property files).  For now, I have to go into .classpath to
> delete the entry manually.  Just wondering if there's a way to exclude this
> from the ?
>
>
> <build>
>     <finalName>treebase-web</finalName>
>         <defaultGoal>install</defaultGoal>
>         <resources>
>                 <resource>
>                         <directory>${basedir}/../database-object/src/main/resources</directory>
>                         <includes>
>                            <include>*.*</include>
>                         </includes>
>                 </resource>
>         </resources>
>   </build>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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