On 9/5/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:
>
> On 5 Sep 07, at 2:49 PM 5 Sep 07, Carlos Sanchez wrote:
>
> > I don't quite get it, are you talking about the method
> > ConfigurationValidationResult validateConfiguration( Configuration
> > configuration )
> > in the embedder?
> >
> > I changed it to store the settings (if there is no error) and the
> > exception (if there is). Before there was no way to know what the
> > problem with the settings was.
> >
> > Couple of comments about the other changes made:
> >
> > * ConfigurationValidationResult
> > changed Throwable to Exception, although in other places like
> > MavenExecutionResult Throwable is being used
> >
> > * setters in interfaces
> > Do we really want setters in the interfaces (MavenExecutionRequest,
> > MavenExecutionResult,...). I don't think they should be there, only in
> > the implementations.
> >
> >
>
> You can't force people to do:
>
>              MavenExecutionRequest request = new
> DefaultMavenExecutionRequest()
>                  .setBaseDirectory( baseDirectory )
>                  .setGoals( goals );
>
> and not allow
>
>              MavenExecutionRequest request = new
> DefaultMavenExecutionRequest();
>            request.setBaseDirectory( baseDirectory ); // won't work
>             request.Goals( goals ); // won't work
>
> So yes, I do want them.

You can do
DefaultMavenExecutionRequest request = new
DefaultMavenExecutionRequest();
request.setBaseDirectory( baseDirectory );
request.Goals( goals );

and then pass it around as MavenExecutionRequest. The fact that they
are needed to create an instance doesn't mean that they are needed in
the interface, it should be used to query for information, not to
provide it.

If for instance you want another implementation of the
MavenExecutionRequest with some default values or one that will query
other objects for them you are forcing the implementation to have
empty setters.


what about the other questions?

>
>
> >
> >
> > On 9/1/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:
> >> Carlos,
> >>
> >> Please put back the validation methods. I don't want to catch
> >> exception to validation user configuration. I want to be able to know
> >> exactly what's wrong. I don't need to throw an exception to find out
> >> the specific settings are not present and I'm using all these methods
> >> extensively.
> >>
> >> Thanks,
> >>
> >> Jason
> >>
> >> ----------------------------------------------------------
> >> Jason van Zyl
> >> Founder and PMC Chair, Apache Maven
> >> jason at sonatype dot com
> >> ----------------------------------------------------------
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > I could give you my word as a Spaniard.
> > No good. I've known too many Spaniards.
> >                              -- The Princess Bride
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to