dev@glassfish.java.net

Re: Build failure: jsp-api jar version 2.1.3-b05 missing from maven repo

From: Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 25 Sep 2009 08:36:26 +0530

Jane,

Have you read my original email which had an attachment showing the jar
file missing at
http://maven.glassfish.org/content/groups/glassfish/javax/servlet/jsp/jsp-api/2.1.3-b05/
? As a work around, I just went to the java.net maven repo, downloaded
the jar and copied it to my local repo to get the build going last
night. Now I see the jar present there.

Secondly, which verifier pom has specified a version for jsp-api? I see
v3/verifier-impl/pom.xml having the following entry:

        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jsp-impl</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.servlet.jsp</artifactId>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>

Thanks,
Sahoo

Jane Young wrote:
> Hi,
>
> The jsp-api:2.1.3-b05 is there in GlassFish repo and also in Nexus:
>
> http://maven.glassfish.org/content/groups/glassfish/javax/servlet/jsp/jsp-api/
>
> and
> http://download.java.net/maven/2/javax/servlet/jsp/jsp-api/2.1.3-b05/
>
> In verifier-pom/pom.xml there's a dependency on jsp-impl:2.1.3-b16.
> In jsp-impl's pom.xml, the dependency for jsp-api is defined as:
>
> <dependency>
> <groupId>javax.servlet.jsp</groupId>
> <artifactId>jsp-api</artifactId>
> <version>[2.1.3-b02,2.2)</version>
> </dependency>
>
> So it'll try to download the latest released version of jsp-api and
> Maven is trying to download it from it's Central repository, not Nexus
> or java.net.
> To prove this, I use a very simple pom.xml:
>
> --------------------------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 trying to download the artifact from the Central repo
> (http://repo1.maven.org/maven2). It didn't even search for it in
> java.net. The message at the end is not true.
> I think this is a bug in Maven. I will send an e-mail to Maven forum.
>
>
> Thanks,
> Jane
>
>
>
>
> Marina Vatkina wrote:
>> It doesn't seem to solve the problem...
>>
>> -marina
>>
>> Kin-man Chung wrote:
>>> I knew what's going on...
>>>
>>> verifier-impl has an dependency on jsp-impl, but without specifying a
>>> version for it. So maven pick the latest one in the repo, which is
>>> jsp-impl.2.1.3-b17, which depends on jsp-api-2.1.3-05. For some reason
>>> jsp-api.2.1.3-b5 were not deployed properly, hence the error.
>>>
>>> I'll fixed the pom.xml in verifier-impl to add a version for jsp-impl.
>>> In the mean time, Jane, can you look into jsp-api.2.1.3-b05? Thanks.
>>>
>>> -Kin-man
>>>
>>> On 09/24/09 13:09, Jane Young wrote:
>>>
>>>> Investigating...
>>>>
>>>>
>>>> Kin-man Chung wrote:
>>>>
>>>>> I haven't done anything. :-)
>>>>>
>>>>> All I did was ask Jane to promote a new version of jsp. Maybe the
>>>>> artifacts were not deployed properly? Jane?
>>>>>
>>>>> Also, I don't see how it got referenced at all. V3 pom.xml still
>>>>> uses
>>>>> the old version 2.1.3-b4.
>>>>>
>>>>> I'll see if I can reproduce.
>>>>>
>>>>> -Kin-man
>>>>>
>>>>> On 09/24/09 12:11, Sahoo wrote:
>>>>>
>>>>>> I am refreshing my workspace after some days. I am getting a
>>>>>> build failure like this:
>>>>>>
>>>>>> /Caused by:
>>>>>> org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException:
>>>>>> 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) org.glassfish:verifier:hk2-jar:3.0-SNAPSHOT
>>>>>> 2) org.glassfish.web:jsp-impl:jar:2.1.3-b16
>>>>>> 3) javax.servlet.jsp:jsp-api:jar:2.1.3-b05
>>>>>>
>>>>>> ----------
>>>>>> 1 required artifact is missing.
>>>>>>
>>>>>> for artifact:
>>>>>> org.glassfish:verifier:hk2-jar:3.0-SNAPSHOT
>>>>>>
>>>>>> from the specified remote repositories:
>>>>>> central (http://repo1.maven.org/maven2),
>>>>>> glassfish-repo-archive
>>>>>> (http://maven.glassfish.org/content/groups/glassfish)
>>>>>> /
>>>>>>
>>>>>> When I go to the maven repo [1], I only see a pom and sha file as
>>>>>> you can see from the attached screenshot; there is no jar file.
>>>>>> How is build succeeding for others?
>>>>>>
>>>>>> Thanks,
>>>>>> Sahoo
>>>>>>
>>>>>> [1]
>>>>>> http://maven.glassfish.org/content/groups/glassfish/javax/servlet/jsp/jsp-api/2.1.3-b05/
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>