maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Dessertine <yvesd.pub...@gmail.com>
Subject Re: create war and jar files at same time.
Date Tue, 27 Jan 2009 11:29:55 GMT
Okay. You can't define two packaging types (I think, not 100% sure).

But,

you can "attach" other plugins to the "package" phase. I did this.
Something like this in your <plugins> section. Example:

                       <plugin>
                               <groupId>org.apache.maven.plugins</groupId>
                               <artifactId>maven-war-plugin</artifactId>
                               <version>2.1-alpha-1</version>
                               <configuration>
                                       <!-- your war plugin conf here (see
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html ) -->
                               </configuration>
                       </plugin>


Forget about adding one more submodule :)

Regards,

2009/1/27 Yves Dessertine <yvesd.public@gmail.com>:
> Okay. You can't define two packaging types (I think, not 100% sure).
>
> But,
>
> you can "attach" other plugins to the "package" phase. I did this.
> Something like this in your <plugins> section. Example:
>
>                        <plugin>
>                                <groupId>org.apache.maven.plugins</groupId>
>                                <artifactId>maven-war-plugin</artifactId>
>                                <version>2.1-alpha-1</version>
>                                <configuration>
>                                        <!-- your war plugin conf here (see
> http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html ) -->
>                                </configuration>
>                        </plugin>
>
>
> Forget about adding one more submodule :)
>
> Regards,
>
> Yves
>
>
> 2009/1/27 Minhaj <minhaj.kk@gmail.com>:
>> thanks for your reply,
>>
>> but the problem is i want to create jar and war for the same module like we
>> can do in ant...we can specify goals for creating jar and war separately and
>> then execute by command prompt ant war or ant jar
>>
>>
>> Tx
>> Minhaj
>>
>> On Tue, Jan 27, 2009 at 2:57 PM, Yves Dessertine <yvesd.public@gmail.com>
>> wrote:
>>>
>>> Is it an acceptable solution for you, to create one more subproject
>>> generating a jar. And then make the war-project depend on your jar ?
>>>
>>> PS : don't crosspost on dev and users (this questions has nothing to
>>> do with dev, don't ?)
>>>
>>> Yves
>>>
>>> 2009/1/27 Minhaj <minhaj.kk@gmail.com>:
>>> > Hi,
>>> >
>>> > i am working on maven;s multi module project i have three modules with
>>> > three
>>> > pom.xml files all of them generating war files successfully and i want
>>> > to
>>> > generate a jar file as well for one of the module.
>>> >
>>> > i am confuse that how can we define two times the <packaging> tag
in
>>> > same
>>> > pom.xml file.
>>> >
>>> > it can be done with Profiles??
>>> >
>>> >
>>> > Tx
>>> > Minhajkk
>>> >
>>
>>
>

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


Mime
View raw message