Here is another idea,
release plugin should be able issue lock command before editing the pom file base
on an optional param. So for clearcase and starteam ( with some policy setting at server side)
user would need to set lockBeforeEdit=true. This way we dont have to change
scm interface which may impact other provider implementations.
-Dan
On 11/18/05, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
Well, I was just looking through the SVN manual to better understand the methods in the ScmProvider interface and they talk about a "lock-edit-unlock" cycle in the way you talk. But I think edit/unedit might be clearer. Unedit would then do the same as checkin. Agreed?
So we would have the following methods in the interface:
EditScmResult edit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException;
UneditScmResult unedit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException;
Wouldn't it be even better to define a subinterface EditCycleScmProvider or something like that, that extends ScmProvider. The release plugin would be able to check on that interface to do the edit() command before trying to alter the pom.xml. What do you think?
regards,
Wim
2005/11/18, Emmanuel Venisse <[EMAIL PROTECTED]>:ok, i thought to lock for "lock file for other users".
I'm agree to rename lock/unlock commands to edit/unedit commands. Are you ok?
Emmanuel
Wim Deblauwe a écrit :
> So I would need to update the ScmProvider interface with a new method
> "lock"? Wouldn't it be better to call it "unlock"?
>
> In ClearCase we have checkout -> this means unlock the file for editing.
> We also have checkin. You do this after you have edited the file and
> want your changes to be in clearcase. That would be more like lock or is
> the meaning of checkIn method in ScmProvider?
>
> regards,
>
> Wim
>
>
> 2005/11/18, Emmanuel Venisse < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>:
>
> I purpose to implement lock command (similar to "edit the file" in
> maven scm terms) and
> patch release plugin to run this command if provider is clearcase.
>
> If you need some help for the patch, i'll can help you.
>
> Emmanuel
>
> Wim Deblauwe a écrit :
> > More info on the clearcase progress: I got the status command
> working.
> > It will notice if there are files checked out (reserved and
> unreserved).
> > It will not know if you have forgotten to add a file (due to the way
> > that clearcase works).
> >
> > Anyway, now I get this:
> >
> > [INFO] Cannot write released version of pom to:
> > Y:\wim_test_vob\modules\utils\utils-logging-jar\pom.xml
> >
> > Embedded error:
> Y:\wim_test_vob\modules\utils\utils-logging-jar\pom.xml
> > (Access is denied)
> >
> > In ClearCase terms, you would need to do a 'checkout' first to be
> able
> > to edit the file. What method should I override to do this?
> >
> > regards,
> >
> > Wim
> >
> >
> >
> > 2005/11/18, Wim Deblauwe < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>>:
> >
> > Hey,
> >
> > the good news: I got rid of the message
> > the bad news: I have no clue if it really executes my clearcase
> > command. I've put a debug string in there, but it is never
> printed.
> > I used getLogger().debug(), getLogger().info() and
> > getLogger().error(). I also tried with mvn -X, but never ever
> I saw
> > something printed.
> > Somehow it has to come through my code, otherwise I will
> still get
> > the error message.
> >
> > any ideas?
> >
> > regards,
> >
> > Wim
> >
> > 2005/11/18, Emmanuel Venisse < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>:
> >
> > Great.
> >
> > Personnally, i prefer to not get this message ;-)
> >
> > Emmanuel
> >
> > Wim Deblauwe a écrit :
> >> Thanks a million, I now get "status not implemented", which is
> > what I
> >> wanted (well, until I've implemented it ofcourse) :)
> >>
> >> regards,
> >>
> >> Wim
> >>
> >> 2005/11/18, Emmanuel Venisse <[EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>
> > <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>
> >> <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>>>:
> >>
> >> Add this in release plugin pom.xml :
> >>
> >> <dependency>
> >> <groupId> org.apache.maven.scm</groupId>
> >> <artifactId>maven-scm-provider-clearcase</artifactId>
> >> <version> 1.0-beta-2-SNAPSHOT</version>
> >> </dependency>
> >>
> >> Other solution (if you don't want to modify release plugin
> > pom now)
> >> is to add it in
> >> release plugin configuration in your project
> >>
> >> <build>
> >> ...
> >> <plugins>
> >> <plugin>
> >> <artifactId>maven-release-plugin</artifactId>
> >> <dependencies>
> >> <dependency>
> >> <groupId> org.apache.maven.scm </groupId>
> >> <artifactId>maven-scm-provider-svn</artifactId>
> >> <version>1.0-alpha-4</version>
> >> </dependency>
> >> </dependencies>
> >> </plugin>
> >> </plugins>
> >> ...
> >> </build>
> >> Emmanuel
> >>
> >> Wim Deblauwe a écrit :
> >> > Do you have a small example on how to do that? I was
> > looking at
> >> > http://maven.apache.org/plugins/maven-release-plugin/
> <http://maven.apache.org/plugins/maven-release-plugin/>
> > but I can't
> >> seem
> >> > to find info on adding a new provider there.
> >> >
> >> > regards,
> >> >
> >> > Wim
> >> >
> >> > 2005/11/17, Brett Porter < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> >> <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>>
> > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>
> >> <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>>>>:
> >> >
> >> > You can also add it within the plugin tag in your pom
> >> >
> >> > Emmanuel Venisse wrote:
> >> > > you need to update the release plugin pom and
> > rebuild it.
> >> > >
> >> > > you need for release plugin tag, checkin,
> > checkout, update
> >> remove
> >> > and
> >> > > status commands.
> >> > >
> >> > > Emmanuel
> >> > >
> >> >
> >> >
> >>
> >>
> >
> >
> >
>
>