dev@glassfish.java.net

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

From: Kin-man Chung <Kin-Man.Chung_at_Sun.COM>
Date: Fri, 25 Sep 2009 10:34:14 -0700

On 09/25/09 10:16, Sahoo wrote:
> I am sorry if I wrote something in anger or in a hurry.

That's OK.

There are a
> couple of things to fix in jsp project:
> Api and imlementation go together. You seem to be promoting them
> differently. You should really be producing one bundle which has both
> api and implementation just like JavaMail bundle is done. I repeat,
> nobody should be able to use an api jar without the api implementation
> unless they are just compiling some code. So, why promote them
> separately as runtime artifacts. In fact, I see in jsp project, they
> are evolving in their own pace and hence you have some version range
> settings in place. Why do we need such complexity?

I totally disagree. JSP api is a javaee api, and as such, any other
vendor can supply its own implementation. By separating the api from
the implementation, we are encouraging other vendors to use our api.
Otherwise what's the point of the separation? This has been the case
with the past versions of servlet and JSP.

>
> Secondly, the groupId of the api artifact does not convey the fact that
> jsp project has generated the artifact.
>
The group for the jsp-api is javax.servlet.jsp, as it should be. This
makes it easier for people outside of Sun to find it in the repo, and
encourage reuse. Shouldn't the API be vendor neutral?

There is a discussion going on now (with Bill, Roberto, and Jerome etc)
to use javax.* as a group-id for other javaee api's. It is generally
believed to be a good idea, though we won't necessarily do it right-
away.

> Thirdly, I don't think jsp project is using standard conventions for
> these artifacts. It is hard to believe that the code is tagged as
> jsp-2.1.3-b16 where as the artifact is released as 2.1.3-b04. I say this
> based on the following information available in
> ~/.m2/repository/org/glassfish/web/jsp/2.1.3-b04/jsp-2.1.3-b04.pom:
> <scm>
>
> <connection>scm:svn:https://jsp.dev.java.net/svn/jsp/tags/jsp-2.1.3-b16</connection>
>
>
> <developerConnection>scm:svn:https://jsp.dev.java.net/svn/jsp/tags/jsp-2.1.3-b16</developerConnection>
>
>
> <url>https://jsp.dev.java.net/source/browse/jsp/tags/jsp-2.1.3-b16</url>
> </scm>
>
> To avoid the build failure, I wanted to build the artifact myself, so I
> was looking for the scm tag, but when I saw such tag, I aborted. Do you
> think the scm tag is correct?
>
I'll need to talk with Jane on this.

Thanks. -Kin-man

> Thanks,
> Sahoo
>
> Kin-man Chung wrote:
>> Sahoo,
>>
>> Agreed that my analysis for the cause of build failure was incorrect,
>> but let's not jump to conclusion here. :-)
>>
>> JSP api is a stable api, and has not been changed for a while. The past
>> changes were typo in javadocs, pom.xml changes etc. By making jsp-impl
>> dependent on the latest version of jsp-api, I am making sure that the
>> lastest version got picked up. I don't know see anything wrong with
>> this. BTW, there was no need to promote jsp-api this time: it was
>> promoted by mistake.
>>
>> The reason for the build failure was due to a Maven bug, like Jane said.
>> I know people were upset because build failed, but there is really no
>> need to over-react.
>>
>> -Kin-man
>>
>> On 09/24/09 20:16, Sahoo wrote:
>>> In addition to what I said, I should also mention that your analysis
>>> of jsp-impl depending on a version range of jsp-api seems to be the
>>> cause why maven tried to download that even when we have not
>>> integrated a newer version of jsp-impl. Please raise a bug and work
>>> with Kin-man to fix this in jsp project. In the past also, I had seen
>>> weired maven use in that project.
>>>
>>> Sahoo
>>>
>>> Sahoo wrote:
>>>> 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
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>