http://blog.csdn.net/u013177446/article/details/53944424************************************************************The jar generated by the MAVEN default package is not able to run directly because of the meta-inf/manifest in the jar file. There is no Main-class line in MF, in order to generate the executable jar file, you need to use Maven's plugin, Maven-shade
Exception occurred when using MAVEN to obtain dependent jar packages: Archive for required library: ' d:/maven/repository/org/springframework/spring-context/ 4.0.0.release/in project ' WEBMVC ' cannot be read or was not a valid ZIP fileBut I went to the relevant directory to find the relevant jar package, but the IDE still error, found a processing method on the
时,可寻求帮助* mvn clean compile,将.java类编译为.class文件* mvn clean test, 执行单元测试,会先运行编译* mvn clean package,进行打包,会先运行测试* mvn clean install –Dmaven.test.skip* mvn clean install,将某jar包安装到maven本地仓库中* mvn archetype:generate,快速的搭建项目骨架,输入一些groupId/artifactId/version等信息,由mvn插件自动生成一些必要的依赖和项目骨架
How to add dependencies to a locally infrequently used jar package:First we need to unde
1.run As->maven Build, enter package in goals, don't choose Select, my card is dead.Run Record:[INFO] Scanning for projects ... [INFO] [INFO]------------------------------------------------------------------------[INFO] Building mavenlearning 0.0.1 -snapshot[info]------------------------------------------------------------------------[I
considered.
Easy to control the version of the jar package, and the dependencies of each jar package. For example, when you use the spring framework, you may find different versions of the development process, and when you need to modify the version, it takes time and effort to copy the jar package to Lib, and the
Maven adds a local jar package to the MAVEN repositoryMVN install:install-file-dgroupid=io.netty-dartifactid=netty-all-dversion=5.0.0.alpha1-dpackaging=jar-dfile=G:/java/jar Bag/netty-all-5.0.0.alpha1.jarThe jar package I downloaded was placed in the D:\MVN directory (D:\mvn\spring-context-support-3.1.0.RELEASE.jar)So
This time a project was used by Maven to compile, I was in the local development of the jar package is placed in the Web-inf/lib directory, throughBuildPath imports the jar package and then uses the MyEclipse: Maven Package Command to fight the war packet, which runs under T
The MAVEN project introduces the method of jar package, hoping to help the friends who are in needLaw I. Manual import: Project Right-->build path->configure Build path-> Select libraries-> Click Add External jars-> Select the JAR package import that has been prepared beforehand.Method Two. Add through the dependencies
Many novices don't know how to add a jar package to a MAVEN project.
I haven't been in touch with Maven before. Download a demo, it's a MAVEN project.
I actually wrote!!! One of his pom.xml files.
What many people take for granted is a difficult threshold for beginners.
So simply write down how to add a jar
Use Gradle to deploy the jar package to the Maven central repository
Maven, as the best Dependency management system in the Java industry, hosts the jar package to the Maven Central Library. Using Maven Dependency is a common prac
.
Easy to control the version of the jar package, and the dependencies of each jar package. For example, when you use the spring framework, you may find different versions of the development process, and when you need to modify the version, it takes time and effort to copy the jar package to Lib, and the version nu
Background account: In the image watermark when the introduction of two package files, the two packages are the JDK's own private package, can not use the MAVEN library to download, so the author manually rt and JCE Two tool jar files copied to the local MAVEN library, the following figure
Import Com.sun.image.codec.
Blog type:
Spring3MVC tutorial
Many new users of mavenSpringXMLTomcatjunit do not know how to add jar packages to maven projects.
I downloaded a demo before using maven. It is a maven project.
I wrote it one by one based on his pom. xml file !!!
What many take for granted is a difficult threshold for beginners.
Therefore, write down how to add a jar
Preface
In the previous article on how to use Maven in Eclipse, now it's time to talk about how to use MAVEN to package the jar, after all, our project always needs to be executed, and it needs to run in an environment.
Body
The first is that we have to configure the Pom configuration file to be packaged as a jar, as follows:
is to define the packaging method
Install:install-file-dartifactid= above the artifactid-dversion= above the Version-dpackaging=jarSo, what about Ivy's local repository and how to add a jar package?In the online search for information, I tried the steps to:
When Ant builds project, Ivy prompts for the missing packages after the failure;
These jar packages for hints {preferably build source code, download} are obtained and placed in the Ivy warehouse corresponding location
The MAVEN project introduces the method of jar package, hoping to help the friends who are in needLaw I. Manual import: Project Right-->build path->configure Build path-> Select libraries-> Click Add External jars-> Select the JAR package import that has been prepared beforehand.Method Two. Add through the dependencies
A dependency reference between two Web projects. The Web project is referenced by the way the war package is used. For example, there are two projects, Puzzle-web and Puzzle-web-demo, and two are Web projects, and Puzzle-web-demo depends on Puzzle-web, which is configured as follows.(1) Puzzle-web Configuration of package in Project Pom.xmlA, compile the plug-in version to use 2.4, otherwise, you can appea
The project has a requirement to package the code and dependencies of the current project into a jar package, and then package the jar package with some related files into a tar Two plugins are used here, shade and assembly,shade are responsible for generating the jar
Reference Blog: http://blog.csdn.net/ciedecem/article/details/10382275Problem:The project needs to be loaded with JSON data from the file and placed in the Conf directory.In the programXXX.class.getResource ("App.json");XXX.class.getClassLoader (). getResourceAsStream ("App.json")Can not find the file, reported NullPointerException. The ClassLoader can only load files under the Classpath directory and cannot read files outside the jar file in either way.Solution:Reference Online Blog ... Knowing
MAVEN Package Exception: Package com.sun.org.apache.xml.internal.security.utils.Base64 does not existAdd Jre/lib/rt.jar to maven compiler inside compile normal ...2.3. 21.61.6 Maven Package Exception:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.