Issue
@Pre: working under Linux Mint 20.4 + Netbeans 12.4 + Java JDK 8 + Maven + Axis2
I am learning about WSDL files so I used Axis2 engine to create a class from an WSDL file. No problem at this point.
Then I created a new Java Aplication proyect WITH MAVEN under Netbeans and imported the Axis2 generated class. After that I tryed to import Axis2 dependencies to my project by adding the dependencie to my pom.xml file. So I looked for it at "https://mvnrepository.com/artifact/org.apache.axis2/axis2" y copied and pasted in my pom the following text:
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.8.0</version>
<type>pom</type>
</dependency>
However, when I try to import the package to my class as follows, I get a "package org.apache.axis2 does not exist" error
import org.apache.axis2;
What am I doing wrong up to this point?
Thank you very much
EDIT: the problem is this dependency is pom type in version 1.2.0 and above. Version 1.1.1 is jar type (default type) so it works fine. I am still looking how to add the pom version as I need a newer version for my development
Solution
I suggest manually adding dependencies to you pom.xml is somewhat error-prone. Just right-click on your "dependencies" node in NetBeans project explorer and click on "Add dependency". That's much easier.
Answered By - René Pöpperl
Answer Checked By - David Marino (JavaFixing Volunteer)