mav用命令打war包出现缺少lang包怎么回事呀,在线等
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mav用命令打war包出现缺少lang包怎么回事呀,在线等相关的知识,希望对你有一定的参考价值。
致命错误: 在类路径或引导类路径中找不到程序包 java.lang
INFO] -------------------------------------------------------------
ERROR] COMPILATION ERROR :
INFO] -------------------------------------------------------------
ERROR] An unknown compilation problem occurred
INFO] 1 error
INFO] -------------------------------------------------------------
INFO] ------------------------------------------------------------------------
INFO] BUILD FAILURE
INFO] ------------------------------------------------------------------------
INFO] Total time: 5.921s
INFO] Finished at: Wed Dec 03 09:41:42 CST 2014
INFO] Final Memory: 22M/56M
INFO] ------------------------------------------------------------------------
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
:compile (default-compile) on project cmcp: Compilation failure
ERROR] An unknown compilation problem occurred
ERROR] -> [Help 1]
ERROR]
ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
h.
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 rea
the following articles:
ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
ption
:\fjc_wx>^A^A
:\fjc_wx>^A
修改成
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
试一下,1.7则是java的版本,还需要注意mvn调用的java是否和环境中的java相同 参考技术A 需要配置jdk环境变量 classpath和JAVA_HOME 参考技术B 兄台,此问题困扰我很久,请问你解决了吗,也是maven编译打war包时报的错,如果解决了,还请赐教,谢谢了! 参考技术C <bootclasspath>$java.home/lib/rt.jar;$java.home/lib/jce.jar</bootclasspath>
window下是分号 linux 是冒号
如果帮到你 请关注下我的公众号,里面可以在线问我 公众号是JAVA思考者
maven打包成war,方到tomcat里面运行,页面出现乱码
大家好,我用maven的命令将Web应用打包成war,然后部署到tomcat7中,前几天还好好的,今天打包部署后,运行该web应用,页面上出现��������2类似的乱码.
1.我用的打包命令:mvn clean install tomcat7:redeploy -P dev
2.tomcat的server.xml文件中,我已经改成如下:
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
3.整个工程使用的UTF-8编码,在eclipse的相关地方都改成了
4.pom.xml的打包部署配置如下:
<profiles>
<!-- 开发环境配置 -->
<profile>
<id>dev</id>
<!-- 开发环境的属性配置区 -->
<properties></properties>
<build>
<!-- 发布到tomcat7的插件配置区 -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://192.168.0.80:8080/manager/text</url>
<username>admin</username>
<password>admin</password>
<server>tomcat</server>
<path>/CEM</path>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Java编译插件配置 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
大家知道是哪里需要改不。
以上是关于mav用命令打war包出现缺少lang包怎么回事呀,在线等的主要内容,如果未能解决你的问题,请参考以下文章