You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2006/01/12 15:01:05 UTC

[maven] Weird dependency problem

I'm trying to run Bruno's patches which fix the unit tests (nice work
by the way!)  Anyways, one of the tests in commons requires
MockFacesContext which is in api.  The issue is that it can't find
MockFacesContext even with the commons-api dependency.  This is
because the mock stuff is in the *test* resources and so is not made
available to other modules with a dependency on api.

The only solution I can think of is to move the MockFacesContext to
commons but that introduces a circular dependency issue.  We could
have two copies of the mock object I suppose ... (or one of them could
be a private inner class.)

Ideas?

Sean

Re: [maven] Weird dependency problem

Posted by Sean Schofield <se...@gmail.com>.
Great.  Everything works now!

Sean

On 1/12/06, Bernd Bohmann <be...@atanion.com> wrote:
> Hello Sean,
>
> I commit one missing change.
> The change was very easy you don't need a own MockObject for easymock :-)
>
>
> Have a nice day
>
> Bernd
>
>
> Sean Schofield schrieb:
> > Yes but it was causing all sorts of issues because I already applied
> > your earlier patch.  Do you have karma yet?  Go ahead and update my
> > latest commits.  If you don't have karma yet I can apply another
> > patch.
> >
> > Also there are still a few errors (not failures) in the commons tests.
> >  Maybe your latest patch solves this?
> >
> > Sean
> >
> > On 1/12/06, Bernd Bohmann <be...@atanion.com> wrote:
> >
> >>Where is the MockFacesContext used?
> >>
> >>In MessageUtilTest MockFacesContext is not needed, have you received my
> >>last patch for commons?
> >>
> >>Bernd
> >>
> >>Sean Schofield schrieb:
> >>
> >>>I'm trying to run Bruno's patches which fix the unit tests (nice work
> >>>by the way!)  Anyways, one of the tests in commons requires
> >>>MockFacesContext which is in api.  The issue is that it can't find
> >>>MockFacesContext even with the commons-api dependency.  This is
> >>>because the mock stuff is in the *test* resources and so is not made
> >>>available to other modules with a dependency on api.
> >>>
> >>>The only solution I can think of is to move the MockFacesContext to
> >>>commons but that introduces a circular dependency issue.  We could
> >>>have two copies of the mock object I suppose ... (or one of them could
> >>>be a private inner class.)
> >>>
> >>>Ideas?
> >>>
> >>>Sean
> >>>
> >>
> >>--
> >>Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
> >>Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
> >>phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
> >>
> >
> >
>
> --
> Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
> Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
> phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
>

Re: [maven] Weird dependency problem

Posted by Bernd Bohmann <be...@atanion.com>.
Hello Sean,

I commit one missing change.
The change was very easy you don't need a own MockObject for easymock :-)


Have a nice day

Bernd


Sean Schofield schrieb:
> Yes but it was causing all sorts of issues because I already applied
> your earlier patch.  Do you have karma yet?  Go ahead and update my
> latest commits.  If you don't have karma yet I can apply another
> patch.
> 
> Also there are still a few errors (not failures) in the commons tests.
>  Maybe your latest patch solves this?
> 
> Sean
> 
> On 1/12/06, Bernd Bohmann <be...@atanion.com> wrote:
> 
>>Where is the MockFacesContext used?
>>
>>In MessageUtilTest MockFacesContext is not needed, have you received my
>>last patch for commons?
>>
>>Bernd
>>
>>Sean Schofield schrieb:
>>
>>>I'm trying to run Bruno's patches which fix the unit tests (nice work
>>>by the way!)  Anyways, one of the tests in commons requires
>>>MockFacesContext which is in api.  The issue is that it can't find
>>>MockFacesContext even with the commons-api dependency.  This is
>>>because the mock stuff is in the *test* resources and so is not made
>>>available to other modules with a dependency on api.
>>>
>>>The only solution I can think of is to move the MockFacesContext to
>>>commons but that introduces a circular dependency issue.  We could
>>>have two copies of the mock object I suppose ... (or one of them could
>>>be a private inner class.)
>>>
>>>Ideas?
>>>
>>>Sean
>>>
>>
>>--
>>Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
>>Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
>>phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
>>
> 
> 

-- 
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333

Re: [maven] Weird dependency problem

Posted by Sean Schofield <se...@gmail.com>.
Yes but it was causing all sorts of issues because I already applied
your earlier patch.  Do you have karma yet?  Go ahead and update my
latest commits.  If you don't have karma yet I can apply another
patch.

