Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Create Maven Project Manually
How to create a Maven project manually? I don't want to use any "archetype" project template.
✍: FYIcenter.com
You can follow these steps to create a Maven project manually:
1. Prepare your project required information:
2. Create a project directory like C:\fyicenter\abo.
C:\fyicenter>mkdir abo C:\fyicenter>cd abo
3. Create the pom.xml file at .\pom.xml:
C:\fyicenter\abo>type pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.fyicenter</groupId> <artifactId>abo</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>Apple, Banana and Orange</name> <url>http://jar.fyicenter.com</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <version>4.2</version> </dependency> </dependencies> </project>
4. Create the Java source code in .\src\main\java:
C:\fyicenter\abo>type src\main\java\com\fyicenter\TreeListExample.java package com.fyicenter; /** * Apple, Banana and Orange * Copyright (c) 2016-2018 FYIcenter.com * */ import java.util.List; import org.apache.commons.collections4.list.TreeList; // Example of using the TreeListExample class public class TreeListExample { public static void main(String[] args) throws Exception { // Create some objects String apple = "Apple"; String orange = "Orange"; String banana = "Banana"; // Create a TreeList list List<String> list = new TreeList<String>(); // insert objects into the list from the beginning position list.add(0, apple); list.add(0, orange); list.add(0, apple); list.add(0, orange); list.add(0, apple); list.add(0, banana); // loop through the set as a list for (int i=0; i<list.size(); i++) { String obj = list.get(i); System.out.println(i+": " + obj); } } }
The Maven project is ready.
⇒ abo-1.0.jar - Maven Test Project Target
2020-10-10, 737👍, 0💬
Popular Posts:
What Is poi-3.5.jar - Part 2? poi-3.5.jar is one of the JAR files for Apache POI 3.5, which provides...
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...
XStream is a simple library to serialize objects to XML and back again. JAR File Size and Download L...