File tree Expand file tree Collapse file tree 9 files changed +117
-1
lines changed
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src
repackage-layout-property
main/java/org/springframework/boot/maven Expand file tree Collapse file tree 9 files changed +117
-1
lines changed Original file line number Diff line number Diff line change
1
+ invoker.goals =package
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
4
+ <modelVersion >4.0.0</modelVersion >
5
+ <groupId >org.springframework.boot.maven.it</groupId >
6
+ <artifactId >repackage-layout-default</artifactId >
7
+ <version >0.0.1.BUILD-SNAPSHOT</version >
8
+ <properties >
9
+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
10
+ <maven .compiler.source>@java.version@</maven .compiler.source>
11
+ <maven .compiler.target>@java.version@</maven .compiler.target>
12
+ </properties >
13
+ <build >
14
+ <plugins >
15
+ <plugin >
16
+ <groupId >@project.groupId@</groupId >
17
+ <artifactId >@project.artifactId@</artifactId >
18
+ <version >@project.version@</version >
19
+ <executions >
20
+ <execution >
21
+ <phase >package</phase >
22
+ <goals >
23
+ <goal >repackage</goal >
24
+ </goals >
25
+ </execution >
26
+ </executions >
27
+ </plugin >
28
+ </plugins >
29
+ </build >
30
+ </project >
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2012-2017 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package org .test ;
18
+
19
+ public class SampleApplication {
20
+
21
+ public static void main (String [] args ) {
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ import static org.junit.Assert.assertFalse
2
+
3
+ def file = new File (basedir, " build.log" )
4
+ assertFalse file. text. contains(" Layout:" )
Original file line number Diff line number Diff line change
1
+ invoker.goals =package -Dspring-boot.repackage.layout =ZIP
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
4
+ <modelVersion >4.0.0</modelVersion >
5
+ <groupId >org.springframework.boot.maven.it</groupId >
6
+ <artifactId >repackage-layout-default</artifactId >
7
+ <version >0.0.1.BUILD-SNAPSHOT</version >
8
+ <properties >
9
+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
10
+ <maven .compiler.source>@java.version@</maven .compiler.source>
11
+ <maven .compiler.target>@java.version@</maven .compiler.target>
12
+ </properties >
13
+ <build >
14
+ <plugins >
15
+ <plugin >
16
+ <groupId >@project.groupId@</groupId >
17
+ <artifactId >@project.artifactId@</artifactId >
18
+ <version >@project.version@</version >
19
+ <executions >
20
+ <execution >
21
+ <phase >package</phase >
22
+ <goals >
23
+ <goal >repackage</goal >
24
+ </goals >
25
+ </execution >
26
+ </executions >
27
+ </plugin >
28
+ </plugins >
29
+ </build >
30
+ </project >
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2012-2017 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package org .test ;
18
+
19
+ public class SampleApplication {
20
+
21
+ public static void main (String [] args ) {
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ import static org.junit.Assert.assertTrue
2
+
3
+ def file = new File (basedir, " build.log" )
4
+ assertTrue file. text. contains(" Layout: ZIP" )
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
139
139
* archive type.
140
140
* @since 1.0.0
141
141
*/
142
- @ Parameter
142
+ @ Parameter ( property = "spring-boot.repackage.layout" )
143
143
private LayoutType layout ;
144
144
145
145
/**
You can’t perform that action at this time.
0 commit comments