If we cannot specify different filter on multipackaging, then what is point
packaging exactly same packages twice.



Tim Kettler wrote:
> 
> mailming schrieb:
>> This is a great approach, and I do see the ear-plugin package twice. 
>> 
>> However, after server testing, I c the filters in the profile doesn't get
>> to
>> processed, that is, the packaging doesn't go back to resource level redo
>> filtering, which is I need. 
>> 
>> Do I have some key concept missing?
> 
> I don't think so. I didn't had filtering (and some other things) in mind
> when i gave this approach. Buildung for multiple environments in one go
> will not work in this cases (probably in no cases than really simple
> ones), just build one after the other.
> 
>> 
>> Tim Kettler wrote:
>>> Hi,
>>>
>>> please don't write in all caps (even if it's just the subject), this is 
>>> considered rude. People will decide to read and answer you question not 
>>> based on how strong you try to advertise it but on how good you describe 
>>> your problem and if they know an answer.
>>>
>>> Regarding your question. this should do what you want:
>>>
>>> <project>
>>>    <modelVersion>4.0.0</modelVersion>
>>>    <artifactId>my-test-app</artifactId>
>>>    <groupId>my-test-group</groupId>
>>>    <version>1.0-SNAPSHOT</version>
>>>
>>>    <profiles>
>>>      <profile>
>>>        <id>alpha</id>
>>>        <activation>
>>>          <property>
>>>       <name>env_alpha</name>
>>>     </property>
>>>        </activation>
>>>        <build>
>>>          <plugins>
>>>            <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-jar-plugin</artifactId>
>>>         <version>2.1</version>
>>>         <executions>
>>>           <execution>
>>>             <id>build-alpha-ear</id>
>>>             <phase>package</phase>
>>>             <goals>
>>>               <goal>jar</goal>
>>>             </goals>
>>>             <configuration>
>>>               <classifier>alpha</classifier>
>>>             </configuration>
>>>           </execution>
>>>         </executions>
>>>       </plugin>
>>>          </plugins>
>>>        </build>
>>>      </profile>
>>>    </profiles>
>>> </project>
>>>
>>> You can then build with 'mvn -Denv_alpha package'. If you have more 
>>> environments you want to create packgings for, just copy the profile and 
>>> change the names accordingly and then invoke maven like this 'mvn 
>>> -Denv_alpha -Denv_beta package'.
>>>
>>> Note that the example uses the jar plugin but for an ear it works 
>>> exactly the same, just substitue the plugins.
>>>
>>> If you want to deploy the extra artifacts to your repository you need to 
>>> attach them with the build-helper plugin [1].
>>>
>>> -Tim
>>>
>>> [1] http://mojo.codehaus.org/build-helper-maven-plugin/
>>>
>>> mailming schrieb:
>>>> I am trying to implement packaging multiple into multiple ear files
>>>> using
>>>> profile activation, using classifier. 
>>>>
>>>> for example 
>>>>
>>>> mvn package -DEnv=Alpha 
>>>>
>>>> maven package into file-0.5-snapshot-alpha.ear
>>>>
>>>> and then 
>>>>
>>>> mvn package -DEnv=Delta 
>>>>
>>>> maven package into file-0.5-snapshot-delta.ear
>>>>
>>>> but I need to do multiple packaging which is 
>>>>
>>>> do something like mvn package -DEnv=Delta package -DEnv=Alpha, so it
>>>> can
>>>> package twice in the same process and with different Env profile, 
>>>>
>>>> Hopefully this is doable.
>>>>
>>>> --Ming
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-run-multiple-packaging-using-different-env--tf4552478s177.html#a13501279
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to