Also there are still a few errors (not failures) in the commons tests.
 Maybe your latest patch solves this?

Sean

On 1/12/06, Bernd Bohmann <be...@atanion.com> wrote:
> Where is the MockFacesContext used?
>
> In MessageUtilTest MockFacesContext is not needed, have you received my
> last patch for commons?
>
> Bernd
>
> Sean Schofield schrieb:
> > I'm trying to run Bruno's patches which fix the unit tests (nice work
> > by the way!)  Anyways, one of the tests in commons requires
> > MockFacesContext which is in api.  The issue is that it can't find
> > MockFacesContext even with the commons-api dependency.  This is
> > because the mock stuff is in the *test* resources and so is not made
> > available to other modules with a dependency on api.
> >
> > The only solution I can think of is to move the MockFacesContext to
> > commons but that introduces a circular dependency issue.  We could
> > have two copies of the mock object I suppose ... (or one of them could
> > be a private inner class.)
> >
> > Ideas?
> >
> > Sean
> >
>
> --
> Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
> Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
> phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
>

Re: [maven] Weird dependency problem

Posted by Bernd Bohmann <be...@atanion.com>.
Where is the MockFacesContext used?

In MessageUtilTest MockFacesContext is not needed, have you received my 
last patch for commons?

Bernd

Sean Schofield schrieb:
> I'm trying to run Bruno's patches which fix the unit tests (nice work
> by the way!)  Anyways, one of the tests in commons requires
> MockFacesContext which is in api.  The issue is that it can't find
> MockFacesContext even with the commons-api dependency.  This is
> because the mock stuff is in the *test* resources and so is not made
> available to other modules with a dependency on api.
> 
> The only solution I can think of is to move the MockFacesContext to
> commons but that introduces a circular dependency issue.  We could
> have two copies of the mock object I suppose ... (or one of them could
> be a private inner class.)
> 
> Ideas?
> 
> Sean
> 

-- 
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333

Re: [maven] Weird dependency problem

Posted by Wendy Smoak <ws...@gmail.com>.
On 1/12/06, Sean Schofield <se...@gmail.com> wrote:

> As a starting point I think we should investigate what Shale has to
> offer.  I imagine there is a lot of overlap between our testing needs.

The 1.0.0 (graded alpha) and 1.0.1-SNAPSHOT (currently 20060113
nightly) jars are in the internal m1 repo, which you can use by
telling m2 that it has a 'legacy' layout.

      <repository>
         <id>apache-internal</id>
         <name>Apache Internal Repository</name>
         <url>http://cvs.apache.org/repository</url>
         <layout>legacy</layout>
      </repository>

Eventually I'd like to get these into the internal m2 snapshot
repository, but I don't have m2 poms yet for Shale.

   http://cvs.apache.org/repository/struts/jars/
   http://struts.apache.org/struts-shale/features-test-framework.html
   http://struts.apache.org/struts-shale/shale-test/apidocs/index.html

Since depending on snapshots would be a problem for MyFaces releases,
I thought you might establish a sandbox/test project and try this out
without changing the current tests.

HTH,
--
Wendy

Re: [maven] Weird dependency problem

Posted by Craig McClanahan <cr...@apache.org>.
On 1/12/06, Sean Schofield <se...@gmail.com> wrote:
>
> As a starting point I think we should investigate what Shale has to
> offer.  I imagine there is a lot of overlap between our testing needs.


+1.  We'd want to make sure that all the needs for both groups were met so
we could skip any redundant implementation efforts.

Regarding Bernd's question, there is no set schedule for a separate release,
but we could build such a plan pretty quickly if it became apparant that
this would be useful.

Sean


Craig

Re: [maven] Weird dependency problem

Posted by Sean Schofield <se...@gmail.com>.
As a starting point I think we should investigate what Shale has to
offer.  I imagine there is a lot of overlap between our testing needs.

Sean

On 1/12/06, Bernd Bohmann <be...@atanion.com> wrote:
>
>
> Craig McClanahan schrieb:
>
> > The Shale test framework depends only on the servlet, JSP, and JSF apis
> > ... it has no dependencies on the rest of Shale.  It is packaged in a
> > manner where the test framework could be released separately from an
> > overall Shale release, if that becomes appropriate.
> >
> > The current framework implements everything I needed to test the Shale
> > framework components themselves, plus the example applications.  There
> > are still quite a few UnsupportedOperationException exceptions, but the
> > intent is to fill in the implementations of those methods as they become
> > needed.  Other users are starting to provide patches for this kind of
> > thing as well.
> >
> >
> > Craig
>
> Would be nice.
>
> When you expect a release of the shale test framework?
>
> A myfaces release should not have a dependency to a shale test snapshot
> or any snapshot.
>
> Maybe we can migrate to the shale test framework after a release of the
> share test framework.
>
> Regards
>
> Bernd
>

