You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mike Darretta <mi...@metnet.navy.mil> on 2007/08/22 20:15:32 UTC

Maven 2.0.2 resources tag

I am having issues with the resources tag for my pom.xml for maven 
2.0.2. The configuration is below:

     <resources>
         <resource>
             <directory>${basedir}/src/main/resources</directory>
             <filtering>true</filtering>
         </resource>
     </resources>

The directory structure is fine, and filtering works. Yet, the files are 
not being transferred to the top-level of the ear file (the default 
location).

The worst part is that this has worked for months, but suddenly stopped 
working! Is there an internal maven configuration that may have been 
corrupted that has caused this issue? I have already tried to reinstall 
maven 2.0.2 and blew away my .m2 directory.

Thank you.
Mike Darretta


Re: Maven 2.0.2 resources tag

Posted by Mike Darretta <mi...@metnet.navy.mil>.
Thank you so much! This is an artifact from our earlier maven work, and 
moving to src/main/application did the trick. I don't recall using mvn 
-U, but wouldn't discount the possibility.

Thanks again!
Mike

Wayne Fay wrote:
> The resources directory for ears is called application, that is,
> src/main/application. Not src/main/resources. Unless you've overridden
> the default.
>
> As for why it "suddenly stopped working" -- I'd assume you ran mvn -U
> and got an update on maven-ear-plugin. Perhaps your older version used
> src/main/resources, but the docs show src/main/application is the
> default:
> http://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html
>
> I don't know when (or if) this changed -- check JIRA perhaps for m-ear-p?
>
> Wayne
>
> On 8/22/07, Mike Darretta <mi...@metnet.navy.mil> wrote:
>   
>> I am having issues with the resources tag for my pom.xml for maven
>> 2.0.2. The configuration is below:
>>
>>      <resources>
>>          <resource>
>>              <directory>${basedir}/src/main/resources</directory>
>>              <filtering>true</filtering>
>>          </resource>
>>      </resources>
>>
>> The directory structure is fine, and filtering works. Yet, the files are
>> not being transferred to the top-level of the ear file (the default
>> location).
>>
>> The worst part is that this has worked for months, but suddenly stopped
>> working! Is there an internal maven configuration that may have been
>> corrupted that has caused this issue? I have already tried to reinstall
>> maven 2.0.2 and blew away my .m2 directory.
>>
>> Thank you.
>> Mike Darretta
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
>
>   

-- 
Mike Darretta
VRAM Project Lead
Computer Sciences Corporation (CSC)
(w) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any
order or other contract unless pursuant to explicit written agreement or
government initiative expressly permitting the use of e-mail for such purpose.
------------------------------------------------------------



Re: Maven 2.0.2 resources tag

Posted by Mike Darretta <mi...@metnet.navy.mil>.
Well, I thought I had this licked, but when I use the 
src/main/application directory as my resource directory for ear files, 
the files get moved into their appropriate location, but no filtering is 
performed on the files. It appears that (maybe) a race condition results 
in the pre-filtered files moved to the default (top-level) directory, 
while the filtered versions end up in the classes/ directory.

My filter looks like this:

     <filters>
         <filter><location of my property file></filter>
     </filters>
     <resources>
         <resource>
             <directory>${basedir}/src/main/application</directory>
             <filtering>true</filtering>
         </resource>
     </resources>

I'm missing something fundamental here. I've tried a myriad of 
configuration options, but cannot seem to find the one that fits.

Thanks in advance for any assistance.
Mike

Wayne Fay wrote:
> The resources directory for ears is called application, that is,
> src/main/application. Not src/main/resources. Unless you've overridden
> the default.
>
> As for why it "suddenly stopped working" -- I'd assume you ran mvn -U
> and got an update on maven-ear-plugin. Perhaps your older version used
> src/main/resources, but the docs show src/main/application is the
> default:
> http://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html
>
> I don't know when (or if) this changed -- check JIRA perhaps for m-ear-p?
>
> Wayne
>
> On 8/22/07, Mike Darretta <mi...@metnet.navy.mil> wrote:
>   
>> I am having issues with the resources tag for my pom.xml for maven
>> 2.0.2. The configuration is below:
>>
>>      <resources>
>>          <resource>
>>              <directory>${basedir}/src/main/resources</directory>
>>              <filtering>true</filtering>
>>          </resource>
>>      </resources>
>>
>> The directory structure is fine, and filtering works. Yet, the files are
>> not being transferred to the top-level of the ear file (the default
>> location).
>>
>> The worst part is that this has worked for months, but suddenly stopped
>> working! Is there an internal maven configuration that may have been
>> corrupted that has caused this issue? I have already tried to reinstall
>> maven 2.0.2 and blew away my .m2 directory.
>>
>> Thank you.
>> Mike Darretta
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
>
>   

-- 
Mike Darretta
VRAM Project Lead
Computer Sciences Corporation (CSC)
(w) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any
order or other contract unless pursuant to explicit written agreement or
government initiative expressly permitting the use of e-mail for such purpose.
------------------------------------------------------------



Re: Maven 2.0.2 resources tag

Posted by Wayne Fay <wa...@gmail.com>.
The resources directory for ears is called application, that is,
src/main/application. Not src/main/resources. Unless you've overridden
the default.

As for why it "suddenly stopped working" -- I'd assume you ran mvn -U
and got an update on maven-ear-plugin. Perhaps your older version used
src/main/resources, but the docs show src/main/application is the
default:
http://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html

I don't know when (or if) this changed -- check JIRA perhaps for m-ear-p?

Wayne

On 8/22/07, Mike Darretta <mi...@metnet.navy.mil> wrote:
> I am having issues with the resources tag for my pom.xml for maven
> 2.0.2. The configuration is below:
>
>      <resources>
>          <resource>
>              <directory>${basedir}/src/main/resources</directory>
>              <filtering>true</filtering>
>          </resource>
>      </resources>
>
> The directory structure is fine, and filtering works. Yet, the files are
> not being transferred to the top-level of the ear file (the default
> location).
>
> The worst part is that this has worked for months, but suddenly stopped
> working! Is there an internal maven configuration that may have been
> corrupted that has caused this issue? I have already tried to reinstall
> maven 2.0.2 and blew away my .m2 directory.
>
> Thank you.
> Mike Darretta
>
>
> ---------------------------------------------------------------------
> 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