plexus

解决spring-boot-maven-plugin插件打包,springboot启动时报找不到主main问题

半腔热情 提交于 2021-02-13 08:39:35
一:遇到的问题及解决方法 最近在搭建一个新项目时,使用spring-boot-maven-plugin插件打包,springboot项目在发布后启动时遇到找不到主main问题。 遇到这个问题当时感觉本地直接idea里启动springboot好好的,为什么用自动化发布工具发布后怎么就出现这个问题了呢? 就到线上打好的包解压看MANIFEST.MF文件里的内容如下: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Built-By: spy Created-By: Apache Maven 3.3.9 Build-Jdk: 1.8.0_74 只有一些简单的内容并没有启动类,主类什么的?所以报那个找不到主main就非常明确了。所以就怀疑是不是spring-boot-maven-plugin打包插件里些配置没有指定导致的? 后来通过网上查询与看官网的文档还真是这个原因: 我们这个的原因的是由于在spring-boot-maven-plugin插件里没有指定goal导致的: 出现在问题时的配置是这个样的: <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>

CompilerMojo#execute() caused a linkage error (java.lang.NoSuchMethodError) and may be out-of-date

本秂侑毒 提交于 2021-02-07 05:52:05
问题 I've searched google and reviewed answers on StackOverflow, but cannot seem to resolve this problem. I recently joined this project and added a few things to the POM. Being a relative neophyte with Maven, I am not grasping the issue and the response I have seen have not been clarifying. I suspect it is the addition of Groovy to the project. I want to use Groovy & Spock for testing (and, hopefully, eventually for prod as well). [INFO] Using Groovy-Eclipse compiler to compile both Java and

idea创建web项目报错DefaultVelocityComponent

流过昼夜 提交于 2020-10-02 16:06:20
[WARNING] Error initializing: org.codehaus.plexus.velocity.DefaultVelocityComponent@28348c6 java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils 添加下面内容到文件~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/{version}/maven-archetype-plugin-{version}.pom: <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> 来源: oschina 链接: https://my.oschina.net/u/4343506/blog/4547299

Maven插件系列之spring-boot-maven-plugin

烂漫一生 提交于 2020-08-12 15:50:55
Spring Boot的Maven插件(Spring Boot Maven plugin)能够以Maven的方式为应用提供Spring Boot的支持,即为Spring Boot应用提供了执行Maven操作的可能。 Spring Boot Maven plugin能够将Spring Boot应用打包为可执行的jar或war文件,然后以通常的方式运行Spring Boot应用。 Spring Boot Maven plugin的最新版本为2017.6.8发布的1.5.4.RELEASE,要求Java 8, Maven 3.2及以后。 Spring Boot Maven plugin的5个Goals spring-boot:repackage,默认goal。在mvn package之后,再次打包可执行的jar/war,同时保留mvn package生成的jar/war为.origin spring-boot:run,运行Spring Boot应用 spring-boot:start,在mvn integration-test阶段,进行Spring Boot应用生命周期的管理 spring-boot:stop,在mvn integration-test阶段,进行Spring Boot应用生命周期的管理 spring-boot:build-info

windows下idea执行maven compile中文乱码问题简单分析

一世执手 提交于 2020-04-06 15:01:28
网上有很多说出了解决办法的文章,却没有分析原因,解决方法是idea的settings VM Options中加入-Dfile.encoding=GBK或者GB2312,这样乱码就会是正确的汉字, BUT!!!,为什么呢? 原因分析 - idea与maven怎么交互的 C:\Java\jdk1.8.0_162\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\projects\testweb "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\plugins\maven\lib\maven-event-listener.jar" "

possible bug in Maven + plexus + eclipse compiler on case sensitive packages?

我是研究僧i 提交于 2020-01-16 03:26:09
问题 I encounter a very strange problem with Maven and Eclipse compiler. While in Eclipse+m2eclipse, I have no problem compiling a small project (archetype quick start) with the following single class. package test.test; import com.Ostermiller.util.CSVParser; public class TestCaseSensitive { CSVParser csvParser; } Ostermiller utils is added to pom.xml. Eclipse Kepler compiles the project. Next, mvn compile works out-of-the-box. Now the issue, I switch to compiler 3.1 and asks for Eclipse compiler

Maven / Plexus ComponentLookupException - classpath nightmare?

十年热恋 提交于 2019-12-12 18:23:15
问题 Does anyone know what the following exception means, or how I should begin to debug or investigate it? I find it rather cryptic. I think it means I'm missing a Maven dependency in my pom.xml, but I can't for the life of me work out what. Regards, Caused by: hudson.maven.MavenEmbedderException: java.util.NoSuchElementException role: org.apache.maven.execution.MavenExecutionRequestPopulator roleHint: at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.<init>

How to get the current MavenSession or MavenExecutionRequest from a Plexus Component

佐手、 提交于 2019-12-09 07:23:08
问题 I created a Plexus component to house common logic for several Mojos I want to create. I have been able to pass information like localRepository and project from the Mojo (and test cases). I was wondering if there is a way to get the MavenSession or MavenExecutionRequest from within the component without having to pass them as parameters from a Mojo. I know my component will be running from a Maven Mojo. I'm using Maven 2 in this instance. 回答1: I don't believe there is, nor would I think it's

java多种文件复制方式以及效率比较

会有一股神秘感。 提交于 2019-12-04 04:17:29
1.背景 java复制文件的方式其实有很多种,可以分为 传统的字节流读写复制FileInputStream,FileOutputStream,BufferedInputStream,BufferedOutputStream 传统的字符流读写复制FileReader,FileWriter,BufferWriter,BufferedWriter,BufferedReader NIO系列的FileChannel FileChannel+缓冲 java.nio.Files.copy() 第三方包中的FileUtils.copy方法,比如org.apache.commons.io.FileUtils,org.codehaus.plexus.util.FileUtils等等. 所以呢,看看各种方法效率怎么样,主要衡量的标准就是时间,另外的一些标准包括大文件的复制时的内存溢出等问题. 2.概述 由于很多时候复制文件都包括了文件夹下的所有子目录及文件的复制,所以作者采用的遍历+复制方法去复制文件.就是把整个复制过程分为先遍历,遍历的过程中遇到文件夹就创建,遇到文件就调用不同的复制方法. 遍历的5种方法: (1)File.listFiles() (2)File.list() (3)org.codehaus.plexus.util.FileUtils.getFiles() (4)org.apache

How to get the current MavenSession or MavenExecutionRequest from a Plexus Component

拈花ヽ惹草 提交于 2019-12-03 09:17:18
I created a Plexus component to house common logic for several Mojos I want to create. I have been able to pass information like localRepository and project from the Mojo (and test cases). I was wondering if there is a way to get the MavenSession or MavenExecutionRequest from within the component without having to pass them as parameters from a Mojo. I know my component will be running from a Maven Mojo. I'm using Maven 2 in this instance. I don't believe there is, nor would I think it's a good idea. From my understanding, what you're aiming to achieve is have a commons-like component, that