Assuming you're looking just for the API, I would recommend removing the <repository> definition and moving to a standard artifact definition such as :
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
or better yet reference the platform APIs instead :
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
Both are in Maven central.
-Alexis
On 2 mars 2012, at 12:18, forums_at_java.net wrote:
> Hello to everyone and sorry if I am not asking this question in the right
> place.
>
> I have a netbeans/maven project and in my pom file I have added
>
> <dependency> <groupId>jetty</groupId>
> <artifactId>javax.servlet</artifactId> <version>5.1.12</version>
> </dependency>
> and of course
>
> <repository> <id>glassfish</id> <name>glassfish</name>
> <url>http://maven.glassfish.org/content/groups/glassfish/</url> </repository>
> When I try to build I get this error: Could not transfer artifact
> jetty\:javax.servlet\:pom\:5.1.12 from/to glassfish
> (http\://maven.glassfish.org/content/groups/glassfish/)\: Error transferring
> file\: Connection timed out\: connect
>
> Am I doing something wrong or is there a problem with the repository?
>
> Thank you in advance to anyone who can give me an answer.
>
>
> --
>
> [Message sent by forum member 'alegen']
>
> View Post: http://forums.java.net/node/883956
>
>