maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neeraj Malik <neeraj.mali...@googlemail.com>
Subject Re: Reactor projects and ${project.version}
Date Wed, 16 Sep 2015 06:29:47 GMT
Dear All,

I am using maven 3.2.5

i want to use difference property files to build war for diff environments
and deploy it on local, test and prod accordingly based on maven command -
mvn -Plocal clean install


/resources/local/env.properties
/resources/test/env.properties
/resources/prod/env.properties

local env property file -
weblogic.splitDevelopmentDirectoryMode = false
weblogic.targetName = AdminServer
weblogic.protocal = http
weblogic.url = localhost
weblogic.port = 7001
weblogic.user = user
weblogic.password = pass123
weblogic.upload = false
weblogic.remote = false
weblogic.verbose = false
weblogic.debug = false
weblogic.noExit = true
project.build.directory =


Can you please suggest whats wrong with given POM.

Thanks.

Regards
Neeraj


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.purchase</groupId>
    <artifactId>Invoice</artifactId>
    <version>1.0</version>
    <packaging>war</packaging>


    <profiles>
       <profile>
               <id>local</id>
            <activation>
                   <activeByDefault>false</activeByDefault>
            </activation>

            <resources>
                <resource>

<directory>${project.basedir}/src/main/resources</directory>
                </resource>
            </resources>

            <testResources>
                <testResource>

<directory>${project.basedir}/src/test/resources</directory>
                </testResource>
            </testResources>

             <build>
               <plugins>
                    <plugin>
                        <groupId>com.oracle.weblogic</groupId>
                        <artifactId>weblogic-maven-plugin</artifactId>
                        <version>10.3.4</version>
                           <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                   </plugins>
             </build>
           </profile>
      </profiles>


    <dependencies>

        <dependency>
            <groupId>weblogic-path</groupId>
            <artifactId>weblogic-path</artifactId>
            <scope>system</scope>
            <systemPath>${WL_HOME}/server/lib/weblogic.jar</systemPath>
            <version>10.3.5</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/webapp</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>

            <!-- required or not -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.6</version>
                        <scope>system</scope>

<systemPath>${java.home}/../lib/tools.jar</systemPath>
                    </dependency>
                </dependencies>
                 <version>1.7</version>
            </plugin>


            <plugin>
                <groupId>com.maven.plugins</groupId>
                <artifactId>weblogic-10.3.3.0-maven-plugin</artifactId>
                <version>2.9.1.2</version>

                <configuration>

<splitDevelopmentDirectoryMode>${weblogic.splitDevelopmentDirectoryMode}</splitDevelopmentDirectoryMode>


                    <targetNames>${weblogic.targetName}</targetNames>

<adminServerProtocol>${weblogic.protocal}</adminServerProtocol>

<adminServerHostName>${weblogic.url}</adminServerHostName>

                    <adminServerPort>${weblogic.port}</adminServerPort>
                    <userId>${weblogic.user}</userId>
                    <password>${weblogic.password}</password>

                    <upload>${weblogic.upload}</upload>
                    <remote>${weblogic.remote}</remote>

                    <verbose>false</verbose>
                    <debug>false</debug>
                    <noExit>true</noExit>

<artifactPath>${project.build.directory}/InvoiceBAS-${version}</artifactPath>

               </configuration>
            </plugin>

        </plugins>
    </build>



</project>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message