`
公园美丽
  • 浏览: 11577 次
社区版块
存档分类
最新评论

repackage failed: Unable to find main class

阅读更多

一.错误信息

SpringBoot进行Maven install操作时报repackage failed: Unable to find main class -> [Help 1]的错误,信息如下

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.4.RELEASE:repackage (default) on project qfxSpringbootReadPropertiesDemo: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.0.4.RELEASE:repackage failed: Unable to find main class -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

二.错误原因

因为没有正式环境的入口类,项目结构如下:

repackage failed: Unable to find main class

pom.xml文件的<build>配置信息如下:

repackage failed: Unable to find main class

 

三.解决方案1

pom.xml文件的<build>中指定入口类,代码如下

<configuration>

        <mainClass>com.qfx.App</mainClass>

</configuration>

如图

repackage failed: Unable to find main class

四.解决方案2

去掉<build>配置信息中spring热部署的配置,如图

repackage failed: Unable to find main class

 

五.解决方案3

修改pom.xml配置文件<build>内容如下,添加一个<pluginManagement>标签,代码如下

    <build>

        <finalName>test</finalName>

        <pluginManagement>

            <plugins>

                <plugin>

                    <groupId>org.springframework.boot</groupId>

                    <artifactId>spring-boot-maven-plugin</artifactId>

                    <dependencies>

                        <!-- spring热部署 -->

                        <dependency>

                            <groupId>org.springframework</groupId>

                            <artifactId>springloaded</artifactId>

                            <version>1.2.8.RELEASE</version>

                        </dependency>

                    </dependencies>

                </plugin>

            </plugins>

        </pluginManagement>

    </build>

 

六.再次执行 Maven install,一切正常(企业架构源码可以加求球:三五三六二四七二五九)

分享到:
评论

相关推荐

    前端开源库-repackage

    前端开源库-repackage重新打包,从其组件部分构建package.json文件。修复环境变量使用,使脚本与Windows和OSX兼容。

    cmexprt

    CMEXPRT订购Web服务 先决条件 Java 8 Maven的3.6.x ...mvn clean package spring-boot:repackage docker:build API文档 在项目运行期间,可以在http://host:port/api/v1/swagger-ui/上找到Web API文档。

    FOX LOGO 富士康主板LOGO更改

    上次的是945以下的板子,这个是支持H61之类,看下面支持的类型。 5. Supported OS and ... - Package: repackage. 2011/5/13 - 2.0.0.0 - FoxLogo.exe: Updated from 1.0.0.7 to 1.0.0.8, added support for Z68A02.

    命令行工具Opc-diag.zip

    diff a part between two Office DocumentsUse Case 4: extract a package to a directoryUse Case 5: repackage a package directory into a fileUse Case 6: substitute a part from one package into another ...

    EnvironmentSwitcher::fire:No repackage, switch environment with one click.(无需重新打包,一键切换环境 )

    环境切换器 Environment Switcher是在Android开发和测试过程中使用Java批注,APT,Reflection和Proguard原理在单击过程中切换环境的工具。 特征 易于配置 安全,不会泄漏测试环境的URL 一键切换环境,无需重新包装 ...

    piriform碎片整理大师

    - You may NOT repackage, translate, adapt, vary, modify, alter, create derivative works based upon, or integrate any other computer programs with, the Product in whole or in part. - You may NOT use ...

    spring-boot-reference.pdf

    14.2. Locating the Main Application Class 15. Configuration Classes 15.1. Importing Additional Configuration Classes 15.2. Importing XML Configuration 16. Auto-configuration 16.1. Gradually Replacing ...

    无人永生源代码 v1.003

    (c) Using the Editor and/or Source Code, you may create modifications or enhancements to the Software, including the construction of new levels (collectively referred to as "Variations"), subject to ...

    RepackageDetection:一种检测Android应用程序是否被重新打包的脚本,基于论文“Exploring reverse engineering patterns in Android apps”提出的方法

    重新包装检测 一种检测Android应用程序是否重新打包的脚本,该脚本基于“”一文中提出的方法。 似乎字符串偏移功能不适用于由lateset Apktool(2.0.0)重新打包的... ##用法 python repackage_detection.py -f &lt;apk&gt;

    FinePlaceBot

    tourist_guide.sql创建数据库构建应用程序: mvn package spring-boot:repackage 运行应用程序: java -jar target/tourist-guide-by-cities-bot-1.0-SNAPSHOT.jar 电报漫游器名称: FinePlaceBot 电报漫游器令牌:...

    axx2oauth:OAuth2服务器实现了资源所有者密码凭证流,包括细粒度权限控制和DSA令牌验证

    下载后,您可以通过以下命令行在axx2oauth根文件夹中构建应用程序: mvn clean install spring-boot:repackage spring-boot:run 已经包含一些主数据,以立即开始与服务器一起使用。 配置 定义了三个角色: 管理员...

    desafio-south-system

    请求的邮递员json位于Challenge-south-system \ src \ main \ resources \ docs目录中,只需将文件导入邮递员即可。 只需通过链接克隆项目 并在mvn软件包spring-boot的主项目目录中运行命令:repackage 然后在\ ...

    WYSIWYG Web Builder v12.4.0

    WYSIWYG Web Builder v12.4.0注册版,比较好用,适合web开发的同学。

    spring-boot-booking-hotels

    mvn package spring-boot:repackage java -jar target/hotel-booking-1.0-SNAPSHOT.jar 本地主机:8080 应用程序接口 获取所有酒店 获取/酒店/ 响应 {"hotels":[{"id":1,"name":"Hotel Lozano"},{"id":2,"name":...

    VaderlabDB:实验解决方案

    Vaderlab数据库 实验解决方案 mvn clean package spring-boot:repackage

    毫升练习

    机器学习实践建筑宽-&gt;窄-&gt;宽楷模类RNN停止传播隐藏层hidden = repackage_hidden ( hidden ) 每批之后避免梯度爆炸loss . backward ()nn . utils . clip_grad_norm_ ( model . parameters (), max_norm = 2.0 , norm_...

    ios_debugger_challenge:一个用于运行时iOS应用程序检查的游乐场

    无需repackage iOS应用。 不需要Jailbroken设备。 设置Frida-Gadget 从https://github.com/frida/frida/releases获取iOS的Frida-Gadget 将文件复制到新文件夹: cp frida-gadget.dylib ~/.cache/frida/gadget-...

    702Project:COMPSCI 702 项目 - 团队 4

    git clone https://github.com/matthewAURA/702Project2. cd repackager3. make4. ./repackage.sh &lt;your&gt;The apk must be in the repackager directory这将更改您的 APK 的签名并将我们的资源访问日志代码注入应用...

    TestDataImpexGenerator

    停留在项目根文件夹中,执行“ mvn clean package spring-boot:repackage” 使用“ java -jar target / SpringBootForm-1.0.jar”运行应用程序 访问“ localhost:8080”以使用应用程序 生成的impex将出现在“ src...

    matlab求矩阵的行列式的代码-nmatrix:通过SciRuby的Ruby的稀疏线性代数库

    matlab求矩阵的行列式的代码 矩阵 用于Ruby的快速数值线性代数库 描述 NMatrix是用于Ruby的快速数值线性代数库,具有密集和稀疏的矩阵,主要用C和C ++编写。...repackage gem install pkg/nmatrix-0.1.0.r

Global site tag (gtag.js) - Google Analytics