Я перевожу приложение весенней загрузки с maven на bazel.Я перечислил все зависимости из моего pom.xml в WORKSPACE как maven_jar () s.Я получаю сообщение об ошибке, в котором говорится, что пакет org.springframework.boot.web.support не существует.Он принадлежит к банке org.springframework.boot, которую я уже включил.Что я могу сделать, чтобы это исправить?
Мой pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.abc</groupId>
<artifactId>abcclient</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>abcclient</name>
<description>ABC Client</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>ROOT</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
И мой рабочий стол WORKSPACE
maven_jar(
name = "org_springframework_boot_spring_boot",
artifact = "org.springframework.boot:spring-boot:jar:1.2.3.RELEASE"
)
maven_jar(
name = "org_springframework_boot_spring_boot_autoconfigure",
artifact = "org.springframework.boot:spring-boot-autoconfigure:jar:2.0.6.RELEASE"
)
maven_jar(
name = "org_springframework_spring_context",
artifact = "org.springframework:spring-context:jar:5.1.1.RELEASE"
)
maven_jar(
name = "org_springframework_boot_spring_boot_starter_aop",
artifact = "org.springframework.boot:spring-boot-starter-aop:jar:2.0.6.RELEASE"
)
maven_jar(
name = "org_springframework_boot_spring_boot_starter_web",
artifact = "org.springframework.boot:spring-boot-starter-web:jar:2.0.6.RELEASE"
)
maven_jar(
name = "org_springframework_boot_spring_boot_starter_test",
artifact = "org.springframework.boot:spring-boot-starter-test:jar:2.0.6.RELEASE"
)
maven_jar(
name = "org_apache_tomcat_embed_tomcat_embed_jasper",
artifact = "org.apache.tomcat.embed:tomcat-embed-jasper:jar:9.0.12"
)
maven_jar(
name = "javax_servlet_jstl",
artifact = "javax.servlet:jstl:jar:1.2"
)
И, наконец, мой файл BUILD
java_binary(
name = "ABCClient",
srcs = glob(["src/main/java/com/example/abc/*.java"]),
deps = [
"@org_springframework_boot_spring_boot//jar",
"@org_springframework_boot_spring_boot_autoconfigure//jar",
"@org_springframework_spring_context//jar",
"@org_springframework_boot_spring_boot_starter_aop//jar",
"@org_springframework_boot_spring_boot_starter_web//jar",
"@org_apache_tomcat_embed_tomcat_embed_jasper//jar",
"@javax_servlet_jstl//jar"
]
)