1

I have a problem with maven. I wanted to add dependency to embedded Glassfish. I added an entry to pom.xml, containing a fragment copied from internet:

<dependency>
    <groupId>org.glassfish.extras</groupId>
    <artifactId>glassfish-embedded-all</artifactId>
    <version>3.1</version>
</dependency>

However, mvn package prints an error.

Access denied to: http://repository.jboss.org/maven2/org/glassfish/extras/glassfish-embedded-all/3.1/glassfish-embedded-all-3.1.pom -> [Help 1]

What is wrong?

serwator
  • 11
  • 1

2 Answers2

1

Did you pointed to the right repository at you pom.xml file?

Insert this at the end of it, just before the last </project> tag:

<repositories>
  <repository>
    <id>glassfish-releases</id>
    <url>http://download.java.net/maven/glassfish</url>
  </repository>
</repositories>
Nigini
  • 454
  • 1
  • 5
  • 16
0

Connecting to http://repository.jboss.org/maven2 per HTTP throws an 403 Forbidden error, as it is outdated.

This SO question has:

http://maven.glassfish.org/content/groups/glassfish

as the new URL.

Community
  • 1
  • 1
Jacob
  • 41,721
  • 6
  • 79
  • 81