Re: [maven] Weird dependency problem

Posted by Bernd Bohmann <be...@atanion.com>.

Craig McClanahan schrieb:

> The Shale test framework depends only on the servlet, JSP, and JSF apis 
> ... it has no dependencies on the rest of Shale.  It is packaged in a 
> manner where the test framework could be released separately from an 
> overall Shale release, if that becomes appropriate.
> 
> The current framework implements everything I needed to test the Shale 
> framework components themselves, plus the example applications.  There 
> are still quite a few UnsupportedOperationException exceptions, but the 
> intent is to fill in the implementations of those methods as they become 
> needed.  Other users are starting to provide patches for this kind of 
> thing as well.
> 
> 
> Craig

Would be nice.

When you expect a release of the shale test framework?

A myfaces release should not have a dependency to a shale test snapshot 
or any snapshot.

Maybe we can migrate to the shale test framework after a release of the 
share test framework.

Regards

Bernd

Re: [maven] Weird dependency problem

Posted by Craig McClanahan <cr...@apache.org>.
On 1/12/06, Sean Schofield <se...@gmail.com> wrote:
>
> Temproarily I have fixed this by copying the MockFacesContext and
> making it a inner class called MockFacesContext2.  We should probably
> come up with something better long term though.
>
> Maybe we could use the Shale Test Framework.  Its already got a lot of
> mock objects for JSF.  I haven't looked at it too carefully but I
> think we should consider it.  Since its only for unit tests I don't
> see the problem of having a dependency on Shale.  Although the unit
> tests probably depend on myfaces-api so maybe we run into the same
> issue?


The Shale test framework depends only on the servlet, JSP, and JSF apis ...
it has no dependencies on the rest of Shale.  It is packaged in a manner
where the test framework could be released separately from an overall Shale
release, if that becomes appropriate.

The current framework implements everything I needed to test the Shale
framework components themselves, plus the example applications.  There are
still quite a few UnsupportedOperationException exceptions, but the intent
is to fill in the implementations of those methods as they become needed.
Other users are starting to provide patches for this kind of thing as well.

Sean


Craig


On 1/12/06, Sean Schofield <se...@gmail.com> wrote:
> > I'm trying to run Bruno's patches which fix the unit tests (nice work
> > by the way!)  Anyways, one of the tests in commons requires
> > MockFacesContext which is in api.  The issue is that it can't find
> > MockFacesContext even with the commons-api dependency.  This is
> > because the mock stuff is in the *test* resources and so is not made
> > available to other modules with a dependency on api.
> >
> > The only solution I can think of is to move the MockFacesContext to
> > commons but that introduces a circular dependency issue.  We could
> > have two copies of the mock object I suppose ... (or one of them could
> > be a private inner class.)
> >
> > Ideas?
> >
> > Sean
> >
>

Re: [maven] Weird dependency problem

Posted by Sean Schofield <se...@gmail.com>.
Temproarily I have fixed this by copying the MockFacesContext and
making it a inner class called MockFacesContext2.  We should probably
come up with something better long term though.

Maybe we could use the Shale Test Framework.  Its already got a lot of
mock objects for JSF.  I haven't looked at it too carefully but I
think we should consider it.  Since its only for unit tests I don't
see the problem of having a dependency on Shale.  Although the unit
tests probably depend on myfaces-api so maybe we run into the same
issue?

Sean

On 1/12/06, Sean Schofield <se...@gmail.com> wrote:
> I'm trying to run Bruno's patches which fix the unit tests (nice work
> by the way!)  Anyways, one of the tests in commons requires
> MockFacesContext which is in api.  The issue is that it can't find
> MockFacesContext even with the commons-api dependency.  This is
> because the mock stuff is in the *test* resources and so is not made
> available to other modules with a dependency on api.
>
> The only solution I can think of is to move the MockFacesContext to
> commons but that introduces a circular dependency issue.  We could
> have two copies of the mock object I suppose ... (or one of them could
> be a private inner class.)
>
> Ideas?
>
> Sean
>