NutzCN Logo
问答 mvn run:jetty报错啦
发布于 3357天前 作者 明天会吹什么风 2207 次浏览 复制 上一个帖子 下一个帖子
标签: maven jetty

异常:
https://nutz.cn/s/c/2A

pom.xml配置

	<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<encoding>utf-8</encoding>
		</configuration>
</plugin>

			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<warSourceDirectory>src/main/webapp</warSourceDirectory>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<warName>${project.artifactId}</warName>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>9.3.4.v20151007</version>
				<configuration>
					<!-- 每2秒的间隔扫描一次,实现热部署 -->
					<scanIntervalSeconds>2</scanIntervalSeconds>
					<httpConnector>
						<port>3000</port>
					</httpConnector>
					<webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>
					<war>${project.build.directory}/${project.artifactId}.war</war>
					<webApp>
						<contextPath>/</contextPath>
					</webApp>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
			</plugin>
3 回复
Unsupported major.minor version 52.0

换JDK8

换jdk太麻烦了,我jetty插件换成了8.x版本也不行,然后stackflow找到了合适的版本9.2.6.v20141205

添加回复
请先登陆
回到顶部