|
68 | 68 | </execution> |
69 | 69 | </executions> |
70 | 70 | </plugin> |
| 71 | + </plugins> |
| 72 | + </build> |
71 | 73 |
|
72 | | - <!-- generate and package license information for included dependencies --> |
73 | | - <plugin> |
74 | | - <groupId>org.codehaus.mojo</groupId> |
75 | | - <artifactId>license-maven-plugin</artifactId> |
76 | | - <version>1.20</version> |
77 | | - <executions> |
78 | | - <execution> |
79 | | - <id>download-licenses</id> |
80 | | - <phase>process-classes</phase> |
81 | | - <goals> |
82 | | - <goal>download-licenses</goal> |
83 | | - </goals> |
84 | | - </execution> |
85 | | - </executions> |
86 | | - <configuration> |
87 | | - <licenseUrlReplacements> |
88 | | - <licenseUrlReplacement> |
89 | | - <regexp>http://(.*)</regexp> |
90 | | - <replacement>https://$1</replacement> |
91 | | - </licenseUrlReplacement> |
92 | | - </licenseUrlReplacements> |
93 | | - <licenseContentSanitizers> |
94 | | - <licenseContentSanitizer> |
95 | | - <id>all-http</id> |
96 | | - <urlRegexp>http(.*)</urlRegexp> |
97 | | - <contentRegexp>http://(.*)</contentRegexp> |
98 | | - <contentReplacement>https://$1</contentReplacement> |
99 | | - </licenseContentSanitizer> |
100 | | - </licenseContentSanitizers> |
101 | | - </configuration> |
102 | | - </plugin> |
103 | | - |
104 | | - <plugin> |
105 | | - <groupId>org.codehaus.mojo</groupId> |
106 | | - <artifactId>xml-maven-plugin</artifactId> |
107 | | - <executions> |
108 | | - <execution> |
109 | | - <phase>process-classes</phase> |
110 | | - <goals> |
111 | | - <goal>transform</goal> |
112 | | - </goals> |
113 | | - </execution> |
114 | | - </executions> |
115 | | - <configuration> |
116 | | - <transformationSets> |
117 | | - <transformationSet> |
118 | | - <dir>${basedir}/target/generated-resources/</dir> |
119 | | - <includes>*.xml</includes> |
120 | | - <stylesheet>${basedir}/license-format-stylesheet.xsl</stylesheet> |
121 | | - <outputDir>${project.build.directory}/generated-license-information</outputDir> |
122 | | - </transformationSet> |
123 | | - </transformationSets> |
124 | | - </configuration> |
125 | | - </plugin> |
| 74 | + <profiles> |
| 75 | + <profile> |
| 76 | + <id>generate-and-include-license-files</id> |
| 77 | + <build> |
| 78 | + <plugins> |
126 | 79 |
|
127 | | - <plugin> |
128 | | - <groupId>org.apache.maven.plugins</groupId> |
129 | | - <artifactId>maven-resources-plugin</artifactId> |
130 | | - <executions> |
131 | | - <execution> |
132 | | - <id>copy-own-license</id> |
133 | | - <phase>process-classes</phase> |
134 | | - <goals> |
135 | | - <goal>copy-resources</goal> |
136 | | - </goals> |
| 80 | + <!-- generate and package license information for included |
| 81 | + dependencies --> |
| 82 | + <plugin> |
| 83 | + <groupId>org.codehaus.mojo</groupId> |
| 84 | + <artifactId>license-maven-plugin</artifactId> |
| 85 | + <version>1.20</version> |
| 86 | + <executions> |
| 87 | + <execution> |
| 88 | + <id>download-licenses</id> |
| 89 | + <phase>process-classes</phase> |
| 90 | + <goals> |
| 91 | + <goal>download-licenses</goal> |
| 92 | + </goals> |
| 93 | + </execution> |
| 94 | + </executions> |
137 | 95 | <configuration> |
138 | | - <outputDirectory>${project.build.outputDirectory}</outputDirectory> |
139 | | - <resources> |
140 | | - <resource> |
141 | | - <directory>${basedir}</directory> |
142 | | - <filtering>true</filtering> |
143 | | - <include>LICENSE</include> |
144 | | - </resource> |
145 | | - </resources> |
| 96 | + <licenseUrlReplacements> |
| 97 | + <licenseUrlReplacement> |
| 98 | + <regexp>http://(.*)</regexp> |
| 99 | + <replacement>https://$1</replacement> |
| 100 | + </licenseUrlReplacement> |
| 101 | + </licenseUrlReplacements> |
| 102 | + <licenseContentSanitizers> |
| 103 | + <licenseContentSanitizer> |
| 104 | + <id>all-http</id> |
| 105 | + <urlRegexp>http(.*)</urlRegexp> |
| 106 | + <contentRegexp>http://(.*)</contentRegexp> |
| 107 | + <contentReplacement>https://$1</contentReplacement> |
| 108 | + </licenseContentSanitizer> |
| 109 | + </licenseContentSanitizers> |
146 | 110 | </configuration> |
147 | | - </execution> |
148 | | - <execution> |
149 | | - <id>copy-license-files</id> |
150 | | - <phase>process-classes</phase> |
151 | | - <goals> |
152 | | - <goal>copy-resources</goal> |
153 | | - </goals> |
154 | | - <configuration> |
155 | | - <outputDirectory>${project.build.outputDirectory}/META-INF/third-party-open-source-licenses/</outputDirectory> |
156 | | - <resources> |
157 | | - <resource> |
158 | | - <directory>${project.build.directory}/generated-resources/licenses</directory> |
159 | | - <filtering>false</filtering> |
160 | | - </resource> |
161 | | - </resources> |
162 | | - </configuration> |
163 | | - </execution> |
164 | | - </executions> |
165 | | - </plugin> |
| 111 | + </plugin> |
166 | 112 |
|
167 | | - <plugin> |
168 | | - <groupId>com.coderplus.maven.plugins</groupId> |
169 | | - <artifactId>copy-rename-maven-plugin</artifactId> |
170 | | - <version>1.0</version> |
171 | | - <executions> |
172 | | - <execution> |
173 | | - <id>copy-and-rename-license-summary</id> |
174 | | - <phase>process-classes</phase> |
175 | | - <goals> |
176 | | - <goal>copy</goal> |
177 | | - </goals> |
| 113 | + <plugin> |
| 114 | + <groupId>org.codehaus.mojo</groupId> |
| 115 | + <artifactId>xml-maven-plugin</artifactId> |
| 116 | + <executions> |
| 117 | + <execution> |
| 118 | + <phase>process-classes</phase> |
| 119 | + <goals> |
| 120 | + <goal>transform</goal> |
| 121 | + </goals> |
| 122 | + </execution> |
| 123 | + </executions> |
178 | 124 | <configuration> |
179 | | - <sourceFile>${project.build.directory}/generated-license-information/licenses.xml</sourceFile> |
180 | | - <destinationFile>${project.build.outputDirectory}/META-INF/third-party-open-source-licenses.txt</destinationFile> |
| 125 | + <transformationSets> |
| 126 | + <transformationSet> |
| 127 | + <dir>${basedir}/target/generated-resources/</dir> |
| 128 | + <includes>*.xml</includes> |
| 129 | + <stylesheet> |
| 130 | + ${basedir}/license-format-stylesheet.xsl</stylesheet> |
| 131 | + <outputDir> |
| 132 | + ${project.build.directory}/generated-license-information</outputDir> |
| 133 | + </transformationSet> |
| 134 | + </transformationSets> |
181 | 135 | </configuration> |
182 | | - </execution> |
183 | | - </executions> |
184 | | - </plugin> |
| 136 | + </plugin> |
| 137 | + |
| 138 | + <plugin> |
| 139 | + <groupId>org.apache.maven.plugins</groupId> |
| 140 | + <artifactId>maven-resources-plugin</artifactId> |
| 141 | + <executions> |
| 142 | + <execution> |
| 143 | + <id>copy-own-license</id> |
| 144 | + <phase>process-classes</phase> |
| 145 | + <goals> |
| 146 | + <goal>copy-resources</goal> |
| 147 | + </goals> |
| 148 | + <configuration> |
| 149 | + <outputDirectory> |
| 150 | + ${project.build.outputDirectory}</outputDirectory> |
| 151 | + <resources> |
| 152 | + <resource> |
| 153 | + <directory>${basedir}</directory> |
| 154 | + <filtering>true</filtering> |
| 155 | + <include>LICENSE</include> |
| 156 | + </resource> |
| 157 | + </resources> |
| 158 | + </configuration> |
| 159 | + </execution> |
| 160 | + <execution> |
| 161 | + <id>copy-license-files</id> |
| 162 | + <phase>process-classes</phase> |
| 163 | + <goals> |
| 164 | + <goal>copy-resources</goal> |
| 165 | + </goals> |
| 166 | + <configuration> |
| 167 | + <outputDirectory> |
| 168 | + ${project.build.outputDirectory}/META-INF/third-party-open-source-licenses/</outputDirectory> |
| 169 | + <resources> |
| 170 | + <resource> |
| 171 | + <directory> |
| 172 | + ${project.build.directory}/generated-resources/licenses</directory> |
| 173 | + <filtering>false</filtering> |
| 174 | + </resource> |
| 175 | + </resources> |
| 176 | + </configuration> |
| 177 | + </execution> |
| 178 | + </executions> |
| 179 | + </plugin> |
| 180 | + |
| 181 | + <plugin> |
| 182 | + <groupId>com.coderplus.maven.plugins</groupId> |
| 183 | + <artifactId>copy-rename-maven-plugin</artifactId> |
| 184 | + <version>1.0</version> |
| 185 | + <executions> |
| 186 | + <execution> |
| 187 | + <id>copy-and-rename-license-summary</id> |
| 188 | + <phase>process-classes</phase> |
| 189 | + <goals> |
| 190 | + <goal>copy</goal> |
| 191 | + </goals> |
| 192 | + <configuration> |
| 193 | + <sourceFile> |
| 194 | + ${project.build.directory}/generated-license-information/licenses.xml</sourceFile> |
| 195 | + <destinationFile> |
| 196 | + ${project.build.outputDirectory}/META-INF/third-party-open-source-licenses.txt</destinationFile> |
| 197 | + </configuration> |
| 198 | + </execution> |
| 199 | + </executions> |
| 200 | + </plugin> |
| 201 | + |
| 202 | + </plugins> |
| 203 | + </build> |
| 204 | + </profile> |
| 205 | + |
| 206 | + </profiles> |
185 | 207 |
|
186 | | - </plugins> |
187 | | - </build> |
188 | 208 | </project> |
0 commit comments