dev@glassfish.java.net

Re: jsp-impl dependency issue

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 20 May 2009 16:50:54 +0530

1. I don't think maven scans all the repositories to select the latest
SNAPSHOT. It probably uses the one it finds first.

2. No, we can't use SNAPSHOT dependency on external artifacts with the
current build infrastructure. I understand why developers want to have
such SNAPSHOT dependencies and that is exactly why I asked build team to
change build scripts to accommodate them, but they were never implemented.

3. The reason for not using SNAPSHOT in the current workspace is to make
builds reproducible.
e.g.,
day #1:
---------
User A publishes foo-1.0-SNAPSHOT.jar containing Bar.class
User A changes v3 to use Bar.class and checks in rev #1.

User B checks out v3 rev #1. It builds fine.

day #2
--------
User A republish foo-1.0-SNAPSHOT.jar which does not contain Bar.class
anymore.
User A makes necessary changes in v3 and checks in rev #2.

User B wants to do a clean build of his v3 workspace (remember he is
still on rev #1, because he does not have time to update to latest
workspace, as he is in the middle of his changes). If he cleans his
maven repo, he can't build v3 anymore, as it won't find B.class.
Similarly, anyone who wants to build v3 rev#1 from a clean state, they
can't build. I think this is a big problem.

4. It is really bad idea to make builds available that can't be
reproduced. I see this is being done currently for 3.0-Preview nightly
and trunk nightly builds.

5. If we really want SNAPSHOT integration of external dependencies, we
should investigate the proposal I had put forward sometime back.

6. Cross posting of artifacts is not such a good idea. We will continue
to have such issues unless we restrict access to maven repos.

Thanks,
Sahoo

