|
18 | 18 | */ |
19 | 19 | package org.apache.maven.api.services; |
20 | 20 |
|
21 | | -import java.io.IOException; |
22 | | -import java.lang.module.ModuleDescriptor; |
23 | 21 | import java.nio.file.Path; |
24 | 22 | import java.util.List; |
25 | 23 | import java.util.Map; |
26 | | -import java.util.Optional; |
27 | 24 |
|
28 | 25 | import org.apache.maven.api.Dependency; |
29 | | -import org.apache.maven.api.DependencyScope; |
30 | | -import org.apache.maven.api.JavaPathType; |
31 | 26 | import org.apache.maven.api.Node; |
32 | 27 | import org.apache.maven.api.PathType; |
33 | 28 | import org.apache.maven.api.annotations.Experimental; |
@@ -102,45 +97,4 @@ public interface DependencyResolverResult extends Result<DependencyResolverReque |
102 | 97 | */ |
103 | 98 | @Nonnull |
104 | 99 | Map<Dependency, Path> getDependencies(); |
105 | | - |
106 | | - /** |
107 | | - * Returns the Java module name of the dependency at the given path. |
108 | | - * The given dependency should be one of the paths returned by {@link #getDependencies()}. |
109 | | - * The module name is extracted from the {@code module-info.class} file if present, otherwise from |
110 | | - * the {@code "Automatic-Module-Name"} attribute of the {@code META-INF/MANIFEST.MF} file if present. |
111 | | - * |
112 | | - * <p>A typical usage is to invoke this method for all dependencies having a |
113 | | - * {@link DependencyScope#TEST TEST} or {@link DependencyScope#TEST_ONLY TEST_ONLY} |
114 | | - * {@linkplain Dependency#getScope() scope}. An {@code --add-reads} option may need |
115 | | - * to be generated for compiling and running the test classes that use such dependencies.</p> |
116 | | - * |
117 | | - * @param dependency path to the dependency for which to get the module name |
118 | | - * @return module name of the dependency at the given path, or empty if the dependency is not modular |
119 | | - * @throws IOException if the module information of the specified dependency cannot be read |
120 | | - */ |
121 | | - Optional<String> getModuleName(@Nonnull Path dependency) throws IOException; |
122 | | - |
123 | | - /** |
124 | | - * Returns the Java module descriptor of the dependency at the given path. |
125 | | - * The given dependency should be one of the paths returned by {@link #getDependencies()}. |
126 | | - * The module descriptor is extracted from the {@code module-info.class} file if present. |
127 | | - * |
128 | | - * <p>{@link #getModuleName(Path)} is preferred when only the module name is desired, |
129 | | - * because a name may be present even if the descriptor is absent. This method is for |
130 | | - * cases when more information is desired, such as the set of exported packages.</p> |
131 | | - * |
132 | | - * @param dependency path to the dependency for which to get the module name |
133 | | - * @return module name of the dependency at the given path, or empty if the dependency is not modular |
134 | | - * @throws IOException if the module information of the specified dependency cannot be read |
135 | | - */ |
136 | | - Optional<ModuleDescriptor> getModuleDescriptor(@Nonnull Path dependency) throws IOException; |
137 | | - |
138 | | - /** |
139 | | - * If the module path contains at least one filename-based auto-module, prepares a warning message. |
140 | | - * The module path is the collection of dependencies associated with {@link JavaPathType#MODULES}. |
141 | | - * It is caller's responsibility to send the message to a logger. |
142 | | - * |
143 | | - * @return warning message if at least one filename-based auto-module was found |
144 | | - */ |
145 | | - Optional<String> warningForFilenameBasedAutomodules(); |
146 | 100 | } |
0 commit comments