-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for dependency property goal and property list goal
add output file parameter to property list goal make dependency properties goal also create properties for transitive dependencies
- Loading branch information
1 parent
743684a
commit afd398c
Showing
4 changed files
with
211 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>de.eitco.build.essentials.test</groupId> | ||
<artifactId>cmn-build-essentials-test</artifactId> | ||
<version>@project.version@</version> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson</groupId> | ||
<artifactId>jackson-bom</artifactId> | ||
<version>2.17.1</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
<version>3.2.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-guava</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>build-utilities-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<configuration> | ||
<outputFile>target/properties.txt</outputFile> | ||
<addFiles>true</addFiles> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>dependencies-version-properties</goal> | ||
<goal>list-properties</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
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,16 @@ | ||
import java.nio.charset.StandardCharsets | ||
import java.nio.file.Files | ||
|
||
|
||
|
||
File propertyInfo = new File(new File("$basedir"), 'target/properties.txt') | ||
|
||
assert propertyInfo.isFile() | ||
|
||
String fileContent = new String(Files.readAllBytes(propertyInfo.toPath()), StandardCharsets.UTF_8) | ||
|
||
assert fileContent.contains('maven.dependency.org.springframework.boot:spring-boot-starter:jar.version = 3.2.5') | ||
assert fileContent.contains('maven.dependency.com.fasterxml.jackson.core:jackson-annotations:jar.version = 2.17.1') | ||
assert fileContent.contains('maven.dependency.com.google.guava:guava:jar.version = 25.1-jre') | ||
assert fileContent.contains('maven.dependency.org.springframework:spring-core:jar.version = 6.1.6') | ||
|
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