简介:idea中maven打包工具类 repackage failed: Unable to find main class 今天遇到一个着实让人蛋疼的问题,repackage failed: Unable to find main class 查看次维护项目是一个多模块依赖的项目,通用工具类打包的时候上面的错误,耽误了我十几分钟,后来忽然想到,工具包打包的时候不应该有maven的依赖,去掉pom文件中的...
在项目视图中查找你的主类文件,并确保其位于正确的包内。 刷新项目:在IDEA中,有时候缓存可能会导致此类问题。你可以尝试点击File > Invalidate Caches / Restart...,然后选择Invalidate and Restart来清除缓存并重启IDEA。 检查构建工具:如果你使用的是Maven或Gradle作为构建工具,确保你的pom.xml或build.gradle文件中...
进入生成的jar目录中...maven通过命令行为SpringBoot项目打包一、maven通过命令行打jar包 进入项目目录,执行如下命令: 发现报如下错误: [ERROR]Failedtoexecute goal mvn install 报错Unable to find main class :spring-boot-maven-plugin:2.2.6.RELEASE:repackagefailed:Unabletofindmainclass简单install一个自定义的工...
若代码中有package com.foo.bar;,则类文件必须位于项目目录下com/foo/bar文件夹层级结构中。可借助 IDEA 的“Project” 视图,清晰查看文件目录结构,确保包路径一致性。 检查主类声明,保证public static void main(String[] args)方法完整无误,修饰符、方法名、参数列表都不能错。若不确定主类,可在项目中搜索包...
[ERROR] Failed to execute goal on project commonWeb: Could not resolve dependenciesforproject commonWeb:maven-plugin:1.0-SNAPSHOT: Could not find artifact commonBase:jar:1.0-SNAPSHOT -> [Help1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch...
1. idea 的 maven 配置 作为一个 maven 工程,它的 src 目录和 pom.xml 是必备的。 进入src 目录后,我们发现它里面的目录结构如下: src/main/java —— 存放项目的.java 文件 src/main/resources —— 存放项目资源文件,如 spring, hibernate 配置文件 ...
方式一:网络最常见的打包方式。比较适用于普通项目打JAR包。方式二:比较适用于MAVEN项目打JAR包。方式三:maven界面。 方式一:网络最常见的打包方式。比较适用于普通项目打JAR包。选中菜单栏中File–>Project Structure (文件–>项目结构;快捷键ctrl+shift+alt+s) ,然后选择artifacts,点击上面的加号,新建JAR包,选择如...
extended support for kotlin features, updates to find in files, option to disable pre-commit checks, and more the intellij idea 2024.3 eap 5 is here!you can now download this version from our website, update directly from within the ide, use the free toolbox app, or install it via snap...
默认情况下,Scala Maven插件创建的Jar文件不包含清单(manifest)中的Main-Class属性。为了在清单中添加自...
解决方法:进入本地仓库删除该包,然后再执行打包或部署等操作即可。 Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:2.2.1 插件:spring-boot-maven-plugin不能引入 代码语言:javascript 复制 <plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</arti...