You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Michael Schommer <mi...@jatomix.de> on 2010/12/09 17:08:19 UTC

SmokeTest

Hi,

I try to build Isis with Maven. I do not know Maven.

I have checked out Isis and "mvn clean install" works on trunk

Now I wanted to continue as described under SmokeTest.

1. When I try "Loading the demo app (into Eclipse)" I get a

Project build error: Non-resolvable import POM: Could not find
artifact org.apache.isis: release: pom :0.1-SNAPSHOT

2. When I try to call "mvn clean install" on support/prototype I get

[ERROR] FATAL ERROR
[INFO] ----------------------------------------------- -------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.isis: release

Reason: POM 'org.apache.isis: release' not found in repository: Unable
to download the artifact from any repository
...



Maybe someone can help me?

Thanks
Michael

Re: SmokeTest

Posted by Dan Haywood <dk...@gmail.com>.
although the "mvn clean install" works fine, Maven 3.0.0 has a different 
site plugin.  I haven't tried it out, but strongly suspect it won't work 
until we do some remedial work.

There is actually a ticket for this, see ISIS-11, and in particular this 
comment [1]

Dan

[1] 
https://issues.apache.org/jira/browse/ISIS-11?focusedCommentId=12933422&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12933422


On 09/12/2010 17:31, Mark Struberg wrote:
> btw, what is the reason that we exclude maven3 from our build?
>
> LieGrue,
> strub
>
> --- On Thu, 12/9/10, Dan Haywood<dk...@gmail.com>  wrote:
>
>> From: Dan Haywood<dk...@gmail.com>
>> Subject: Re: SmokeTest
>> To: isis-dev@incubator.apache.org
>> Date: Thursday, December 9, 2010, 4:28 PM
>> Hi Michael,
>> Thanks for trying this out... the more people we have doing
>> this, the
>> better.
>>
>> The problem is down to an omission on the wiki pages (now
>> fixed) ...
>> "mvn clean install" does not build the release module (see
>> [1]).
>>
>> All you should need to do therefore is also run:
>>
>> mvn clean install -D modules=release
>>
>> This'll take just a second or two to
>> run.   The 'release' module is just
>> a simple POM that defines the set of compatible module
>> versions; this
>> reduces some of the boilerplate in the support/prototype
>> project.
>>
>> So, run that command first and then give it another go.
>>
>> Cheers
>> Dan
>>
>>
>> [1] https://cwiki.apache.org/confluence/display/ISIS/BuildProcess
>>
>> On 09/12/2010 16:08, Michael Schommer wrote:
>>> Hi,
>>>
>>> I try to build Isis with Maven. I do not know Maven.
>>>
>>> I have checked out Isis and "mvn clean install" works
>> on trunk
>>> Now I wanted to continue as described under
>> SmokeTest.
>>> 1. When I try "Loading the demo app (into Eclipse)" I
>> get a
>>> Project build error: Non-resolvable import POM: Could
>> not find
>>> artifact org.apache.isis: release: pom :0.1-SNAPSHOT
>>>
>>> 2. When I try to call "mvn clean install" on
>> support/prototype I get
>>> [ERROR] FATAL ERROR
>>> [INFO] -----------------------------------------------
>> -------------------------
>>> [INFO] Error building POM (may not be this project's
>> POM).
>>>
>>> Project ID: org.apache.isis: release
>>>
>>> Reason: POM 'org.apache.isis: release' not found in
>> repository: Unable
>>> to download the artifact from any repository
>>> ...
>>>
>>>
>>>
>>> Maybe someone can help me?
>>>
>>> Thanks
>>> Michael
>>>
>
>
>

Re: SmokeTest

Posted by Mark Struberg <st...@yahoo.de>.
btw, what is the reason that we exclude maven3 from our build?

LieGrue,
strub

--- On Thu, 12/9/10, Dan Haywood <dk...@gmail.com> wrote:

> From: Dan Haywood <dk...@gmail.com>
> Subject: Re: SmokeTest
> To: isis-dev@incubator.apache.org
> Date: Thursday, December 9, 2010, 4:28 PM
> Hi Michael,
> Thanks for trying this out... the more people we have doing
> this, the 
> better.
> 
> The problem is down to an omission on the wiki pages (now
> fixed) ... 
> "mvn clean install" does not build the release module (see
> [1]).
> 
> All you should need to do therefore is also run:
> 
> mvn clean install -D modules=release
> 
> This'll take just a second or two to
> run.   The 'release' module is just 
> a simple POM that defines the set of compatible module
> versions; this 
> reduces some of the boilerplate in the support/prototype
> project.
> 
> So, run that command first and then give it another go.
> 
> Cheers
> Dan
> 
> 
> [1] https://cwiki.apache.org/confluence/display/ISIS/BuildProcess
> 
> On 09/12/2010 16:08, Michael Schommer wrote:
> > Hi,
> >
> > I try to build Isis with Maven. I do not know Maven.
> >
> > I have checked out Isis and "mvn clean install" works
> on trunk
> >
> > Now I wanted to continue as described under
> SmokeTest.
> >
> > 1. When I try "Loading the demo app (into Eclipse)" I
> get a
> >
> > Project build error: Non-resolvable import POM: Could
> not find
> > artifact org.apache.isis: release: pom :0.1-SNAPSHOT
> >
> > 2. When I try to call "mvn clean install" on
> support/prototype I get
> >
> > [ERROR] FATAL ERROR
> > [INFO] -----------------------------------------------
> -------------------------
> > [INFO] Error building POM (may not be this project's
> POM).
> >
> >
> > Project ID: org.apache.isis: release
> >
> > Reason: POM 'org.apache.isis: release' not found in
> repository: Unable
> > to download the artifact from any repository
> > ...
> >
> >
> >
> > Maybe someone can help me?
> >
> > Thanks
> > Michael
> >
> 


      

