public interface ArtifactLookup
Modifier and Type | Field and Description |
---|---|
static AtomicReference<ArtifactLookup> |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
List<JavaArchive> |
allArtifacts()
Retrieve all dependency artifacts for the user's project.
|
List<JavaArchive> |
allArtifacts(String... groupIdExclusions) |
JavaArchive |
artifact(String gav)
Retrieve an artifact that was part of the original build using a
full or simplified Maven GAV specifier.
|
JavaArchive |
artifact(String gav,
String asName)
Retrieve an artifact that was part of the original build using a
full or simplified Maven GAV specifier, returning an archive with a
specified name.
|
static ArtifactLookup |
get() |
static final AtomicReference<ArtifactLookup> INSTANCE
static ArtifactLookup get()
JavaArchive artifact(String gav) throws Exception
The following formats of GAVs are supported:
Only artifacts that were compiled with the user's project with
a scope of compile
are available through lookup.
In the variants that include a version
parameter, it may be
replaced by a literal asterisk in order to avoid hard-coding versions
into the application.
gav
- The Maven GAV.JavaArchive
.Exception
- if an error occurs locating or loading the artifact.JavaArchive artifact(String gav, String asName) throws Exception
gav
- The Maven GAV.JavaArchive
with the specified name.Exception
- if an error occurs locating or loading the artifact.artifact(String)
List<JavaArchive> allArtifacts() throws Exception
JavaArchive
objects.Exception
- if an error occurs locating or loading any artifact.Copyright © 2018 JBoss by Red Hat. All rights reserved.