Skip to content

Instantly share code, notes, and snippets.

@pubudu94
Created Jun 24, 2018
Embed
What would you like to do?
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${domain.dir}/lib/mbeantypes
</outputDirectory>
<resources>
<resource>
<directory>
${project.build.directory}
</directory>
<includes>
<include>
${project.build.finalName}.jar
</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.sources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<dependencies>
<dependency>
<groupId>weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>${weblogic.version}</version>
<scope>system</scope>
<systemPath>
${oracle.home}/12.1.3.0/wlserver/server/lib/weblogic.jar
</systemPath>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-mbean</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<java fork="true" classname="weblogic.management.commo.WebLogicMBeanMaker"
classpathref="maven.plugin.classpath">
<jvmarg
value="-DMDF=${project.build.outputDirectory}/CustomAuthentication.xml"/>
<jvmarg
value="-Dfiles=${project.build.outputDirectory}"/>
<jvmarg value="-DcreateStubs=true"/>
<jvmarg value="-Dverbose=true"/>
</java>
</tasks>
</configuration>
</execution>
<execution>
<id>generate-jar</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<java fork="true"
classname="weblogic.management.commo.WebLogicMBeanMaker"
classpathref="maven.plugin.classpath">
<jvmarg value="-DMJF=${jar.file}"/>
<jvmarg value="-Dfiles=${project.build.outputDirectory}"/>
<jvmarg value="-DcreateStubs=true"/>
<jvmarg value="-DpreserveStubs=true"/>
<jvmarg value="-Dverbose=true"/>
<arg value="-preserveStubs"/>
</java>
<move
todir="${generated.sources.dir}/${package.dir}"
file="${project.build.outputDirectory}/CustomAuthenticationImpl.java"/>
<move todir="${generated.sources.dir}">
<fileset
dir="${project.build.outputDirectory}">
<include name="**/*.java"/>
</fileset>
</move>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment