You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roberto Castro <ro...@cetip.com.br> on 2004/10/15 15:03:22 UTC

Dependency problens when generating war file

Hi, all. I've been facing two problens generating a war file.
Maven inserts jar files into war files with version number in its name. To avoid this, I created a goal in maven.xml to rename jar file, like this:
<move file="${maven.build.dir}/web-inf/WEB-INF/lib/commons-beanutils-${siloc_commons_beanutils_version}.jar"
	tofile="${maven.build.dir}/web-inf/WEB-INF/lib/commons-beanutils.jar" overwrite="true"/>
Is it the better way to do this?
Second problem:
To copy tld and xml files into war file, I do the following:
	<build>
		<nagEmailAddress>luisvt@cetip.com.br</nagEmailAddress>
		<sourceDirectory>src</sourceDirectory>
		<resources>
			<resource>
				<directory>web/config</directory>
				<targetPath></targetPath>
				<includes>
					<include>*.xml</include>
					<include>*.tld</include>
				</includes>
			</resource>
		</resources>
	</build>

But maven copys tld and xml files into "WEB-INF/classes" directory, insted of, "web-inf" directory.
What can I do to solve this problem?
Thank you all in advance for the help.
	Regards,

     Roberto de Castro 
     Analista de Suporte 
     Cetip - Desus Rio de Janeiro 
     +55 21 2276-7439 
     mailto:robertoc@cetip.com.br 


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


Re: MPEAR-26 (WAS Re: Dependency problens when generating war file)

Posted by Brett Porter <br...@gmail.com>.
makes sense


On Fri, 15 Oct 2004 10:34:09 -0300, Felipe Leme <ma...@felipeal.net> wrote:
> Brett,
> 
> On Fri, 15 Oct 2004 23:07:30 +1000, Brett Porter <br...@gmail.com> wrote:
> > As far as renaming the jars: why? They work just the same with the
> > versions, and make it clearer what is bundled.
> 
> I also don't see why the renaming matters in a WAR, but I think it makes sense in a EAR. In fact, I have  just opened a bug for this situation earlier today (minutes before Roberto's post :-):
> 
> http://jira.codehaus.org/browse/MPEAR-26
> 
> So, do you (and others like Maczka) agree that it makes sense? If so, I will implement it ASAP...
> 
> -- Felipe
> 
> ---------------------------------------------------------------------
> 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


MPEAR-26 (WAS Re: Dependency problens when generating war file)

Posted by Felipe Leme <ma...@felipeal.net>.
Brett,

On Fri, 15 Oct 2004 23:07:30 +1000, Brett Porter <br...@gmail.com> wrote:
> As far as renaming the jars: why? They work just the same with the
> versions, and make it clearer what is bundled.

I also don't see why the renaming matters in a WAR, but I think it makes sense in a EAR. In fact, I have  just opened a bug for this situation earlier today (minutes before Roberto's post :-):

http://jira.codehaus.org/browse/MPEAR-26

So, do you (and others like Maczka) agree that it makes sense? If so, I will implement it ASAP...

-- Felipe 

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


Re: Dependency problens when generating war file

Posted by Brett Porter <br...@gmail.com>.
Put anything you want in WEB-INF in src/webapp/WEB-INF (assuming a
default maven.war.src).

tlds should probably be used from inside a JAR in a servlet 2.3
container - search the archives for tld :)

As far as renaming the jars: why? They work just the same with the
versions, and make it clearer what is bundled.

Regards,
Brett

On Fri, 15 Oct 2004 10:03:22 -0300, Roberto Castro
<ro...@cetip.com.br> wrote:
> Hi, all. I've been facing two problens generating a war file.
> Maven inserts jar files into war files with version number in its name. To avoid this, I created a goal in maven.xml to rename jar file, like this:
> <move file="${maven.build.dir}/web-inf/WEB-INF/lib/commons-beanutils-${siloc_commons_beanutils_version}.jar"
>         tofile="${maven.build.dir}/web-inf/WEB-INF/lib/commons-beanutils.jar" overwrite="true"/>
> Is it the better way to do this?
> Second problem:
> To copy tld and xml files into war file, I do the following:
>         <build>
>                 <nagEmailAddress>luisvt@cetip.com.br</nagEmailAddress>
>                 <sourceDirectory>src</sourceDirectory>
>                 <resources>
>                         <resource>
>                                 <directory>web/config</directory>
>                                 <targetPath></targetPath>
>                                 <includes>
>                                         <include>*.xml</include>
>                                         <include>*.tld</include>
>                                 </includes>
>                         </resource>
>                 </resources>
>         </build>
> 
> But maven copys tld and xml files into "WEB-INF/classes" directory, insted of, "web-inf" directory.
> What can I do to solve this problem?
> Thank you all in advance for the help.
>         Regards,
> 
>      Roberto de Castro
>      Analista de Suporte
>      Cetip - Desus Rio de Janeiro
>      +55 21 2276-7439
>      mailto:robertoc@cetip.com.br
> 
> ---------------------------------------------------------------------
> 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