1

missing artifact org.glassfish.extras glassfish-embedded-web:jar3.1.1 and there's an error in the pom.xml file of my maven project using jersey.

please explain what is wrong? the error mark is in the dependency tag below

<dependency>
  <groupId>org.glassfish.extras</groupId>
  <artifactsId>glassfish-embedded-web</artifactsId>
  <version>${glassfish.version}</version>
<dependency>

And also there an error in annotations @Path, @GET, and @Produces of myResource.java class

  • 1
    What IDE do you use? Where have you put the version variable `glassfish.version`? Does your IDE automatically download and update those dependencies? – deHaar Sep 12 '18 at 06:43
  • I'm using Eclipse Java EE for Web Developers, Oxygen.3a Release 4.7.3a. When I change the version to 5.0.0, errors go away from the dependency tag but still shows there's an error in the file itself and when I open the xml file, there's no visible error. thanks – Chuda Mainali Sep 12 '18 at 07:00
  • Have you defined the variable for the version number in the properties section of your pom.xml? – deHaar Sep 12 '18 at 07:11

3 Answers3

3

The error you have posted isorg.glassfish.extras glassfish-embedded-web:jar3.1.1. There seems to be issue with the declared version part as it is coming as jar3.1.1. It should be 3.1.1 only.

Make sure you have declared version correctly in the pom.xml file for this dependency.

Yug Singh
  • 3,112
  • 5
  • 27
  • 52
  • I'm using Eclipse Java EE for Web Developers, Oxygen.3a Release 4.7.3a. When I change the version to 5.0.0, errors go away from the dependency tag but still shows there's an error in the file itself and when I open the xml file, there's no visible error. thanks – Chuda Mainali Sep 12 '18 at 07:02
-1

${glassfish.version} -> it mean you must define it. You can replace it with the version in mvn repository. it like "2.27". example :

<dependency>
    <groupId>org.glassfish.extras</groupId>
    <artifactId>glassfish-embedded-all</artifactId>
    <version>3.2-b06</version>
    <scope>test</scope>
</dependency>
-1

Try this,

Right click -> Maven -> Update Project -> check "Force Update of Snapshots/Releases" and then click ok.

karepu
  • 198
  • 1
  • 6