You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Filip Polsakiewicz <fi...@polsa.de> on 2005/01/31 21:03:42 UTC

WAR-Plugin include property files

Hi all,
I'm having trouble using the war plugin. How can I tell the plugin to 
include property files from src/java in the war?

Any help would be appreciated.

Thanks Filip


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


Re: WAR-Plugin include property files

Posted by Harald Meyer <ha...@rz.uni-karlsruhe.de>.
Filip Polsakiewicz wrote:

> Thanks. But this didn't work. I remember from some ant-times that I 
> needed to copy the resource files

> from the src.dir to the classes-dir before creating the war. I just 
> don't know how to do this in maven.
>
Filip,  you might use some kind of java compile "postGoal" in maven.xml, 
e.g.:

<postGoal name="java:compile">
      <ant:copy todir=....>
              ....add include/exclude patterns...
      </ant:copy>
</postGoal>

Greetings, Harald

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


Re: [SOLVED] WAR-Plugin include property files

Posted by Brett Porter <br...@gmail.com>.
This is identical to that and preferred (there was a typo in the
original replier's version):

  <build>
...
     <resources>
     <resource>
       <directory>src/java</directory>
       <includes>
         <include>**/*.properties</include>
       </includes>
     </resource>
   </resources>
...
 </build>


On Mon, 31 Jan 2005 22:31:43 +0100, Filip Polsakiewicz <fi...@polsa.de> wrote:
> Just solved the Problem. Adding the following "cheat" does the job
> 
>   <preGoal name="war:war-resources">
>       <ant:mkdir dir="${maven.build.dir}/classes" />
>       <ant:copy toDir="${maven.build.dir}/classes">
>           <ant:fileSet dir="main/src/java">
>               <ant:include name="**/*.properties" />
>           </ant:fileSet>
>       </ant:copy>
>   </preGoal>
> 
> Filip
> 
> Filip Polsakiewicz schrieb:
> 
> > Thanks. But this didn't work. I remember from some ant-times that I
> > needed to copy the resource files from the src.dir to the classes-dir
> > before creating the war. I just don't know how to do this in maven.
> >
> > Filip
> >
> >
> > Martien Huysmans schrieb:
> >
> >> Filip Polsakiewicz wrote:
> >>
> >>> Hi all,
> >>> I'm having trouble using the war plugin. How can I tell the plugin
> >>> to include property files from src/java in the war?
> >>>
> >>> Any help would be appreciated.
> >>>
> >>> Thanks Filip
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >> Hi Filip
> >>
> >> I have done somthing similar by including the following in the
> >> project.xml.
> >> This might help.
> >>
> >>  <build>            <resources>
> >>      <resource>
> >>        <directory>${basedir}/src/conf</directory>
> >>        <includes>
> >>          <include>*.properties</include>
> >>        </includes>
> >>      </resource>
> >>    </resources>
> >>  </build>
> >>
> >> Regards Martien
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> >
> 
> ---------------------------------------------------------------------
> 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


[SOLVED] WAR-Plugin include property files

Posted by Filip Polsakiewicz <fi...@polsa.de>.
Just solved the Problem. Adding the following "cheat" does the job

  <preGoal name="war:war-resources">
      <ant:mkdir dir="${maven.build.dir}/classes" />
      <ant:copy toDir="${maven.build.dir}/classes">
          <ant:fileSet dir="main/src/java">
              <ant:include name="**/*.properties" />
          </ant:fileSet>
      </ant:copy>
  </preGoal>

Filip

Filip Polsakiewicz schrieb:

> Thanks. But this didn't work. I remember from some ant-times that I 
> needed to copy the resource files from the src.dir to the classes-dir 
> before creating the war. I just don't know how to do this in maven.
>
> Filip
>
>
> Martien Huysmans schrieb:
>
>> Filip Polsakiewicz wrote:
>>
>>> Hi all,
>>> I'm having trouble using the war plugin. How can I tell the plugin 
>>> to include property files from src/java in the war?
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks Filip
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>> Hi Filip
>>
>> I have done somthing similar by including the following in the 
>> project.xml.
>> This might help.
>>
>>  <build>            <resources>
>>      <resource>
>>        <directory>${basedir}/src/conf</directory>
>>        <includes>
>>          <include>*.properties</include>
>>        </includes>
>>      </resource>
>>    </resources>
>>  </build>
>>
>> Regards Martien
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>


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


Re: WAR-Plugin include property files

Posted by Filip Polsakiewicz <fi...@polsa.de>.
Thanks. But this didn't work. I remember from some ant-times that I 
needed to copy the resource files from the src.dir to the classes-dir 
before creating the war. I just don't know how to do this in maven.

Filip


Martien Huysmans schrieb:

> Filip Polsakiewicz wrote:
>
>> Hi all,
>> I'm having trouble using the war plugin. How can I tell the plugin to 
>> include property files from src/java in the war?
>>
>> Any help would be appreciated.
>>
>> Thanks Filip
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> Hi Filip
>
> I have done somthing similar by including the following in the 
> project.xml.
> This might help.
>
>  <build>            <resources>
>      <resource>
>        <directory>${basedir}/src/conf</directory>
>        <includes>
>          <include>*.properties</include>
>        </includes>
>      </resource>
>    </resources>
>  </build>
>
> Regards Martien
>
> ---------------------------------------------------------------------
> 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


Re: WAR-Plugin include property files

Posted by Martien Huysmans <ma...@huysmans.demon.nl>.
Filip Polsakiewicz wrote:

> Hi all,
> I'm having trouble using the war plugin. How can I tell the plugin to 
> include property files from src/java in the war?
>
> Any help would be appreciated.
>
> Thanks Filip
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Hi Filip

I have done somthing similar by including the following in the project.xml.
This might help.

  <build>       
      <resources>
      <resource>
        <directory>${basedir}/src/conf</directory>
        <includes>
          <include>*.properties</include>
        </includes>
      </resource>
    </resources>
  </build>

Regards Martien

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