From the NetBeans forum:
- Open the Projects tab.
- Right-click on Dependencies.
- Select Add dependency.
- Set groupId to:
group.id
(can be anything)
- Set artifactId to:
artifact.id
(can be anything)
- Set version to:
1.0
(can be anything)
- Click Add to continue.
Dependency is added to pom.xml
and appears under the Libraries node of Maven project. Continue:
- Expand Dependencies.
- Right-click on library (e.g., group.id).
- Select Manually install artifact.
- Set Artifact to install with the Java Archive (.jar) file path.
- Click Install locally.
Library is installed locally with dependency attributes (coordinates) entered in steps 4 - 6.
I found those instructions helpful when going through the NetBeans GUI. Basically when right clicking to add a dependency, the group id, version, and name must be populated with anything. Then that "dependency" will be listed in the dependency drop down. Right click on that newly created dependency and right click to install locally and navigate to the appropriate jar file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…