首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Could not find artifact org.apache.tomcat.maven:tomcat7-maven-plugin:pom.....

Could not find artifact org.apache.tomcat.maven:tomcat7-maven-plugin:pom.....

作者头像
呱
发布于 2020-10-23 10:29:27
发布于 2020-10-23 10:29:27
2.9K0
举报
文章被收录于专栏:后端JavaEE后端JavaEE

报错:

代码语言:javascript
复制
<plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <configuration>
            <!-- 热部署 -->
            <contextReloadable>true</contextReloadable>
            <port>8080</port> <!-- 端口号 -->
            <path>/</path> <!-- 发布的项目路径 -->
          </configuration>
        </plugin>

这个错误一开始我以为是settings.xml文件哪里错了,然后改了好几次,换了好多别人的配置文件都不行

最后还是不头铁,这样写了

代码语言:javascript
复制
<build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <path>/shiro</path>
                    <port>8080</port>
                    <uriEncoding>UTF-8</uriEncoding>
                    <url>http://localhost:8080/shiro</url>
                    <server>Tomcat7</server>
                </configuration>
            </plugin>

            <!-- 编译插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

然后可以运行了

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/04/30 ,如有侵权请联系 cloudcommunity@tencent.com 删除
目录
  • 报错:
    • 这个错误一开始我以为是settings.xml文件哪里错了,然后改了好几次,换了好多别人的配置文件都不行
    • 最后还是不头铁,这样写了
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档