Skip to content

Commit

Permalink
test: add conflicting properties
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Jan 31, 2024
1 parent b8d492f commit 7d768df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions pkg/java/pom/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,10 @@ func TestPom_Parse(t *testing.T) {
License: "Apache 2.0",
},
{
ID: "org.example:example-api:1.1.1",
ID: "org.example:example-api:1.7.30",
Name: "org.example:example-api",
Version: "1.1.1",
Version: "1.7.30",
License: "The Apache Software License, Version 2.0",
Locations: types.Locations{
{
StartLine: 34,
Expand All @@ -685,7 +686,7 @@ func TestPom_Parse(t *testing.T) {
{
ID: "com.example:import:2.0.0",
DependsOn: []string{
"org.example:example-api:1.1.1",
"org.example:example-api:1.7.30",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
<name>Example API Dependency Management</name>
<description>The example API</description>

<properties>
<project.managed.version>1.1.1</project.managed.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.example</groupId>
<artifactId>example-dependency-management2</artifactId>
<version>1.1.1</version>
<version>${project.managed.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
<name>Example API Dependency Management</name>
<description>The example API</description>

<properties>
<project.managed.version>1.7.30</project.managed.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.example</groupId>
<artifactId>example-api</artifactId>
<version>1.1.1</version>
<version>${project.managed.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down

0 comments on commit 7d768df

Please sign in to comment.