public final class JkJavaDepScopes
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARCHIVE_MASTER
Useful when using scope mapping.
|
static JkScope |
COMPILE
|
static JkScope[] |
COMPILE_AND_RUNTIME
Shorthand to declare both COMPILE and RUNTIME scope at once.
|
static JkScopeMapping |
DEFAULT_SCOPE_MAPPING
Scope mapping used
|
static JkScope |
JAVADOC
This scope is used for publication purpose
|
static JkScope |
PROVIDED
A dependency declared with this scope will be available at compile time but won't be part of the packaged
product (similar to Maven scope 'provided').
|
static JkScope |
RUNTIME
A dependency declared with this scope will be present in the classpath for packaging or running the module.
If it is a library, dependencies will be included in the fat jar.
If it is a war, dependencies will be included in war file.
|
static JkScope[] |
SCOPES_FOR_COMPILATION
Scopes necessary for compiling production code.
|
static JkScope[] |
SCOPES_FOR_TEST
Scopes necessary for both compiling tests and run them.
|
static JkScope |
SOURCES
This scope is used for publication purpose
|
static JkScope |
TEST
A dependency declared with this scope will be present in testing classpath only.
|
| Constructor and Description |
|---|
JkJavaDepScopes() |
| Modifier and Type | Method and Description |
|---|---|
static JkScope |
of(java.lang.String name) |
public static final JkScope PROVIDED
public static final JkScope COMPILE
COMPILE scope and
transitive dependencies declared with COMPILE scope as well. >
CAUTION : When resolving RUNTIME dependencies, transitive 'runtime' dependencies won't be fetched if
it's coming to a 'compile' one.
In such it differs from Maven 'compile' scope (resolving 'runtime' in Maven will fetch transitive 'runtime' dependencies coming from 'compile' ones).
If you want to have a dependency scope equivalent to Maven 'compile', you need to declare dependencies with
two scopes : COMPILE and RUNTIME or their shorthand COMPILE_AND_RUNTIME.
public static final JkScope RUNTIME
A dependency resolution made with this scope will fetch dependencies declared with COMPILE or RUNTIME
plus their transitive dependencies declared with COMPILE or RUNTIME.
public static final JkScope TEST
public static final JkScope SOURCES
public static final JkScope JAVADOC
public static final JkScope[] COMPILE_AND_RUNTIME
public static final java.lang.String ARCHIVE_MASTER
public static final JkScopeMapping DEFAULT_SCOPE_MAPPING
public static final JkScope[] SCOPES_FOR_COMPILATION
public static final JkScope[] SCOPES_FOR_TEST
public static JkScope of(java.lang.String name)