Hello Max,
Thanks!
I was confused by the two parameters.
Now, I use following format scripts,
<configuration>
<webappDirectory>target/${artifactId}</webappDirectory>
<warSourceDirectory>src/webapp</warSourceDirectory>
<outputDirectory>target</outputDirectory>
</configuration>
I have to say that using customized directory structure is a trouble :D
a cup of Java, cheers!
Sha Jiang
Max Cooper wrote:
>
> The war plugin will create an "exploded" (pre-archived) version of the
> webapp in the directory you configure using the "webappDirectory"
> property.
>
> However, it sounds like you might be trying to build the exploded webapp
> in your warSourceDirectory, which you have configured to be src/webapp.
> If you want to build the exploded webapp in your source directory, use
> 'mvn war:inplace' instead of changing the webappDirectory property.
>
> Be aware that building "inplace" is undesirable for a number of reasons,
> mainly relating to the mixing of source and build artifact files in the
> same directory structure.
>
> maven-war-plugin usage doc:
> http://maven.apache.org/plugins/maven-war-plugin/usage.html
>
> -Max
>
> jiangshachina wrote:
>> Oh, I may find the problem.
>> I shall use following scripts,
>> <configuration>
>> <warSourceDirectory>src/webapp</warSourceDirectory>
>> <outputDirectory>target</outputDirectory>
>> </configuration>
>> The warSourceDirectory is my pre-archived directory ^_^
>> In fact, I didn't understand the doc correctly.
>> Really, I don't understand webappDirectory well, too.
>> How to explain the parameter?
>>
>> a cup of Java, cheers!
>> Sha Jiang
>>
>>
>> jiangshachina wrote:
>>> Hello,
>>> I'm using customized project directory structure.
>>> To standard Maven Web application project, when run "mvn package",
>>> a folder generated at directory target, the folder includes all of
>>> files/dirs would be archived to war file.
>>> I call the folder pre-archived directory :D
>>> I customized three parameters in maven-war-plugin,
>>> <configuration>
>>> <webappDirectory>src/webapp</webappDirectory>
>>> <warSourceDirectory>src/webapp</warSourceDirectory>
>>> <outputDirectory>target</outputDirectory>
>>> </configuration>
>>> and then Maven regards src/webapp as pre-archived directory, that's not
>>> my
>>> want.
>>> But I don't find which parameter is used for setting pre-archived
>>> directory :(
>>>
>>> a cup of Java, cheers!
>>> Sha Jiang
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-customize-%22pre-archive%22-directory--tf2587306s177.html#a7231234
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]