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
ff714f6c
Commit
ff714f6c
authored
Dec 17, 2014
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update module layout to package custom scope dependencies in lib/
Fixes gh-2187
parent
6391973e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
Layouts.java
...n/java/org/springframework/boot/loader/tools/Layouts.java
+9
-1
LayoutsTests.java
...a/org/springframework/boot/loader/tools/LayoutsTests.java
+2
-0
No files found.
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java
View file @
ff714f6c
...
@@ -17,15 +17,19 @@
...
@@ -17,15 +17,19 @@
package
org
.
springframework
.
boot
.
loader
.
tools
;
package
org
.
springframework
.
boot
.
loader
.
tools
;
import
java.io.File
;
import
java.io.File
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* Common {@link Layout}s.
* Common {@link Layout}s.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Dave Syer
* @author Dave Syer
* @author Andy Wilkinson
*/
*/
public
class
Layouts
{
public
class
Layouts
{
...
@@ -147,6 +151,10 @@ public class Layouts {
...
@@ -147,6 +151,10 @@ public class Layouts {
*/
*/
public
static
class
Module
implements
Layout
{
public
static
class
Module
implements
Layout
{
private
static
final
Set
<
LibraryScope
>
LIB_DESTINATION_SCOPES
=
new
HashSet
<
LibraryScope
>(
Arrays
.
asList
(
LibraryScope
.
COMPILE
,
LibraryScope
.
RUNTIME
,
LibraryScope
.
CUSTOM
));
@Override
@Override
public
String
getLauncherClassName
()
{
public
String
getLauncherClassName
()
{
return
null
;
return
null
;
...
@@ -154,7 +162,7 @@ public class Layouts {
...
@@ -154,7 +162,7 @@ public class Layouts {
@Override
@Override
public
String
getLibraryDestination
(
String
libraryName
,
LibraryScope
scope
)
{
public
String
getLibraryDestination
(
String
libraryName
,
LibraryScope
scope
)
{
if
(
L
ibraryScope
.
COMPILE
.
equals
(
scope
)
||
LibraryScope
.
RUNTIME
.
equal
s
(
scope
))
{
if
(
L
IB_DESTINATION_SCOPES
.
contain
s
(
scope
))
{
return
"lib/"
;
return
"lib/"
;
}
}
return
null
;
return
null
;
...
...
spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java
View file @
ff714f6c
...
@@ -91,6 +91,8 @@ public class LayoutsTests {
...
@@ -91,6 +91,8 @@ public class LayoutsTests {
nullValue
());
nullValue
());
assertThat
(
layout
.
getLibraryDestination
(
"lib.jar"
,
LibraryScope
.
RUNTIME
),
assertThat
(
layout
.
getLibraryDestination
(
"lib.jar"
,
LibraryScope
.
RUNTIME
),
equalTo
(
"lib/"
));
equalTo
(
"lib/"
));
assertThat
(
layout
.
getLibraryDestination
(
"lib.jar"
,
LibraryScope
.
CUSTOM
),
equalTo
(
"lib/"
));
}
}
}
}
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