Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
31042bfc
Commit
31042bfc
authored
Nov 10, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test inclusion of system scope dependencies in repackaged war
Closes gh-22503
parent
48bfdc13
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
0 deletions
+117
-0
pom.xml
.../spring-boot-maven-plugin/src/it/war-system-scope/pom.xml
+65
-0
sample-1.0.0.jar
...oot-maven-plugin/src/it/war-system-scope/sample-1.0.0.jar
+0
-0
SampleApplication.java
...ystem-scope/src/main/java/org/test/SampleApplication.java
+24
-0
index.html
...plugin/src/it/war-system-scope/src/main/webapp/index.html
+1
-0
verify.groovy
...g-boot-maven-plugin/src/it/war-system-scope/verify.groovy
+27
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-system-scope/pom.xml
0 → 100644
View file @
31042bfc
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.springframework.boot.maven.it
</groupId>
<artifactId>
war-system-scope
</artifactId>
<version>
0.0.1.BUILD-SNAPSHOT
</version>
<packaging>
war
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
@java.version@
</maven.compiler.source>
<maven.compiler.target>
@java.version@
</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>
@project.groupId@
</groupId>
<artifactId>
@project.artifactId@
</artifactId>
<version>
@project.version@
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
<configuration>
<includeSystemScope>
true
</includeSystemScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
@maven-war-plugin.version@
</version>
<configuration>
<archive>
<manifestEntries>
<Not-Used>
Foo
</Not-Used>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context
</artifactId>
<version>
@spring-framework.version@
</version>
</dependency>
<dependency>
<groupId>
jakarta.servlet
</groupId>
<artifactId>
jakarta.servlet-api
</artifactId>
<version>
@jakarta-servlet.version@
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
com.example
</groupId>
<artifactId>
sample
</artifactId>
<version>
1.0.0
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/sample-1.0.0.jar
</systemPath>
</dependency>
</dependencies>
</project>
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-system-scope/sample-1.0.0.jar
0 → 100644
View file @
31042bfc
File added
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-system-scope/src/main/java/org/test/SampleApplication.java
0 → 100644
View file @
31042bfc
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
test
;
public
class
SampleApplication
{
public
static
void
main
(
String
[]
args
)
{
}
}
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-system-scope/src/main/webapp/index.html
0 → 100644
View file @
31042bfc
<html></html>
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-system-scope/verify.groovy
0 → 100644
View file @
31042bfc
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/war-system-scope-0.0.1.BUILD-SNAPSHOT.war"
)
new
Verify
.
WarArchiveVerification
(
f
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasEntryNameStartingWith
(
"WEB-INF/lib-provided/sample-1.0.0.jar"
)
}
}.
verify
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment