http://maven.apache.org/http://maven.apache.org/download.cgiMaven 3.3.3 (Binary tar.gz)Maven 3.3.3 (Binary Zip)Maven 3.3.3 (Source tar.gz)Maven 3.3.3 (Source Zip)Note: The specific version is subject to the official website.The difference between these several packages: installing Maven----------------1) Unpack the arc
The previous article is relatively simple.
After reading the previous content, we will go to the actual aspect, that is, creating a simple project.
1 mvn archetype:create -DgroupId=org.sonatype.mavenbook.ch03 \2 -DartifactId=simple \3 -DpackageName=org.sonatype.mavenbook
So we got the first blow into the maven field.
It was really cool, and there was a bunch of errors. I read the book for a long time. The
Maven error: Failure to transfer classworlds: pom: 1.1-alpha-2 from, mavenclassworlds
Detailed error:Failure to transfer classworlds: pom: 1.1-alpha-2 from http: // localhost: 8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. original error
://m2eclipse.sonatype.org /.
Make a small summary of the installation of the m2eclipse plug-in:
So far () Sonatype claimed to have been handed over to Eclipse. The official website address of the plug-in Versions later than 1.0 is http://eclipse.org/m2e/, which is http://download.eclipse.org/policy/m2e/releases/
So I went to the eclipse official website to search for the plug-in, but opened the above address and found that the address has expired, and the Eclipse official website said that the p
Method 1:1. Use:MVN archetype:generateThen enter the relevant configuration as required:(1) You can skip filter:Choose a number or Apply filter (format: [Groupid:]artifactid, Case sensitive contains): 777:(2) then enter as required:A. Version numberB.GroupIdC : ArtifactidD: versione: Package : Can skipF:y: ConfirmRecording:Choose a number or Apply filter (format: [Groupid:]artifactid, Case sensitive contains): 777:choose Org.apache.maven.arche Types:m
8. Check code updates and compileYou can set the timer check compile function by poll SCM.For example, */5 * * * * is checked every 5 minutes, if there is an update in the Git repository, the build operation is performed.9. Speed up download with mavenSee: http://blog.csdn.net/sheismylife/article/details/7209722Jenkins '. M2 directory path in:/var/lib/jenkins/.m2/Clear all Jar packages First, then create the settings.xml file and edit the following:Now click on Build to test, open console output
required by applicable law or agreed to writing, softwareDistributed under the License is distributed on a "as is" BASIS,Without warranties or CONDITIONS of any KIND, either express or implied.See the License for the specific language governing permissions andLimitations under the License.-->Note:by default, no user is included in the "Manager-gui" role requiredTo operate the "/manager/html" Web application. If you wish the use of this app,You must define such a user-the username and password i
File structure description:
Project Build lifecycle:
Clear
Compile
Test
Package
Run
Deployment
Cleaning and compilation
Hello \ pom. xml
POM: Project Object Model, Project Object Model
Pom. xml is similar to ant build. xml.
Note:
ModelVersion: Specifies the current POM model version. Maven2 and Maven3 can only be 4.0.0
GroupId: Project Team name
ArtifactId: the unique id of the current
to Pom.xml, we can use MAVEN's command to pack. The instructions are as follows://清除之前target编译文件并重新编译mvn clean package //对项目进行打包(因为配置过插件,所以jar包是可执行的)mvn clean install //安装项目,然后就可以使用了Then java -jar cps-1.0-SNAPSHOT.jar run through.If you are using idea, you can use your own MAVEN management tool instead of executing the above command. Click the Blue section, as shown.Packing with Maven-assembly-pluginThe ab
what is maven?Maven is a tool for building projects that easily manage the life cycle of your project. That is, the project's jar package relies on, develops, tests, releases packaging. Let me summarize some of its features below, and look at these features, perhaps more about Maven.1 Jar Package DependencyThis might be the most prominent feature of
Some recent projects need to be managed by MAVEN, one of which is to add the previous Eclipse Java Project Project and Web project to MAVEN management, and another scenario is to pull the MAVEN project on SVN locally, Some of the tricky issues encountered in using eclipse, the problem process, and the solution are as follows:1. When you start eclipse after instal
-plugin/
It may be due to historical reasons. In Maven 2/3, the plug-in used for testing is not Maven-test-plugin, but Maven-surefire-plugin. In fact, most of the time, as long as your test class complies with the General Command conventions (ended with test, ended with testcase, or started with test), you hardly need
Add the following code under the Pom.xml File build node:123 45678 9Ten One A - -The user can bind any plug-in target to the stage of any life cycle as needed, such as binding the jar-no-fork target of Maven-source-plugin to the package stage of the default life cycle, so that later execution mvn Package command when packaging a project, source code packaging is performed after the packages phaseExecution can be configured un
be packaged as a war and so on. classifier: This element is used to help define some attachments to the build output.The subordinate component corresponds to the main component, as the main component in the previous example is Junit-3.8.1.jar, and the project may be generated by some plug-ins such as Junit-3.8.1-javadoc.jar,junit-3.8.1-sources.jar, Such a subordinate member has its own unique coordinate.2.3. Get maven coordinates (get MAVEN's three
1. If you want maven projects to depend on another maven project, the dependent project must have corresponding jar packages in the maven repository. Therefore, you must execute the mvninstall command on the dependent project. 2. Create the HelloFriend directory of the second project module and the agreed directory str
Some recent projects need to be managed by MAVEN, one of which is to add the previous Eclipse Java Project Project and Web project to MAVEN management, and another scenario is to pull the MAVEN project on SVN locally, Some of the tricky issues encountered in using eclipse, the problem process, and the solution are as follows:1. When you start eclipse after instal
passed dependencies of the explicitly dependent package, this may cause the following problems:
Dependency 1: A --> B --> C (1.0)
Dependency 2: D --> E --> C (2.0)
Since dependency 1 and dependency 2 both have a pass-through dependency C, and the C version is different, which version does Maven use to parse? In this case, the parsing policy used by
Apache Maven released the official version last October in 3.0. On the 22nd of last month, the eclipse Foundation announced the release of eclipse 3.7 (indigo, one of the biggest new features of this version of eclipse is the integration of Maven. Users who download the Eclipse IDE for Java developers version will find that eclipse can automatically identify Maven
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.