-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
350 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ out/ | |
pom.xml.versionsBackup | ||
**/src/generated/java/META-INF | ||
**.java-version | ||
.rewrite-cache | ||
.rewrite-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
testcode/reposilite-test/reposilite-data/** | ||
!testcode/reposilite-test/reposilite-data/shared.configuration.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
# Artifact Repository Test | ||
|
||
Test that artifacts available in a private artifact repository configured in `~/.m2/settings.xml` and `~/.m2/security-settings.xml` can be accessed. | ||
Test that artifacts available in a private artifact repository configured in `~/.m2/settings.xml` can be accessed. | ||
This is important as many enterprise projects use their private artifact repository to retrieve private dependencies. | ||
|
||
A local and private artifact repository (https://github.com/dzikoysk/reposilite[reposilite]) is started in a docker container. | ||
- A private artifact repository using (https://github.com/dzikoysk/reposilite[reposilite]) is started in a Docker container. | ||
The reposilite instance has a user configured (admin:secret) which can deploy and access artifacts. | ||
A project that uses this dependency is parsed. | ||
After successful dependency resolution the types of this artifact must be available on the AST. | ||
- The repositories in the artifact repository (e.g. snapshot) require successful authentication (deploy + download). | ||
- `dependency-project` has a simple class `DependencyClass` and gets deployed to the artifact repository. | ||
- `dependent-project` depends on `dependency-project` and has a class `DependentClass` that uses `DependencyClass` | ||
- `dependent-project` gets parsed | ||
- The resulting AST has the type information of `dependency-project` resolved when the repository information and credentials were read from `settings.xml` and `security-settings.xml`. | ||
Technical requirements: | ||
|
||
- The port of the Docker container is dynamic and used in settings.xml and pom.xml. | ||
- The local Maven installation of any system should not be affected by this test. | ||
- The location of the Maven dir `.m2` must therefore point to a different location while the test is running. | ||
This requires temporarily a different `.m2` location, here `testcode/reposilite-test/user.home/.m2`. | ||
When deploying the `dependency-project` the path to `settings.xml` is provided, pointing to `testcode/reposilite-test/user.home/.m2/settings.xml`. | ||
This file declares the location of the local Maven repository pointing to the same dir. | ||
Because these paths can't be relative for this test and absolute paths | ||
|
||
|
||
The `user.home` is set to point to `testcode/reposilite-test/user.home` which contains a `.m2` directory providing access configuration to the reposilite instance through `.m2/settings.xml` and `.m2/security-settings.xml`, |
Oops, something went wrong.