Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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.
fyicenter> mkdir abo fyicenter> cd abo
3. Create the pom.xml file at .\pom.xml:
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:
fyicenter\abo> type src\main\java\com\fyicenter\TreeListExample.java
package com.fyicenter;
/**
* Apple, Banana and Orange
* Copyright (c) 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, ∼1384🔥, 0💬
Popular Posts:
HttpComponents Client Source Code Files are provided in the source package file, httpcomponents-clie...
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
Where to get the Java source code for Connector/J 8.0 Core API module? Java source code files for Co...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...