1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.lifecycle.providers;
20
21 import java.io.IOException;
22 import java.io.InputStream;
23 import java.io.UncheckedIOException;
24 import java.util.Properties;
25
26 import static java.util.Objects.requireNonNull;
27
28
29
30
31
32
33 public final class PluginVersions {
34 private PluginVersions() {}
35
36
37 public static final String RESOURCES_PLUGIN_VERSION;
38 public static final String COMPILER_PLUGIN_VERSION;
39 public static final String SUREFIRE_PLUGIN_VERSION;
40 public static final String INSTALL_PLUGIN_VERSION;
41 public static final String DEPLOY_PLUGIN_VERSION;
42
43 public static final String JAR_PLUGIN_VERSION;
44 public static final String EAR_PLUGIN_VERSION;
45 public static final String EJB_PLUGIN_VERSION;
46 public static final String PLUGIN_PLUGIN_VERSION;
47 public static final String RAR_PLUGIN_VERSION;
48 public static final String WAR_PLUGIN_VERSION;
49
50 public static final String CLEAN_PLUGIN_VERSION;
51 public static final String SITE_PLUGIN_VERSION;
52
53 static {
54 Properties properties = new Properties();
55 try {
56 try (InputStream inputStream = PluginVersions.class
57 .getClassLoader()
58 .getResourceAsStream("org/apache/maven/lifecycle/providers/plugin-versions.properties")) {
59 if (inputStream != null) {
60 properties.load(inputStream);
61 }
62 }
63 RESOURCES_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-resources-plugin"));
64 COMPILER_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-compiler-plugin"));
65 SUREFIRE_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-surefire-plugin"));
66 INSTALL_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-install-plugin"));
67 DEPLOY_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-deploy-plugin"));
68 JAR_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-jar-plugin"));
69 EAR_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-ear-plugin"));
70 EJB_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-ejb-plugin"));
71 PLUGIN_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-plugin-plugin"));
72 RAR_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-rar-plugin"));
73 WAR_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-war-plugin"));
74 CLEAN_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-clean-plugin"));
75 SITE_PLUGIN_VERSION = requireNonNull(properties.getProperty("maven-site-plugin"));
76 } catch (IOException e) {
77 throw new UncheckedIOException("Failed to load plugin versions", e);
78 }
79 }
80 }