|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + <modelVersion>4.0.0</modelVersion> |
| 6 | + <artifactId>sample-app-spring-boot</artifactId> |
| 7 | + <name>sample-app-spring-boot</name> |
| 8 | + <description>Logging Sample App for Spring Boot</description> |
| 9 | + <parent> |
| 10 | + <groupId>com.sap.hcp.cf.logging</groupId> |
| 11 | + <artifactId>cf-java-logging-support-parent</artifactId> |
| 12 | + <version>3.3.0</version> |
| 13 | + <relativePath>../pom.xml</relativePath> |
| 14 | + </parent> |
| 15 | + |
| 16 | + <properties> |
| 17 | + <java.version>11</java.version> |
| 18 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 19 | + <maven.compiler.source>11</maven.compiler.source> |
| 20 | + <maven.compiler.target>11</maven.compiler.target> |
| 21 | + <spring.boot.version>2.3.4.RELEASE</spring.boot.version> |
| 22 | + <keytool.plugin.version>1.5</keytool.plugin.version> |
| 23 | + <keystore.token.store_password>0bzhBRNUXBR5 |
| 24 | + </keystore.token.store_password> |
| 25 | + <keystore.token.key_password>0bzhBRNUXBR5 |
| 26 | + </keystore.token.key_password> |
| 27 | + <keystore.token.key_alias>jwt-token</keystore.token.key_alias> |
| 28 | + <keystore.token.dname>CN=cf-java-logging-support, OU=None, O=SAP, |
| 29 | + L=Unknown, ST=Unknown, C=Unknown |
| 30 | + </keystore.token.dname> |
| 31 | + </properties> |
| 32 | + |
| 33 | + <dependencyManagement> |
| 34 | + <dependencies> |
| 35 | + <dependency> |
| 36 | + <groupId>org.springframework.boot</groupId> |
| 37 | + <artifactId>spring-boot-dependencies</artifactId> |
| 38 | + <version>${spring.boot.version}</version> |
| 39 | + <type>pom</type> |
| 40 | + <scope>import</scope> |
| 41 | + </dependency> |
| 42 | + </dependencies> |
| 43 | + </dependencyManagement> |
| 44 | + |
| 45 | + <dependencies> |
| 46 | + <dependency> |
| 47 | + <groupId>org.springframework.boot</groupId> |
| 48 | + <artifactId>spring-boot-starter-actuator</artifactId> |
| 49 | + <exclusions> |
| 50 | + <exclusion> |
| 51 | + <groupId>org.springframework.boot</groupId> |
| 52 | + <artifactId>spring-boot-starter-logging</artifactId> |
| 53 | + </exclusion> |
| 54 | + </exclusions> |
| 55 | + </dependency> |
| 56 | + <dependency> |
| 57 | + <groupId>org.springframework.boot</groupId> |
| 58 | + <artifactId>spring-boot-starter-web</artifactId> |
| 59 | + <exclusions> |
| 60 | + <exclusion> |
| 61 | + <groupId>org.springframework.boot</groupId> |
| 62 | + <artifactId>spring-boot-starter-logging</artifactId> |
| 63 | + </exclusion> |
| 64 | + </exclusions> |
| 65 | + </dependency> |
| 66 | + <dependency> |
| 67 | + <groupId>org.springframework.boot</groupId> |
| 68 | + <artifactId>spring-boot-configuration-processor</artifactId> |
| 69 | + <optional>true</optional> |
| 70 | + </dependency> |
| 71 | + <dependency> |
| 72 | + <groupId>org.springframework.boot</groupId> |
| 73 | + <artifactId>spring-boot-starter-security</artifactId> |
| 74 | + </dependency> |
| 75 | + <dependency> |
| 76 | + <groupId>org.springframework.security</groupId> |
| 77 | + <artifactId>spring-security-test</artifactId> |
| 78 | + <scope>test</scope> |
| 79 | + </dependency> |
| 80 | + |
| 81 | + <!-- We're using the Servlet Filter instrumentation --> |
| 82 | + <dependency> |
| 83 | + <groupId>com.sap.hcp.cf.logging</groupId> |
| 84 | + <artifactId>cf-java-logging-support-servlet</artifactId> |
| 85 | + <version>${project.version}</version> |
| 86 | + </dependency> |
| 87 | + |
| 88 | + <dependency> |
| 89 | + <groupId>org.springframework.boot</groupId> |
| 90 | + <artifactId>spring-boot-starter-test</artifactId> |
| 91 | + <scope>test</scope> |
| 92 | + <exclusions> |
| 93 | + <exclusion> |
| 94 | + <groupId>org.junit.vintage</groupId> |
| 95 | + <artifactId>junit-vintage-engine</artifactId> |
| 96 | + </exclusion> |
| 97 | + </exclusions> |
| 98 | + </dependency> |
| 99 | + </dependencies> |
| 100 | + |
| 101 | + <build> |
| 102 | + <resources> |
| 103 | + <resource> |
| 104 | + <directory>src/main/resources</directory> |
| 105 | + <filtering>true</filtering> |
| 106 | + </resource> |
| 107 | + <resource> |
| 108 | + <directory>${basedir}/target/generated-resources/keystore</directory> |
| 109 | + </resource> |
| 110 | + </resources> |
| 111 | + |
| 112 | + <plugins> |
| 113 | + <plugin> |
| 114 | + <groupId>org.springframework.boot</groupId> |
| 115 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 116 | + <version>${spring.boot.version}</version> |
| 117 | + <executions> |
| 118 | + <execution> |
| 119 | + <goals> |
| 120 | + <goal>repackage</goal> |
| 121 | + </goals> |
| 122 | + </execution> |
| 123 | + </executions> |
| 124 | + </plugin> |
| 125 | + </plugins> |
| 126 | + </build> |
| 127 | + |
| 128 | + <profiles> |
| 129 | + <profile> |
| 130 | + <id>initialze-keystore</id> |
| 131 | + <activation> |
| 132 | + <file> |
| 133 | + <missing>${basedir}/target/generated-resources/keystore/token_keystore.jks</missing> |
| 134 | + </file> |
| 135 | + </activation> |
| 136 | + <build> |
| 137 | + <plugins> |
| 138 | + <plugin> |
| 139 | + <groupId>org.codehaus.mojo</groupId> |
| 140 | + <artifactId>keytool-maven-plugin</artifactId> |
| 141 | + <version>${keytool.plugin.version}</version> |
| 142 | + <executions> |
| 143 | + <execution> |
| 144 | + <id>create-key-pair</id> |
| 145 | + <goals> |
| 146 | + <goal>generateKeyPair</goal> |
| 147 | + </goals> |
| 148 | + <phase>generate-resources</phase> |
| 149 | + </execution> |
| 150 | + </executions> |
| 151 | + <configuration> |
| 152 | + <keystore>${basedir}/target/generated-resources/keystore/token_keystore.jks</keystore> |
| 153 | + <storepass>${keystore.token.store_password}</storepass> |
| 154 | + <keypass>${keystore.token.key_password}</keypass> |
| 155 | + <alias>${keystore.token.key_alias}</alias> |
| 156 | + <dname>${keystore.token.dname}</dname> |
| 157 | + <sigalg>SHA256withRSA</sigalg> |
| 158 | + <ext></ext> |
| 159 | + <validity>100</validity> |
| 160 | + <keyalg>RSA</keyalg> |
| 161 | + <keysize>2048</keysize> |
| 162 | + </configuration> |
| 163 | + </plugin> |
| 164 | + </plugins> |
| 165 | + </build> |
| 166 | + </profile> |
| 167 | + <profile> |
| 168 | + <id>logback</id> |
| 169 | + <activation> |
| 170 | + <property> |
| 171 | + <name>!log4j2</name> |
| 172 | + </property> |
| 173 | + </activation> |
| 174 | + <dependencies> |
| 175 | + <dependency> |
| 176 | + <groupId>org.springframework.boot</groupId> |
| 177 | + <artifactId>spring-boot-starter-logging</artifactId> |
| 178 | + </dependency> |
| 179 | + <dependency> |
| 180 | + <groupId>com.sap.hcp.cf.logging</groupId> |
| 181 | + <artifactId>cf-java-logging-support-logback</artifactId> |
| 182 | + <version>${project.version}</version> |
| 183 | + </dependency> |
| 184 | + </dependencies> |
| 185 | + </profile> |
| 186 | + <profile> |
| 187 | + <id>log4j2</id> |
| 188 | + <activation> |
| 189 | + <property> |
| 190 | + <name>log4j2</name> |
| 191 | + </property> |
| 192 | + </activation> |
| 193 | + <dependencies> |
| 194 | + <dependency> |
| 195 | + <groupId>org.springframework.boot</groupId> |
| 196 | + <artifactId>spring-boot-starter-log4j2</artifactId> |
| 197 | + </dependency> |
| 198 | + <dependency> |
| 199 | + <groupId>com.sap.hcp.cf.logging</groupId> |
| 200 | + <artifactId>cf-java-logging-support-log4j2</artifactId> |
| 201 | + <version>${project.version}</version> |
| 202 | + </dependency> |
| 203 | + </dependencies> |
| 204 | + </profile> |
| 205 | + </profiles> |
| 206 | + |
| 207 | +</project> |
0 commit comments