Failed to read artifact descriptor for io.springfox:springfox-swagger2:jar:${swagger.version}
时间: 2024-02-03 16:38:51 浏览: 123
This error occurs when Maven is unable to read the artifact descriptor for the specified dependency. The ${swagger.version} variable seems to be undefined or not properly set in the Maven POM file.
To fix this issue, you need to make sure that the variable is defined and has a valid value in your POM file. You can define it in the properties section of your POM file as follows:
```
<properties>
<swagger.version>2.9.2</swagger.version>
</properties>
```
Alternatively, you can replace the ${swagger.version} variable with the actual version number in the dependency declaration as follows:
```
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
```
After making these changes, run the Maven build again and the error should be resolved.
阅读全文