# --------------------------------------------------------- # --- : # $ ls -lR maven_weblogic_war_deploy maven_weblogic_war_deploy: total 10 -rwxr-xr-x 1 KerekesP 1049089 77 Jul 22 13:02 local_deploy.sh* -rw-r--r-- 1 KerekesP 1049089 6564 Jul 22 11:21 pom.xml drwxr-xr-x 1 KerekesP 1049089 0 Jul 22 12:58 src/ -rwxr-xr-x 1 KerekesP 1049089 77 Jul 22 13:01 stable_deploy.sh* maven_weblogic_war_deploy/src: total 0 drwxr-xr-x 1 KerekesP 1049089 0 Jul 22 12:58 main/ drwxr-xr-x 1 KerekesP 1049089 0 Jul 22 12:58 properties/ maven_weblogic_war_deploy/src/main: total 0 drwxr-xr-x 1 KerekesP 1049089 0 Jul 22 12:59 webapp/ maven_weblogic_war_deploy/src/main/webapp: total 0 maven_weblogic_war_deploy/src/properties: total 2 -rw-r--r-- 1 KerekesP 1049089 221 Jul 22 13:11 local.properties -rw-r--r-- 1 KerekesP 1049089 254 Jul 22 13:11 stable.properties # ---------------------------------------------------------
# --------------------------------------------------------- # --- : # # cat localhost_deploy.sh #!/bin/bash string="$0";IFS=_;set $string; mvn clean -Denvironment=$i deploy # ---------------------------------------------------------
# --------------------------------------------------------- # --- : # # cat domain_deploy.sh #!/bin/bash string="$0";IFS=_;set $string; mvn clean -Denvironment=$i deploy # ---------------------------------------------------------
# ~/src/properties/localhost.properties weblogic-url=t3://localhost:7001 weblogic-user=weblogic weblogic-password=Weblogic1 weblogic-targets=examplesServer #weblogic-verbose=false weblogic-verbose=true
# ~/src/properties/domain.properties weblogic-url=t3://www.domain.com:7001 weblogic-user=weblogic weblogic-password=Weblogic1 weblogic-targets=examplesServer #weblogic-verbose=false weblogic-verbose=true
<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"> <!-- mvn clean -Denvironment=stable deploy mvn clean -Denvironment=local deploy mvn -X clean -Denvironment=local deploy --> <modelVersion>4.0.0</modelVersion> <groupId>demo.project</groupId> <version>01.01.01-SNAPSHOT</version> <artifactId>demo-website</artifactId> <packaging>war</packaging> <name>Demo Web Maven Webapp</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <!-- # = begin repository --> <distributionManagement> <repository> <id>XYZRepository</id> <url>http://xxxxxxxxxxxxxxxxxxx</url> </repository> <snapshotRepository> <id>XYZRepository</id> <url>http://xxxxxxxxxxxxxxxxxxxxxxxx</url> </snapshotRepository> </distributionManagement> <repositories> <repository> <id>BA JDeveloper Repository</id> <url>http://xxxxxxxxxxxxxxxxxxxxxxxx</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <!-- # = end repository --> <dependencies> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> </dependency> <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>xml-maven-plugin</artifactId> <version>1.0.1</version> </dependency> <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0.0</version> </dependency> </dependencies> <build> <finalName>web-app-name</finalName> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0.0</version> <executions> <execution> <id>read-environment-properties</id> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>${project.basedir}/src/properties/${environment}.properties</file> </files> </configuration> </execution> <execution> <id>read-environment-type-properties</id> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>${project.basedir}/src/properties/${environment}.properties</file> </files> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.4.2</version> <executions> <execution> <id>default-copy-resources</id> <phase>process-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <overwrite>true</overwrite> <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/</outputDirectory> <resources> <resource> <directory>${project.basedir}/src/main/resources</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.oracle.weblogic</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>10.3.6.0</version> <configuration> <adminurl>${weblogic-url}</adminurl> <user>${weblogic-user}</user> <password>${weblogic-password}</password> <upload>true</upload> <action>deploy</action> <remote>true</remote> <verbose>${weblogic-verbose}</verbose> <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source> <targets>${weblogic-targets}</targets> <name>${project.build.finalName} (${project.version})</name> </configuration> <executions> <execution> <phase>integration-test</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>