You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dmystery <De...@infosys.com> on 2006/11/08 12:34:42 UTC

weblogic-maven-plugin:using properties file

How can i use a properties file in weblogic-maven-plugin. I've to deploy an
ear on different enviroments and the <adminServerHostName>,<adminServerPort>
etc will hold values based on the environment. At the pom level i can access
the appropriate properties file using profiles, but the same properties are
not available in the plugin. 

Any solution??? 
-- 
View this message in context: http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf2594705s177.html#a7236919
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: weblogic-maven-plugin:using properties file

Posted by Dmystery <De...@infosys.com>.
Any solutions to this one?? 

Dmystery wrote:
> 
> I did somthing like - 
> 
>  <profile> 
>    <id>deploy</id> 
>    <activation> 
>    <property> 
>    <name>deploy</name> 
>    <value>true</value> 
>    </property> 
>    </activation> 
>    <build>
>     <plugins>
>     <plugin>
>      <groupId>org.codehaus.mojo</groupId>
>      <artifactId>weblogic-maven-plugin</artifactId>
>      <version>2.8.0-SNAPSHOT</version>
>      <configuration>
>      
> <objectPath>${project.build.directory}/${project.artifactId}-${project.version}.ear</objectPath>
>       <verbose>true</verbose>
>       <debugging>true</debugging>
>       <nowarnings>false</nowarnings>
>       <lineNumbers>true</lineNumbers>
>       <adminServerHostName>${host}</adminServerHostName>
>       <adminServerPort>${port}</adminServerPort>
>       <adminServerProtocol>t3</adminServerProtocol>
>       <userId>${user}</userId>
>       <password>${password}</password>
>       <upload>false</upload>
>       <remote>false</remote>
>       <verbose>false</verbose>
>       <debug>false</debug>
>       <targetNames>${server.name}</targetNames>
>      </configuration>
>      <executions>
>       <execution>
>        <phase>package</phase>
>        <goals>
>           <goal>deploy</goal>
>        </goals>
>        </execution>
>      </executions>
>     </plugin> 
>     </plugins>
>     <filters> 
>      <filter>../../env/${env}.properties</filter> //The configuration
> values marked bold are in this file
>     </filters> 
>    </build> 
>  </profile> 
> 
> When i do 'mvn install -Ddeploy=true -Denv=dev', the above profile is
> executed but it fails to pick up the porperties from the dev.properties
> file. It tries to use the default porperties as of a localhost. Is it the
> case that the filter will only work for resources? I'm using the same
> filter for compiling the resources. 
> 
> 
> Scott Ryan-2 wrote:
>> 
>> You just need to configure the plugin in your different profiles.  You
>> can
>> have a different set of configurations in each profile definition.
>> 
>> Scott Ryan
>> Chief Technology Officer
>> Soaring Eagle L.L.C.
>> scott@theryansplace.com
>> www.soaringeagleco.com
>> (303) 263-3044
>> 
>> -----Original Message-----
>> From: Dmystery [mailto:Deep_Mistry@infosys.com]
>> Sent: Wednesday, November 08, 2006 4:35 AM
>> To: users@maven.apache.org
>> Subject: weblogic-maven-plugin:using properties file
>> 
>> 
>> 
>> How can i use a properties file in weblogic-maven-plugin. I've to deploy
>> an
>> ear on different enviroments and the
>> <adminServerHostName>,<adminServerPort>
>> etc will hold values based on the environment. At the pom level i can
>> access
>> the appropriate properties file using profiles, but the same properties
>> are
>> not available in the plugin.
>> 
>> Any solution???
>> --
>> View this message in context:
>> http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf259470
>> 5s177.html#a7236919
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> 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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf2594705s177.html#a7271741
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: weblogic-maven-plugin:using properties file

Posted by Dmystery <De...@infosys.com>.
Scott, 

Can you let me know the correct way to do this? I'm not able to substitute
the plugin config values using the properties file. I think this is quite
trivial. 



