Skip to content

Commit

Permalink
Merge pull request #369 from flowlogix/update-to-maven-4-rc1-1
Browse files Browse the repository at this point in the history
[SHRINKRES-354] update to keep track of changes in maven 4-rc-1
  • Loading branch information
petrberan authored Dec 12, 2024
2 parents 50fda79 + 85d6e39 commit 440000e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ ShrinkWrap Resolvers allows you to override any programmatic configuration via S
- `maven.legacyLocalRepo`: Flag whether to ignore origin tracking for artifacts present in local repository.
- `org.jboss.shrinkwrap.resolver.maven.skipCompilation`: Flag to skip compilation of resolved artifacts (true/false) - default is false.
- `org.jboss.shrinkwrap.resolver.maven.disableProjectLocal`: Flag to disable Maven 4 project-local repository (true/false) - default is false.
- `org.jboss.shrinkwrap.resolver.maven.ignoreDecryptionProblems`: Flag to ignore decryption problems in settings-security*.xml files (true/false) - default is false.


## Embedded Maven
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,12 @@ private void processAdditionalDependencies(Path projectLocalRepository, String g
String artifactId, String version,
Set<MavenDependency> additionalDependencies) {
Path directory = projectLocalRepository.resolve(groupId).resolve(artifactId).resolve(version);
File consumerPom = directory.resolve(toVersionedArtifact(artifactId, version) + "-consumer.pom").toFile();
if (consumerPom.exists()) {
Set<MavenDependency> transitiveDependencies = loadPomFromFile(consumerPom).getParsedPomFile().getDependencies();
File pom = directory.resolve(toVersionedArtifact(artifactId, version) + "-consumer.pom").toFile();
if (!pom.exists()) {
pom = directory.resolve(toVersionedArtifact(artifactId, version) + ".pom").toFile();
}
if (pom.exists()) {
Set<MavenDependency> transitiveDependencies = loadPomFromFile(pom).getParsedPomFile().getDependencies();
transitiveDependencies.removeAll(additionalDependencies);
if (!transitiveDependencies.isEmpty()) {
additionalDependencies.addAll(transitiveDependencies);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ private Settings decryptPasswords(Settings settings) {
SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest(settings);
SettingsDecryptionResult result = decrypter.decrypt(request);

if (!result.getProblems().isEmpty()) {
if (!result.getProblems().isEmpty()
&& !Boolean.getBoolean("org.jboss.shrinkwrap.resolver.maven.ignoreDecryptionProblems")) {
StringBuilder sb = new StringBuilder("Found ").append(result.getProblems().size())
.append(" problems while trying to decrypt settings configuration.");

Expand Down

0 comments on commit 440000e

Please sign in to comment.