Jane Young wrote:
> Hi Sahoo,
>
> Looks like Kin-Man publishes the jsp-impl SNAPSHOT artifacts to
> maven/2 repository. I've been promoting the jsp-impl for Kin-Man and
> have been deploying to maven/glassfish repository. Maybe the correct
> repo should be maven/2 instead of maven/glassfish since jsp is a
> separate java.net project. There maybe other projects that are cross
> publishing artifacts in maven/2 and maven/glassfish. Hopefully they
> contain the same artifacts. It will take time to clean-up the maven
> repositories. I do not have the time right now to clean-up the
> repositories.
> Kin-Man added the SNAPSHOT dependency today. Since we are not
> promoting from trunk, Hudson job is not catching this SNAPSHOT. I
> thought Maven is supposed to scan through all the repositories and
> look for the latest SNAPSHOT version. Perhaps Jagadish is executing
> with maven offline mode therefore the latest SNAPSHOT version is not
> downloaded to his local maven repo.
> Is there a reason why SNAPSHOT dependencies can't be specified in the
> trunk and have it rev'd to a release version before promotion? The
> reason I'm asking is because in the 3.0-Preview branch,
> glassfish-sample artifact is defined as a SNAPSHOT dependency since we
> want to have the nightly build contain the latest samples. Before
> promoting 3.0-Preview, glassfish-sample will get promoted and
> SNAPSHOT is changed to a promoted version. Is there an issue for
> doing it this way?
> Thanks,
> Jane
>
>
> Sahoo wrote:
>> Which should be the actual repo for this artifact? Who uploaded it in
>> both the repositories? A lot of developers are likely to face this
>> issue.
>>
>> Jane,
>>
>> Can you find out from svn/cvs log of the maven repository to find out
>> more about the offending the jar in maven repo. And finally, who
>> added this SNAPSHOT dependency and why our hudson job not catching
>> this SNAPSHOT dependency issue? Is it not running?
>>
>> Thanks,
>> Sahoo
>>
>> Kin-man Chung wrote:
>>> Looks like you are getting the wrong version of
>>> jsp-impl-2.1.3-SNAPSHOT for some reason.
>>> The one from http://download.java.net/maven/glassfish is stale.
>>> The newer version is in
>>> http://download.java.net.maven/2. Try removing it from .m2 and
>>> build again.
>>>
>>> -Kin-man
>>>
>>> Jagadish Prasath Ramu wrote:
>>>> I am unable to build due to a compilation issue w.r.t jsp-impl module.
>>>>
>>>> versioned builds of jsp-impl has a overloaded method
>>>> JspConfig.makeJspPropertyGroups()
>>>>
>>>> but not available in SNAPSHOT build (2.1.3-SNAPSHOT)
>>>>
>>>> http://download.java.net/maven/glassfish/org/glassfish/web/jsp-impl/2.1.3-SNAPSHOT/jsp-impl-2.1.3-SNAPSHOT.jar
>>>>
>>>> http://maven.glassfish.org/content/groups/glassfish/org/glassfish/web/jsp-impl/2.1.3-SNAPSHOT/
>>>>
>>>>
>>>>
>>>> Thanks,
>>>> -Jagadish
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ ls
>>>> 2.1.3-b04 2.1.3-b05 2.1.3-b06 2.1.3-b07 2.1.3-SNAPSHOT
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ j
>>>> (reverse-i-search)`java': javap -classpath jsp-impl-2.1.3-SNAPSHOT.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-b04/jsp-impl-2.1.3-b04.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> Compiled from "JspConfig.java"
>>>> public class org.apache.jasper.compiler.JspConfig extends
>>>> java.lang.Object{
>>>> public
>>>> org.apache.jasper.compiler.JspConfig(javax.servlet.ServletContext,
>>>> org.apache.jasper.Options);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String);
>>>> public org.apache.jasper.compiler.JspProperty
>>>> findJspProperty(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> public boolean isJspPage(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> static {};
>>>> }
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-b04/jsp-impl-2.1.3-b04.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-b05/jsp-impl-2.1.3-b05.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> Compiled from "JspConfig.java"
>>>> public class org.apache.jasper.compiler.JspConfig extends
>>>> java.lang.Object{
>>>> public
>>>> org.apache.jasper.compiler.JspConfig(javax.servlet.ServletContext,
>>>> org.apache.jasper.Options);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String);
>>>> public org.apache.jasper.compiler.JspProperty
>>>> findJspProperty(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> public boolean isJspPage(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> static {};
>>>> }
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-b06/jsp-impl-2.1.3-b06.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> Compiled from "JspConfig.java"
>>>> public class org.apache.jasper.compiler.JspConfig extends
>>>> java.lang.Object{
>>>> public
>>>> org.apache.jasper.compiler.JspConfig(javax.servlet.ServletContext,
>>>> org.apache.jasper.Options);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String);
>>>> public org.apache.jasper.compiler.JspProperty
>>>> findJspProperty(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> public boolean isJspPage(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> static {};
>>>> }
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-b07/jsp-impl-2.1.3-b07.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> Compiled from "JspConfig.java"
>>>> public class org.apache.jasper.compiler.JspConfig extends
>>>> java.lang.Object{
>>>> public
>>>> org.apache.jasper.compiler.JspConfig(javax.servlet.ServletContext,
>>>> org.apache.jasper.Options);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String);
>>>> public org.apache.jasper.compiler.JspProperty
>>>> findJspProperty(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> public boolean isJspPage(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> static {};
>>>> }
>>>>
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-SNAPSHOT/jsp-impl-2.1.3-SNAPSHOT.jar
>>>> No classes were specified on the command line. Try -help.
>>>> prompt>~/.m2/repository/org/glassfish/web/jsp-impl$ javap
>>>> -classpath ./2.1.3-SNAPSHOT/jsp-impl-2.1.3-SNAPSHOT.jar
>>>> org.apache.jasper.compiler.JspConfig
>>>> Compiled from "JspConfig.java"
>>>> public class org.apache.jasper.compiler.JspConfig extends
>>>> java.lang.Object{
>>>> public
>>>> org.apache.jasper.compiler.JspConfig(javax.servlet.ServletContext,
>>>> org.apache.jasper.Options);
>>>> public static void makeJspPropertyGroups(java.util.Vector,
>>>> java.util.Vector, java.lang.String, java.lang.String,
>>>> java.lang.String,
>>>> java.lang.String, java.lang.String, java.lang.String,
>>>> java.util.Vector,
>>>> java.util.Vector);
>>>> public org.apache.jasper.compiler.JspProperty
>>>> findJspProperty(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> public boolean isJspPage(java.lang.String) throws
>>>> org.apache.jasper.JasperException;
>>>> static {};
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>