写了一个spring-mvc的项目,用netty启动。所以要打成一个可执行的jar包
pom.xml如下
<build>
<finalName>platform_netty</finalName> <plugins> <!--指定maven编译版本--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.6</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>com.xx.action.NettyServer</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build>
然后使用mvn package打包一直报
环境配置如下:
java_home:
path:
jdk目录下有tools.jar:
cmd的jdk检查
所以想问,为啥maven无法package
付费偷看金额在0.1-10元之间
一周热门 更多>