Execution default of goal
org.springframework.boot:spring-boot-maven-plugin:1.0.1.RELEASE:repackage
failed:
Unable to find a single main class from the following candidates
Run Code Online (Sandbox Code Playgroud)
我的项目有多个带有main方法的类.我如何告诉Spring Boot Maven插件它应该用作哪个类作为主类?
我正在使用Java Maven程序而且我不知道要输入什么<mainClass>.我已经根据众多 stackoverflow问题尝试了各种各样的东西,但他们没有解决错误.
每次说:
Maven Error: Could not find or load main class ...
Run Code Online (Sandbox Code Playgroud)
我在里面写了这个pom.xml(减去???)
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass> ??? </mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
Run Code Online (Sandbox Code Playgroud)
我该如何解决这些错误?