Dmystery wrote:
> 
> I did somthing like - 
> 
>  <profile> 
>    <id>deploy</id> 
>    <activation> 
>    <property> 
>    <name>deploy</name> 
>    <value>true</value> 
>    </property> 
>    </activation> 
>    <build>
>     <plugins>
>     <plugin>
>      <groupId>org.codehaus.mojo</groupId>
>      <artifactId>weblogic-maven-plugin</artifactId>
>      <version>2.8.0-SNAPSHOT</version>
>      <configuration>
>      
> <objectPath>${project.build.directory}/${project.artifactId}-${project.version}.ear</objectPath>
>       <verbose>true</verbose>
>       <debugging>true</debugging>
>       <nowarnings>false</nowarnings>
>       <lineNumbers>true</lineNumbers>
>       <adminServerHostName>${host}</adminServerHostName>
>       <adminServerPort>${port}</adminServerPort>
>       <adminServerProtocol>t3</adminServerProtocol>
>       <userId>${user}</userId>
>       <password>${password}</password>
>       <upload>false</upload>
>       <remote>false</remote>
>       <verbose>false</verbose>
>       <debug>false</debug>
>       <targetNames>${server.name}</targetNames>
>      </configuration>
>      <executions>
>       <execution>
>        <phase>package</phase>
>        <goals>
>           <goal>deploy</goal>
>        </goals>
>        </execution>
>      </executions>
>     </plugin> 
>     </plugins>
>     <filters> 
>      <filter>../../env/${env}.properties</filter> //The configuration
> values marked bold are in this file
>     </filters> 
>    </build> 
>  </profile> 
> 
> When i do 'mvn install -Ddeploy=true -Denv=dev', the above profile is
> executed but it fails to pick up the porperties from the dev.properties
> file. It tries to use the default porperties as of a localhost. Is it the
> case that the filter will only work for resources? I'm using the same
> filter for compiling the resources. 
> 
> 
> Scott Ryan-2 wrote:
>> 
>> You just need to configure the plugin in your different profiles.  You
>> can
>> have a different set of configurations in each profile definition.
>> 
>> Scott Ryan
>> Chief Technology Officer
>> Soaring Eagle L.L.C.
>> scott@theryansplace.com
>> www.soaringeagleco.com
>> (303) 263-3044
>> 
>> -----Original Message-----
>> From: Dmystery [mailto:Deep_Mistry@infosys.com]
>> Sent: Wednesday, November 08, 2006 4:35 AM
>> To: users@maven.apache.org
>> Subject: weblogic-maven-plugin:using properties file
>> 
>> 
>> 
>> How can i use a properties file in weblogic-maven-plugin. I've to deploy
>> an
>> ear on different enviroments and the
>> <adminServerHostName>,<adminServerPort>
>> etc will hold values based on the environment. At the pom level i can
>> access
>> the appropriate properties file using profiles, but the same properties
>> are
>> not available in the plugin.
>> 
>> Any solution???
>> --
>> View this message in context:
>> http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf259470
>> 5s177.html#a7236919
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> 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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf2594705s177.html#a7334793
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: weblogic-maven-plugin:using properties file

Posted by Dmystery <De...@infosys.com>.
I did somthing like - 

 <profile> 
   <id>deploy</id> 
   <activation> 
   <property> 
   <name>deploy</name> 
   <value>true</value> 
   </property> 
   </activation> 
   <build>
    <plugins>
    <plugin>
     <groupId>org.codehaus.mojo</groupId>
     <artifactId>weblogic-maven-plugin</artifactId>
     <version>2.8.0-SNAPSHOT</version>
     <configuration>
     
<objectPath>${project.build.directory}/${project.artifactId}-${project.version}.ear</objectPath>
      <verbose>true</verbose>
      <debugging>true</debugging>
      <nowarnings>false</nowarnings>
      <lineNumbers>true</lineNumbers>
      <adminServerHostName>${host}</adminServerHostName>
      <adminServerPort>${port}</adminServerPort>
      <adminServerProtocol>t3</adminServerProtocol>
      <userId>${user}</userId>
      <password>${password}</password>
      <upload>false</upload>
      <remote>false</remote>
      <verbose>false</verbose>
      <debug>false</debug>
      <targetNames>${server.name}</targetNames>
     </configuration>
     <executions>
      <execution>
       <phase>package</phase>
       <goals>
          <goal>deploy</goal>
       </goals>
       </execution>
     </executions>
    </plugin> 
    </plugins>
    <filters> 
     <filter>../../env/${env}.properties</filter> 
    </filters> 
   </build> 
 </profile> 

When i do 'mvn install -Ddeploy=true -Denv=dev', the above profile is
executed but it fails to pick up the porperties from the dev.properties
file. It tries to use the default porperties as of a localhost. Is it the
case that the filter will only work for resources? I'm using the same filter
for compiling the resources. 


Scott Ryan-2 wrote:
> 
> You just need to configure the plugin in your different profiles.  You can
> have a different set of configurations in each profile definition.
> 
> Scott Ryan
> Chief Technology Officer
> Soaring Eagle L.L.C.
> scott@theryansplace.com
> www.soaringeagleco.com
> (303) 263-3044
> 
> -----Original Message-----
> From: Dmystery [mailto:Deep_Mistry@infosys.com]
> Sent: Wednesday, November 08, 2006 4:35 AM
> To: users@maven.apache.org
> Subject: weblogic-maven-plugin:using properties file
> 
> 
> 
> How can i use a properties file in weblogic-maven-plugin. I've to deploy
> an
> ear on different enviroments and the
> <adminServerHostName>,<adminServerPort>
> etc will hold values based on the environment. At the pom level i can
> access
> the appropriate properties file using profiles, but the same properties
> are
> not available in the plugin.
> 
> Any solution???
> --
> View this message in context:
> http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf259470
> 5s177.html#a7236919
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf2594705s177.html#a7252764
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: weblogic-maven-plugin:using properties file

Posted by Scott Ryan <sr...@gmail.com>.
You just need to configure the plugin in your different profiles.  You can
have a different set of configurations in each profile definition.

Scott Ryan
Chief Technology Officer
Soaring Eagle L.L.C.
scott@theryansplace.com
www.soaringeagleco.com
(303) 263-3044

-----Original Message-----
From: Dmystery [mailto:Deep_Mistry@infosys.com]
Sent: Wednesday, November 08, 2006 4:35 AM
To: users@maven.apache.org
Subject: weblogic-maven-plugin:using properties file



How can i use a properties file in weblogic-maven-plugin. I've to deploy an
ear on different enviroments and the <adminServerHostName>,<adminServerPort>
etc will hold values based on the environment. At the pom level i can access
the appropriate properties file using profiles, but the same properties are
not available in the plugin.

Any solution???
--
View this message in context:
http://www.nabble.com/weblogic-maven-plugin%3Ausing-properties-file-tf259470
5s177.html#a7236919
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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