|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + <modelVersion>4.0.0</modelVersion> |
| 6 | + |
| 7 | + <groupId>com.appdynamics.extension.webdispatcher</groupId> |
| 8 | + <artifactId>webdispatcherExtension</artifactId> |
| 9 | + <version>0.0.1</version> |
| 10 | + |
| 11 | + <name>webdispatcherExtension</name> |
| 12 | + <description>A simple webdispatcherExtension.</description> |
| 13 | + <!-- FIXME change it to the project's website --> |
| 14 | + <url>http://www.example.com</url> |
| 15 | + |
| 16 | + <properties> |
| 17 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 18 | + <maven.compiler.source>1.8</maven.compiler.source> |
| 19 | + <maven.compiler.target>1.8</maven.compiler.target> |
| 20 | + <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format> |
| 21 | + <target.dir>${project.build.directory}/WebDispatcher</target.dir> |
| 22 | + </properties> |
| 23 | + |
| 24 | + <dependencies> |
| 25 | + <dependency> |
| 26 | + <groupId>junit</groupId> |
| 27 | + <artifactId>junit</artifactId> |
| 28 | + <version>3.8.1</version> |
| 29 | + </dependency> |
| 30 | + <dependency> |
| 31 | + <groupId>com.h2database</groupId> |
| 32 | + <artifactId>h2</artifactId> |
| 33 | + <version>1.4.190</version> |
| 34 | + </dependency> |
| 35 | + </dependencies> |
| 36 | + |
| 37 | + <build> |
| 38 | + <finalName>${project.artifactId}</finalName> |
| 39 | + <plugins> |
| 40 | + <plugin> |
| 41 | + <groupId>org.apache.maven.plugins</groupId> |
| 42 | + <artifactId>maven-dependency-plugin</artifactId> |
| 43 | + <version>3.1.1</version> |
| 44 | + <executions> |
| 45 | + <execution> |
| 46 | + <id>copy-dependencies</id> |
| 47 | + <phase>package</phase> |
| 48 | + <goals> |
| 49 | + <goal>copy-dependencies</goal> |
| 50 | + </goals> |
| 51 | + <configuration> |
| 52 | + <excludeArtifactIds>junit</excludeArtifactIds> |
| 53 | + <outputDirectory>${project.build.directory}/WebDispatcherMonitor</outputDirectory> |
| 54 | + <overWriteReleases>false</overWriteReleases> |
| 55 | + <overWriteSnapshots>false</overWriteSnapshots> |
| 56 | + <overWriteIfNewer>true</overWriteIfNewer> |
| 57 | + </configuration> |
| 58 | + </execution> |
| 59 | + </executions> |
| 60 | + </plugin> |
| 61 | + |
| 62 | + <plugin> |
| 63 | + <groupId>org.codehaus.mojo</groupId> |
| 64 | + <artifactId>versions-maven-plugin</artifactId> |
| 65 | + <version>2.1</version> |
| 66 | + </plugin> |
| 67 | + <plugin> |
| 68 | + <groupId>org.apache.maven.plugins</groupId> |
| 69 | + <artifactId>maven-shade-plugin</artifactId> |
| 70 | + <version>3.2.1</version> |
| 71 | + <configuration> |
| 72 | + <createDependencyReducedPom>false</createDependencyReducedPom> |
| 73 | + <minimizeJar>true</minimizeJar> |
| 74 | + <filters> |
| 75 | + <filter> |
| 76 | + <artifact>*:*</artifact> |
| 77 | + <excludes> |
| 78 | + <exclude>META-INF/*.SF</exclude> |
| 79 | + <exclude>META-INF/*.DSA</exclude> |
| 80 | + <exclude>META-INF/*.RSA</exclude> |
| 81 | + </excludes> |
| 82 | + </filter> |
| 83 | + <!--<filter> |
| 84 | + <artifact>com.h2database:h2</artifact> |
| 85 | + <includes> |
| 86 | + <include>**</include> |
| 87 | + </includes> |
| 88 | + </filter>--> |
| 89 | + <filter> |
| 90 | + <artifact>junit:junit</artifact> |
| 91 | + <excludes> |
| 92 | + <exclude>**</exclude> |
| 93 | + </excludes> |
| 94 | + </filter> |
| 95 | + </filters> |
| 96 | + </configuration> |
| 97 | + <executions> |
| 98 | + <execution> |
| 99 | + <phase>package</phase> |
| 100 | + <goals> |
| 101 | + <goal>shade</goal> |
| 102 | + </goals> |
| 103 | + <configuration> |
| 104 | + <transformers> |
| 105 | + <transformer |
| 106 | + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 107 | + <transformer |
| 108 | + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 109 | + <manifestEntries> |
| 110 | + <Implementation-Title>WebDispatcher monitor v${project.version} Build Date ${maven.build.timestamp}</Implementation-Title> |
| 111 | + <Main-Class>com.appdynamics.extension.webdispatcher.webdispatcherExtension.ExtensionController</Main-Class> |
| 112 | + <Class-Path>h2-1.4.190.jar</Class-Path> |
| 113 | + <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK> |
| 114 | + <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK> |
| 115 | + </manifestEntries> |
| 116 | + </transformer> |
| 117 | + </transformers> |
| 118 | + </configuration> |
| 119 | + </execution> |
| 120 | + </executions> |
| 121 | + </plugin> |
| 122 | + <plugin> |
| 123 | + <groupId>org.apache.maven.plugins</groupId> |
| 124 | + <artifactId>maven-antrun-plugin</artifactId> |
| 125 | + <version>1.6</version> |
| 126 | + <executions> |
| 127 | + <execution> |
| 128 | + <!--<id>install</id>--> |
| 129 | + <phase>package</phase> |
| 130 | + <!--<goals> |
| 131 | + <goal>install</goal> |
| 132 | + </goals>--> |
| 133 | + <configuration> |
| 134 | + <target> |
| 135 | + <mkdir dir="${project.build.directory}/WebDispatcherMonitor" /> |
| 136 | + <copy todir="${project.build.directory}/WebDispatcherMonitor"> |
| 137 | + <fileset dir="src/main/resources" includes="config.properties" /> |
| 138 | + <fileset dir="src/main/resources" includes="read.properties" /> |
| 139 | + <fileset dir="src/main/resources" includes="monitor.xml" /> |
| 140 | + <fileset dir="src/main/resources" includes="webDispatcherAIX.sh" /> |
| 141 | + <fileset dir="src/main/resources" includes="webDispatcherLinux.sh" /> |
| 142 | + |
| 143 | + </copy> |
| 144 | + <copy todir="${project.build.directory}/WebDispatcherMonitor"> |
| 145 | + <fileset dir="${project.build.directory}" |
| 146 | + includes="${project.artifactId}.${project.packaging}" /> |
| 147 | + </copy> |
| 148 | + <zip destfile="${project.build.directory}/WebDispatcherMonitor-${project.version}.zip"> |
| 149 | + <zipfileset dir="${project.build.directory}/WebDispatcherMonitor" filemode="755" |
| 150 | + prefix="WebDispatcherMonitor/" /> |
| 151 | + </zip> |
| 152 | + <!--<delete dir="${project.build.directory}/WebDispatcherMonitor" />--> |
| 153 | + </target> |
| 154 | + </configuration> |
| 155 | + <goals> |
| 156 | + <goal>run</goal> |
| 157 | + </goals> |
| 158 | + </execution> |
| 159 | + </executions> |
| 160 | + </plugin> |
| 161 | + </plugins> |
| 162 | + <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> |
| 163 | + <plugins> |
| 164 | + <plugin> |
| 165 | + <artifactId>maven-resources-plugin</artifactId> |
| 166 | + <version>3.1.0</version> |
| 167 | + <executions> |
| 168 | + <execution> |
| 169 | + <id>copy-resources</id> |
| 170 | + <!-- here the phase you need --> |
| 171 | + <phase>package</phase> |
| 172 | + <goals> |
| 173 | + <goal>copy-resources</goal> |
| 174 | + </goals> |
| 175 | + <configuration> |
| 176 | + <outputDirectory>${basedir}/target/</outputDirectory> |
| 177 | + <resources> |
| 178 | + <resource> |
| 179 | + <directory>src/main/resources/</directory> |
| 180 | + <filtering>true</filtering> |
| 181 | + </resource> |
| 182 | + </resources> |
| 183 | + </configuration> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + </plugin> |
| 187 | + <plugin> |
| 188 | + <artifactId>maven-clean-plugin</artifactId> |
| 189 | + <version>3.1.0</version> |
| 190 | + </plugin> |
| 191 | + <plugin> |
| 192 | + <artifactId>maven-site-plugin</artifactId> |
| 193 | + <version>3.7.1</version> |
| 194 | + </plugin> |
| 195 | + <plugin> |
| 196 | + <artifactId>maven-project-info-reports-plugin</artifactId> |
| 197 | + <version>3.0.0</version> |
| 198 | + </plugin> |
| 199 | + <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> |
| 200 | + <plugin> |
| 201 | + <artifactId>maven-compiler-plugin</artifactId> |
| 202 | + <version>3.8.0</version> |
| 203 | + </plugin> |
| 204 | + <plugin> |
| 205 | + <artifactId>maven-surefire-plugin</artifactId> |
| 206 | + <version>2.22.1</version> |
| 207 | + </plugin> |
| 208 | + <plugin> |
| 209 | + <artifactId>maven-jar-plugin</artifactId> |
| 210 | + <version>3.0.2</version> |
| 211 | + </plugin> |
| 212 | + <plugin> |
| 213 | + <artifactId>maven-install-plugin</artifactId> |
| 214 | + <version>2.5.2</version> |
| 215 | + </plugin> |
| 216 | + <plugin> |
| 217 | + <artifactId>maven-deploy-plugin</artifactId> |
| 218 | + <version>2.8.2</version> |
| 219 | + </plugin> |
| 220 | + </plugins> |
| 221 | + </pluginManagement> |
| 222 | + </build> |
| 223 | + |
| 224 | + <reporting> |
| 225 | + <plugins> |
| 226 | + <plugin> |
| 227 | + <artifactId>maven-project-info-reports-plugin</artifactId> |
| 228 | + </plugin> |
| 229 | + </plugins> |
| 230 | + </reporting> |
| 231 | +</project> |
0 commit comments