Making scm connection optional

View: New views
8 Messages — Rating Filter:   Alert me  

Making scm connection optional

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Currently when you add a Maven 2 project to Continuum, it complains if
you don't have a scm connection url in the pom.

Can this be optional?  If it's not present, just assume that the url
you were given to fetch the pom from is also the scm url.  I'd be fine
with defaulting to svn, but we could make that configurable.

The scm elements are only really required for releases, and not
everyone uses the release feature of Maven/Continuum.

WDYT?  (The feature request came from a Hudson user I talked to at AC EU.)

--
Wendy

Re: Making scm connection optional

by Stuart James Penrose-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wendy Smoak wrote:

> Currently when you add a Maven 2 project to Continuum, it complains if
> you don't have a scm connection url in the pom.
>
> Can this be optional?  If it's not present, just assume that the url
> you were given to fetch the pom from is also the scm url.  I'd be fine
> with defaulting to svn, but we could make that configurable.
>
> The scm elements are only really required for releases, and not
> everyone uses the release feature of Maven/Continuum.
>
> WDYT?  (The feature request came from a Hudson user I talked to at AC EU.)
>

Just an incompletely fleshed-out opinion from a lurker: I agree.
Specifically, I think this would gel better with SCMs like mercurial and
bazaar, where the fluidity of branching makes the burden of keeping the
scm urls up-to-date very restricting.


Stu Penrose

Re: Making scm connection optional

by Emmanuel Venisse-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Apr 8, 2008 at 9:17 PM, Wendy Smoak <wsmoak@...> wrote:

> Currently when you add a Maven 2 project to Continuum, it complains if
> you don't have a scm connection url in the pom.
>
> Can this be optional?  If it's not present, just assume that the url
> you were given to fetch the pom from is also the scm url.  I'd be fine
> with defaulting to svn, but we could make that configurable.
>
> The scm elements are only really required for releases, and not
> everyone uses the release feature of Maven/Continuum.
>
> WDYT?  (The feature request came from a Hudson user I talked to at AC EU.)
>

I don't have an opinion about it so if we have a request for it and you
think it's ok, so it's ok for me.
A new parameter to add.

Emmanuel

Re: Making scm connection optional

by jgifford :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've ran into this issue with Continuum 1.1 and removing the 'connection' element from the pom's repository section.  We removed the 'connection' element because the documentation site generation features for Maven uses that element to indicate that a repository has anonymous access.  In our case this is totally bogus, so we removed the element to correct this information in the site documentation that is generated.  

With the element removed, Continuum 1.1 works, but we get two builds now.  One that always fails indicating that the 'update-project-from-working-directory' could not be executed.  With this, the version information that is usually updated is not being updated.   The second one is the actual build and that works as expected.

Hope this helps,

Johnathan

Re: Making scm connection optional

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 28, 2008 at 8:05 AM, jgifford <jgifford@...> wrote:

> I've ran into this issue with Continuum 1.1 and removing the 'connection'
> element from the pom's repository section.  We removed the 'connection'
> element because the documentation site generation features for Maven uses
> that element to indicate that a repository has anonymous access.  In our
> case this is totally bogus, so we removed the element to correct this
> information in the site documentation that is generated.

It sounds like you've removed <scm><connection> but left
<developerConnection>.  I'm actually talking about making the entire
scm section optional for normal builds.

You can configure the scm report to use different urls than the pom
uses-- I added this because the module the site is published from is
often not the same place that you want to list as the location of the
source code.  (But I'm not sure you can _un_set the connection param--
probably if you leave it blank it's going to default back to the pom
value. :( )
 * http://maven.apache.org/plugins/maven-project-info-reports-plugin/scm-mojo.html

> With the element removed, Continuum 1.1 works, but we get two builds now.
> One that always fails indicating that the
> 'update-project-from-working-directory' could not be executed.  With this,
> the version information that is usually updated is not being updated.   The
> second one is the actual build and that works as expected.

Can you explain more about getting two builds?  Do you have the
project added twice or multiple build definitions?

--
Wendy

Re: Making scm connection optional

by jgifford :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wendy Smoak-3 wrote:
Can you explain more about getting two builds?  Do you have the
project added twice or multiple build definitions?
We do have multiple build definitions for each member project, but our scheduler invokes only one of the build definitions.  But the Build results for the member project has two results for any execution of that build definition no matter if it was manually executed or scheduled.  I can send you a screen shot if that would help.  I'm not sure I can send it through mailing list though, so it'll have to be directly to you.

Re: Making scm connection optional

by jgifford :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found this documentation on the Maven site that sheds a bit more light on the subject and why I removed the connection element from the scm configuration for the project.

http://maven.apache.org/plugins/maven-project-info-reports-plugin/examples/scm-report.html#How_to_exclude_SCM_anonymous_access_info

I believe the removal of the connection element is the cause of the two build executions for a build definition.  It looks like Continuum needs the value to read and update the project member's build information and Maven uses to display anonymous access in the site documentation generator.  I think a previous post to this thread asked why the URL couldn't be pulled from the values set in Continuum.  This might be a better a choice in the next release of Continuum.

Re: Making scm connection optional

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Apr 8, 2008 at 12:23 PM, Stuart James Penrose <stu@...> wrote:

> Just an incompletely fleshed-out opinion from a lurker: I agree.
> Specifically, I think this would gel better with SCMs like mercurial and
> bazaar, where the fluidity of branching makes the burden of keeping the scm
> urls up-to-date very restricting.

I spent some time this weekend looking around to see how hard this
would be... there's a branch [1] and some comments on the issue [2].
I realized today that none of that is visible if you're only watching
the dev list. :)

I found that the original pom url entered by the user was lost very
early-- code in the action was mangling it to include the credentials.
 Then that url gets passed around all over.  I removed that bit, so on
the branch you currently can't add a pom that requires auth.  I'm now
pondering what to do about the dozen or so method signatures that
would have to be changed if I am to pass the url, userid, and password
separately.  Comments welcome...

[1] https://svn.apache.org/repos/asf/continuum/branches/CONTINUUM-1721
[2] http://jira.codehaus.org/browse/CONTINUUM-1721

--
Wendy
LightInTheBox - Buy quality products at wholesale price!