Injecting Services into Authenticators (was: Re: SmokeTest)

Posted by Dan Haywood <dk...@gmail.com>.
Hi Michael,
(nb: I've cc'ed this to isis-dev, because I think it should get 
visibility there)


On 12/12/2010 22:01, Michael Schommer wrote:
> Hi Dan,
>
> I'm able to inject a Service to an Authenticator.
>
> The AuthenticationManager becomes a new setter
> setServices(List<Object). In the IsisSessionFactoryAbstract.init() I
> call this setter: authenticationManager.setServices(serviceList).
> So the AuthenticationManager "knows" the services.
>
> I move the three methods injectServices, invokeMethod, invokeSetMethod
> from ServicesInjectorAbstract to an UtilClass in the commons package
> called "InjectorUtil".
>
> The method init() from AuthenticationManagerStandard is called bei the
> Framework and there I inject the services to the Authenticators:
>
>   for (Authenticator authenticator : authenticators) {
>              InjectUtil.injectServices(authenticator, serviceList);
>              authenticator.init();
>          }
> 		
> This all works fine.
>
> But ... when I call a method of the injected Service in the
> Authenticator I get a "java.lang.IllegalStateException: No Session
> opened for this thread".
>
> Maybe you can help me a little bit.
>
> Do I need an AuthenticationSession to open an IsisSession or is there
> an other way?
> Can I open a session before the Authenticator is called or is my
> solution completely wrong?
>
Appreciate you spending the time on this.

I'm quite surprised that your service is requiring an IsisSession, 
though I guess it depends on the particular implementation of your 
service.  I was imagining you'd be calling some system-level API outside 
of Isis itself, but given you've got this error, it would seem not?

Anyway, as you correctly surmise, an AuthenticationSession is required 
in order to create an IsisSession.  At least as far as mapping this onto 
webapps, an AuthenticationSession is analogous to an HttpSession, 
whereas an IsisSession is more equivalent to an HttpRequest.  It's 
different on the DnD client, but even then the AuthenticationSession has 
a larger scope than the IsisSession.

It would seem that my concern about scoping is biting us here, even if 
not in quite the way I anticipated.

To answer your question: yes, it is possible to create a "dummy" 
AuthenticationSession.  If you look at the subclasses, you'll see 
InitialisationSession, which we use for installing fixtures.  And 
there's also ExplorationSession, which is used when running in 
exploration mode (ie requiring no login).

By all means have a go at just instantiating one of those and see if you 
can hack something together.  I do think we'll need to review what you 
end up with; I'm guessing it's gonna be something like (all in the 
AuthenticationManager):
- create an InitialisationSession for the purposes of doing authentication
- open an IsisSession using this InitialisationSession
- delegate to the Authenticator and authenticate the credentials
- close the IsisSession
- close the InitialisationSession
- return the "real" AuthenticationSession for use in the main interaction.

... which may work, but does sound rather complicated!

Dan



> Thanks
> Michael
>
>
>
>>
>>> Now, I take a look at the Authenticator this weekend. Writing an
>>> Authenticator is very easy, you're right. But why don’t use Isis for
>>> the security infrastructure. With Isis it’s easy to manage the Users
>>> with Passwords and Roles. So, why don’t inject a service to an
>>> Authenticator?
>> It's not a bad idea, I do admit.  Why don't you raise a ticket on JIRA for
>> us, with a code sketch if how it would work in your current use case?
>>
>> It should be pretty trivial to implement... just looking at the code, the
>> services get instantiated initially and live with PersistenceSessionFactory.
>>   We just need to find a way to give them to the
>> AuthenticationManagerInstaller, from which it could propogate into
>> AuthenticationManager / Authenticator as required.
>>
>> Cheers
>> Dan
>

Re: SmokeTest

Posted by Dan Haywood <dk...@gmail.com>.
Hi Michael,
Thanks for trying this out... the more people we have doing this, the 
better.

The problem is down to an omission on the wiki pages (now fixed) ... 
"mvn clean install" does not build the release module (see [1]).

All you should need to do therefore is also run:

mvn clean install -D modules=release

This'll take just a second or two to run.   The 'release' module is just 
a simple POM that defines the set of compatible module versions; this 
reduces some of the boilerplate in the support/prototype project.

So, run that command first and then give it another go.

Cheers
Dan


[1] https://cwiki.apache.org/confluence/display/ISIS/BuildProcess

On 09/12/2010 16:08, Michael Schommer wrote:
> Hi,
>
> I try to build Isis with Maven. I do not know Maven.
>
> I have checked out Isis and "mvn clean install" works on trunk
>
> Now I wanted to continue as described under SmokeTest.
>
> 1. When I try "Loading the demo app (into Eclipse)" I get a
>
> Project build error: Non-resolvable import POM: Could not find
> artifact org.apache.isis: release: pom :0.1-SNAPSHOT
>
> 2. When I try to call "mvn clean install" on support/prototype I get
>
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------- -------------------------
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: org.apache.isis: release
>
> Reason: POM 'org.apache.isis: release' not found in repository: Unable
> to download the artifact from any repository
> ...
>
>
>
> Maybe someone can help me?
>
> Thanks
> Michael
>