-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#131: Fixed dependency crawling for artifact that are not on maven ce…
- Loading branch information
1 parent
096b73e
commit 5734827
Showing
29 changed files
with
194 additions
and
156 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Project keeper maven plugin 0.7.2, released 2021-06-09 | ||
|
||
Code name: Bug Fix: Dependency crawling for non maven central dependencies | ||
|
||
## Bug Fixes | ||
|
||
* #131: Fixed dependency crawling for artifact that are not on maven central | ||
|
||
## Dependency Updates | ||
|
||
### Compile Dependency Updates | ||
|
||
* Updated `io.github.classgraph:classgraph:4.8.102` to `4.8.108` | ||
* Updated `org.apache.maven:maven-core:3.6.3` to `3.8.1` | ||
* Updated `org.apache.maven:maven-plugin-api:3.6.3` to `3.8.1` | ||
* Updated `org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r` to `5.11.1.202105131744-r` | ||
* Updated `org.glassfish.jaxb:jaxb-runtime:3.0.0` to `3.0.1` | ||
|
||
### Test Dependency Updates | ||
|
||
* Updated `org.junit.jupiter:junit-jupiter-engine:5.7.1` to `5.7.2` | ||
* Updated `org.junit.jupiter:junit-jupiter-params:5.7.1` to `5.7.2` | ||
* Updated `org.mockito:mockito-core:3.8.0` to `3.11.0` | ||
|
||
### Plugin Dependency Updates | ||
|
||
* Updated `com.exasol:error-code-crawler-maven-plugin:0.1.1` to `0.4.0` | ||
* Updated `com.exasol:project-keeper-maven-plugin:0.7.1` to `0.7.2` |
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,4 @@ | ||
error-tags: | ||
PK: | ||
packages: | ||
- com.exasol.projectkeeper |
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
39 changes: 0 additions & 39 deletions
39
src/main/java/com/exasol/projectkeeper/pom/DefaultMavenArtifactModelReader.java
This file was deleted.
Oops, something went wrong.
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
22 changes: 0 additions & 22 deletions
22
src/main/java/com/exasol/projectkeeper/pom/MavenArtifactModelReader.java
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
src/main/java/com/exasol/projectkeeper/pom/MavenModelFromRepositoryReader.java
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,53 @@ | ||
package com.exasol.projectkeeper.pom; | ||
|
||
import java.util.List; | ||
|
||
import org.apache.maven.artifact.Artifact; | ||
import org.apache.maven.artifact.repository.ArtifactRepository; | ||
import org.apache.maven.execution.MavenSession; | ||
import org.apache.maven.model.Model; | ||
import org.apache.maven.project.*; | ||
import org.apache.maven.repository.RepositorySystem; | ||
|
||
/** | ||
* Read a maven {@link Model} from an artifact of the maven repository using the {@link ProjectBuilder} that is injected | ||
* by Maven core to Mojo. | ||
*/ | ||
public class MavenModelFromRepositoryReader { | ||
private final ProjectBuilder mavenProjectBuilder; | ||
private final MavenSession session; | ||
private final RepositorySystem repositorySystem; | ||
|
||
/** | ||
* Create a new instance of {@link MavenModelFromRepositoryReader}. | ||
* | ||
* @param mavenProjectBuilder maven project builder | ||
* @param session maven session | ||
* @param repositorySystem maven repository system | ||
*/ | ||
public MavenModelFromRepositoryReader(final ProjectBuilder mavenProjectBuilder, final MavenSession session, | ||
final RepositorySystem repositorySystem) { | ||
this.mavenProjectBuilder = mavenProjectBuilder; | ||
this.session = session; | ||
this.repositorySystem = repositorySystem; | ||
} | ||
|
||
/** | ||
* Read the {@link Model} of an artifact of the maven repository. | ||
* | ||
* @param artifactId maven artifact id | ||
* @param groupId maven groupId | ||
* @param version version | ||
* @param remoteRepositories list of remote repositories | ||
* @return read maven model | ||
* @throws ProjectBuildingException if reading fails | ||
*/ | ||
public Model readModel(final String artifactId, final String groupId, final String version, | ||
final List<ArtifactRepository> remoteRepositories) throws ProjectBuildingException { | ||
final Artifact artifactDescription = this.repositorySystem.createProjectArtifact(groupId, artifactId, version); | ||
final ProjectBuildingRequest projectBuildingRequest = this.session.getProjectBuildingRequest(); | ||
projectBuildingRequest.setRemoteRepositories(remoteRepositories); | ||
final ProjectBuildingResult build = this.mavenProjectBuilder.build(artifactDescription, projectBuildingRequest); | ||
return build.getProject().getModel(); | ||
} | ||
} |
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
Oops, something went wrong.