@Component(role=LocalMavenRepositoryTool.class) public class LocalMavenRepositoryTool extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private FileLockService |
fileLockService |
private java.io.File |
localRepo |
| Constructor and Description |
|---|
LocalMavenRepositoryTool()
Creates a default instance of the
LocalRepositoryUtils, using the local Maven
repository location obtained from EnvironmentUtil. |
| Modifier and Type | Method and Description |
|---|---|
private void |
filterLinesFromIndex(java.io.File indexFile,
java.util.Set<java.lang.String> toBeRemoved) |
java.io.File |
getArtifactFile(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String classifier,
java.lang.String extension) |
private java.io.File |
getArtifactIndexFile() |
java.util.Set<java.lang.String> |
getArtifactIndexLines() |
private java.util.Set<java.lang.String> |
readLines(java.io.File indexFile) |
void |
removeLinesFromArtifactsIndex(java.lang.String... linesToBeRemoved) |
void |
removeLinesFromMetadataIndex(java.lang.String... linesToBeRemoved)
Hides specified artifacts built and installed by Tycho from future Tycho builds by removing
the corresponding lines with GAV coordinates format "g:a:v" from the local metadata index
file.
|
private void |
writeLines(java.io.File indexFile,
java.util.Collection<java.lang.String> lines) |
private java.io.File localRepo
@Requirement private FileLockService fileLockService
public LocalMavenRepositoryTool()
LocalRepositoryUtils, using the local Maven
repository location obtained from EnvironmentUtil.public java.io.File getArtifactFile(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String classifier,
java.lang.String extension)
public java.util.Set<java.lang.String> getArtifactIndexLines()
throws java.io.IOException
java.io.IOExceptionpublic void removeLinesFromArtifactsIndex(java.lang.String... linesToBeRemoved)
throws java.io.IOException
java.io.IOExceptionpublic void removeLinesFromMetadataIndex(java.lang.String... linesToBeRemoved)
throws java.io.IOException
Background: Artifacts built and installed by Tycho are visible to all other Tycho builds in order to allow re-builds of individual modules. This method allows to prevent this for future builds. TODO should rather reuse FileBasedTychoRepositoryIndex here
java.io.IOException - if index file could not be savedprivate void filterLinesFromIndex(java.io.File indexFile,
java.util.Set<java.lang.String> toBeRemoved)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException,
java.io.IOException
java.io.UnsupportedEncodingExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionprivate java.io.File getArtifactIndexFile()
private java.util.Set<java.lang.String> readLines(java.io.File indexFile)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException,
java.io.IOException
java.io.UnsupportedEncodingExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionprivate void writeLines(java.io.File indexFile,
java.util.Collection<java.lang.String> lines)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException,
java.io.IOException
java.io.UnsupportedEncodingExceptionjava.io.FileNotFoundExceptionjava.io.IOException