Skip to content

Commit 87355bd

Browse files
authored
Add IT for lock-plugin-versions (#196)
1 parent 1e6c8fe commit 87355bd

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2023-2024 Maveniverse Org.
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License v2.0
5+
# which accompanies this distribution, and is available at
6+
# https://www.eclipse.org/legal/epl-v20.html
7+
#
8+
9+
invoker.goals = eu.maveniverse.maven.plugins:toolbox:${project.version}:lock-plugin-versions -DapplyToPom -e
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright (c) 2023-2024 Maveniverse Org.
5+
All rights reserved. This program and the accompanying materials
6+
are made available under the terms of the Eclipse Public License v2.0
7+
which accompanies this distribution, and is available at
8+
https://www.eclipse.org/legal/epl-v20.html
9+
10+
-->
11+
<project xmlns="http://maven.apache.org/POM/4.0.0">
12+
<modelVersion>4.0.0</modelVersion>
13+
<groupId>org.maveniverse.maven.toolbox.it</groupId>
14+
<artifactId>set-version</artifactId>
15+
<version>1.0.0</version>
16+
<properties>
17+
<data><![CDATA[some data]]></data>
18+
<first.version>1.0</first.version>
19+
<third.version>1.0</third.version>
20+
</properties>
21+
22+
<build>
23+
<pluginManagement>
24+
<plugins>
25+
<plugin>
26+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
27+
<artifactId>second</artifactId>
28+
<version>1.0</version>
29+
</plugin>
30+
<plugin>
31+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
32+
<artifactId>third</artifactId>
33+
<version>${third.version}</version>
34+
</plugin>
35+
</plugins>
36+
</pluginManagement>
37+
<plugins>
38+
<!-- not managed; version set directly as property -->
39+
<plugin>
40+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
41+
<artifactId>first</artifactId>
42+
<version>${first.version}</version>
43+
</plugin>
44+
<!-- managed; version set directly on managed -->
45+
<plugin>
46+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
47+
<artifactId>second</artifactId>
48+
</plugin>
49+
<!-- managed; property as version on managed -->
50+
<plugin>
51+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
52+
<artifactId>third</artifactId>
53+
</plugin>
54+
<!-- not managed; version set directly -->
55+
<plugin>
56+
<groupId>org.maveniverse.maven.toolbox.it.versions</groupId>
57+
<artifactId>fourth</artifactId>
58+
<version>1.0</version>
59+
</plugin>
60+
</plugins>
61+
</build>
62+
<repositories>
63+
<repository>
64+
<id>my-repo</id>
65+
<url>file:${basedir}/my-repo</url>
66+
<releases>
67+
<checksumPolicy>warn</checksumPolicy>
68+
<enabled>true</enabled>
69+
</releases>
70+
<snapshots>
71+
<enabled>false</enabled>
72+
</snapshots>
73+
</repository>
74+
</repositories>
75+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2023-2024 Maveniverse Org.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v2.0
5+
* which accompanies this distribution, and is available at
6+
* https://www.eclipse.org/legal/epl-v20.html
7+
*/
8+
String buildLog = new File(basedir, 'build.log').text
9+
assert !buildLog.contains('ERROR')
10+
11+
String pom = new File(basedir, 'pom.xml').text
12+
13+
// partial assert: original does not have it, but locked one should list it
14+
assert pom.contains('maven-deploy-plugin')

0 commit comments

Comments
 (0)