You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jane Young <Ja...@Sun.COM> on 2009/09/25 03:07:47 UTC
Please help... why isn't maven finding the dependency?
Hi Maven Gurus,
I'm really puzzled... Can someone in the forum explain this to me?
I have a simple pom.xml that defines the a dependency on jsp-impl from
the Maven repository: http://download.java.net/maven/2
--------------------------pom.xml-----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>maven.test</groupId>
<artifactId>simple</artifactId>
<version>1.0</version>
<name>SimpleTest</name>
<repositories>
<repository>
<id>java.net</id>
<name>Java Net Maven 2 </name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jsp-impl</artifactId>
<version>2.1.3-b17</version>
</dependency>
</dependencies>
</project>
-------------------------------------------------------------------
Running "mvn install" will fail with the message:
Downloading:
http://repo1.maven.org/maven2/javax/servlet/jsp/jsp-api/2.1.3-b05/jsp-api-2.1.3-b05.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=javax.servlet.jsp
-DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar
-Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=javax.servlet.jsp
-DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) maven.test:simple:jar:1.0
2) org.glassfish.web:jsp-impl:jar:2.1.3-b17
3) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
----------
1 required artifact is missing.
for artifact:
maven.test:simple:jar:1.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
java.net (http://download.java.net/maven/2)
It's complaining about resolving the artifact jsp-api. But this
artifact (javax.servlet.jsp:jsp-api:jar:2.1.3-b05) exists in java.net
(http://download.java.net/maven/2/javax/servlet/jsp/jsp-api/2.1.3-b05/).
Looks like it's trying to download the artifact from the Central repo
(http://repo1.maven.org/maven2) and not even search for it in
java.net. The message at the end is not true.
If I explicitly define jsp-api artifact in the pom.xml then it compiles
successfully.
Is this a bug in Maven? a known issue?
I'm using Maven version 2.2.1 and JDK version 1.6.
Thanks,
Jane
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Please help... why isn't maven finding the dependency?
Posted by Brett Porter <br...@apache.org>.
Not off the top of my head - you should search the MNG JIRA for a
related issue and report it if not.
Thanks,
Brett
On 25/09/2009, at 11:26 AM, Jane Young wrote:
> Hi Brett,
>
> Thanks for the quick response.
> Do you have an Issue Tracker number so I can follow-up on this?
>
> Thanks,
> Jane
>
>
> Brett Porter wrote:
>> This seems to be a bug in Maven with the way the version ranges are
>> being handled. You can work around it by declaring the JSP API
>> dependency directly in your POM.
>>
>> - Brett
>>
>> On 25/09/2009, at 11:07 AM, Jane Young wrote:
>>
>>> Hi Maven Gurus,
>>>
>>> I'm really puzzled... Can someone in the forum explain this to me?
>>>
>>> I have a simple pom.xml that defines the a dependency on jsp-impl
>>> from the Maven repository: http://download.java.net/maven/2
>>>
>>> --------------------------pom.xml-----------------------------
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>>> " xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
>>> ">
>>> <modelVersion>4.0.0</modelVersion>
>>> <groupId>maven.test</groupId>
>>> <artifactId>simple</artifactId>
>>> <version>1.0</version>
>>> <name>SimpleTest</name>
>>> <repositories>
>>> <repository>
>>> <id>java.net</id>
>>> <name>Java Net Maven 2 </name>
>>> <url>http://download.java.net/maven/2</url>
>>> </repository>
>>> </repositories>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.glassfish.web</groupId>
>>> <artifactId>jsp-impl</artifactId>
>>> <version>2.1.3-b17</version>
>>> </dependency>
>>> </dependencies>
>>> </project>
>>>
>>> -------------------------------------------------------------------
>>>
>>> Running "mvn install" will fail with the message:
>>>
>>> Downloading: http://repo1.maven.org/maven2/javax/servlet/jsp/jsp-api/2.1.3-b05/jsp-api-2.1.3-b05.jar
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Failed to resolve artifact.
>>>
>>> Missing:
>>> ----------
>>> 1) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>>>
>>> Try downloading the file manually from the project website.
>>>
>>> Then, install it using the command:
>>> mvn install:install-file -DgroupId=javax.servlet.jsp -
>>> DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar -Dfile=/
>>> path/to/file
>>>
>>> Alternatively, if you host your own repository you can deploy the
>>> file there:
>>> mvn deploy:deploy-file -DgroupId=javax.servlet.jsp -
>>> DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar -Dfile=/
>>> path/to/file -Durl=[url] -DrepositoryId=[id]
>>>
>>> Path to dependency:
>>> 1) maven.test:simple:jar:1.0
>>> 2) org.glassfish.web:jsp-impl:jar:2.1.3-b17
>>> 3) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>>>
>>> ----------
>>> 1 required artifact is missing.
>>>
>>> for artifact:
>>> maven.test:simple:jar:1.0
>>>
>>> from the specified remote repositories:
>>> central (http://repo1.maven.org/maven2),
>>> java.net (http://download.java.net/maven/2)
>>>
>>>
>>>
>>> It's complaining about resolving the artifact jsp-api. But this
>>> artifact (javax.servlet.jsp:jsp-api:jar:2.1.3-b05) exists in java.net
>>> (http://download.java.net/maven/2/javax/servlet/jsp/jsp-api/2.1.3-b05/
>>> ). Looks like it's trying to download the artifact from the
>>> Central repo (http://repo1.maven.org/maven2) and not even search
>>> for it in java.net. The message at the end is not true.
>>>
>>> If I explicitly define jsp-api artifact in the pom.xml then it
>>> compiles successfully.
>>> Is this a bug in Maven? a known issue?
>>> I'm using Maven version 2.2.1 and JDK version 1.6.
>>>
>>> Thanks,
>>> Jane
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Please help... why isn't maven finding the dependency?
Posted by Jane Young <Ja...@Sun.COM>.
Hi Brett,
Thanks for the quick response.
Do you have an Issue Tracker number so I can follow-up on this?
Thanks,
Jane
Brett Porter wrote:
> This seems to be a bug in Maven with the way the version ranges are
> being handled. You can work around it by declaring the JSP API
> dependency directly in your POM.
>
> - Brett
>
> On 25/09/2009, at 11:07 AM, Jane Young wrote:
>
>> Hi Maven Gurus,
>>
>> I'm really puzzled... Can someone in the forum explain this to me?
>>
>> I have a simple pom.xml that defines the a dependency on jsp-impl
>> from the Maven repository: http://download.java.net/maven/2
>>
>> --------------------------pom.xml-----------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>maven.test</groupId>
>> <artifactId>simple</artifactId>
>> <version>1.0</version>
>> <name>SimpleTest</name>
>> <repositories>
>> <repository>
>> <id>java.net</id>
>> <name>Java Net Maven 2 </name>
>> <url>http://download.java.net/maven/2</url>
>> </repository>
>> </repositories>
>> <dependencies>
>> <dependency>
>> <groupId>org.glassfish.web</groupId>
>> <artifactId>jsp-impl</artifactId>
>> <version>2.1.3-b17</version>
>> </dependency>
>> </dependencies>
>> </project>
>>
>> -------------------------------------------------------------------
>>
>> Running "mvn install" will fail with the message:
>>
>> Downloading:
>> http://repo1.maven.org/maven2/javax/servlet/jsp/jsp-api/2.1.3-b05/jsp-api-2.1.3-b05.jar
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failed to resolve artifact.
>>
>> Missing:
>> ----------
>> 1) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>>
>> Try downloading the file manually from the project website.
>>
>> Then, install it using the command:
>> mvn install:install-file -DgroupId=javax.servlet.jsp
>> -DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar
>> -Dfile=/path/to/file
>>
>> Alternatively, if you host your own repository you can deploy the
>> file there:
>> mvn deploy:deploy-file -DgroupId=javax.servlet.jsp
>> -DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar
>> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>>
>> Path to dependency:
>> 1) maven.test:simple:jar:1.0
>> 2) org.glassfish.web:jsp-impl:jar:2.1.3-b17
>> 3) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>>
>> ----------
>> 1 required artifact is missing.
>>
>> for artifact:
>> maven.test:simple:jar:1.0
>>
>> from the specified remote repositories:
>> central (http://repo1.maven.org/maven2),
>> java.net (http://download.java.net/maven/2)
>>
>>
>>
>> It's complaining about resolving the artifact jsp-api. But this
>> artifact (javax.servlet.jsp:jsp-api:jar:2.1.3-b05) exists in java.net
>> (http://download.java.net/maven/2/javax/servlet/jsp/jsp-api/2.1.3-b05/).
>> Looks like it's trying to download the artifact from the Central repo
>> (http://repo1.maven.org/maven2) and not even search for it in
>> java.net. The message at the end is not true.
>>
>> If I explicitly define jsp-api artifact in the pom.xml then it
>> compiles successfully.
>> Is this a bug in Maven? a known issue?
>> I'm using Maven version 2.2.1 and JDK version 1.6.
>>
>> Thanks,
>> Jane
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Please help... why isn't maven finding the dependency?
Posted by Brett Porter <br...@apache.org>.
This seems to be a bug in Maven with the way the version ranges are
being handled. You can work around it by declaring the JSP API
dependency directly in your POM.
- Brett
On 25/09/2009, at 11:07 AM, Jane Young wrote:
> Hi Maven Gurus,
>
> I'm really puzzled... Can someone in the forum explain this to me?
>
> I have a simple pom.xml that defines the a dependency on jsp-impl
> from the Maven repository: http://download.java.net/maven/2
>
> --------------------------pom.xml-----------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> " xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
> ">
> <modelVersion>4.0.0</modelVersion>
> <groupId>maven.test</groupId>
> <artifactId>simple</artifactId>
> <version>1.0</version>
> <name>SimpleTest</name>
> <repositories>
> <repository>
> <id>java.net</id>
> <name>Java Net Maven 2 </name>
> <url>http://download.java.net/maven/2</url>
> </repository>
> </repositories>
> <dependencies>
> <dependency>
> <groupId>org.glassfish.web</groupId>
> <artifactId>jsp-impl</artifactId>
> <version>2.1.3-b17</version>
> </dependency>
> </dependencies>
> </project>
>
> -------------------------------------------------------------------
>
> Running "mvn install" will fail with the message:
>
> Downloading: http://repo1.maven.org/maven2/javax/servlet/jsp/jsp-api/2.1.3-b05/jsp-api-2.1.3-b05.jar
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=javax.servlet.jsp -
> DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar -Dfile=/path/
> to/file
>
> Alternatively, if you host your own repository you can deploy the
> file there:
> mvn deploy:deploy-file -DgroupId=javax.servlet.jsp -
> DartifactId=jsp-api -Dversion=2.1.3-b05 -Dpackaging=jar -Dfile=/path/
> to/file -Durl=[url] -DrepositoryId=[id]
>
> Path to dependency:
> 1) maven.test:simple:jar:1.0
> 2) org.glassfish.web:jsp-impl:jar:2.1.3-b17
> 3) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>
> ----------
> 1 required artifact is missing.
>
> for artifact:
> maven.test:simple:jar:1.0
>
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2),
> java.net (http://download.java.net/maven/2)
>
>
>
> It's complaining about resolving the artifact jsp-api. But this
> artifact (javax.servlet.jsp:jsp-api:jar:2.1.3-b05) exists in
> java.net (http://download.java.net/maven/2/javax/servlet/jsp/jsp-api/2.1.3-b05/
> ). Looks like it's trying to download the artifact from the
> Central repo (http://repo1.maven.org/maven2) and not even search
> for it in java.net. The message at the end is not true.
>
> If I explicitly define jsp-api artifact in the pom.xml then it
> compiles successfully.
> Is this a bug in Maven? a known issue?
> I'm using Maven version 2.2.1 and JDK version 1.6.
>
> Thanks,
> Jane
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org