[xwik-devs] Local maven repository in Extension Manager

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[xwik-devs] Local maven repository in Extension Manager

Krzysiek Płachno
Hi,

I want to connect local maven repository Extension Manager (and so
Extension Repository) according to http://platform.xwiki.org/
xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensionManager

In 'xwiki.properties' I put following line:
*extension.repositories=maven-local:maven:file:///C:/Users/Krzysztof/.m2/repository/*
It was discovered by XWiki since in Repository Application it's visible:
http://i.imgur.com/ep9yazr.png

When I try to import extension from local repository (that is present
there) I get exception: http://i.imgur.com/PucSgOL.png
Full stack trace: https://pastebin.com/iUnJ29wm

What may be the problem? Url to local repository (
*file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I paste it
in browser I can access this directory flawlessly.
I'm working on Windows. (url with backslashes, escaped or not, is not
recognized by xwiki)

Thanks in advance!
Krzysztof
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

vmassol
Administrator
Hi,

> On 21 Apr 2017, at 15:48, Krzysiek Płachno <[hidden email]> wrote:
>
> Hi,
>
> I want to connect local maven repository Extension Manager (and so
> Extension Repository) according to http://platform.xwiki.org/
> xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensionManager
>
> In 'xwiki.properties' I put following line:
> *extension.repositories=maven-local:maven:file:///C:/Users/Krzysztof/.m2/repository/*
> It was discovered by XWiki since in Repository Application it's visible:
> http://i.imgur.com/ep9yazr.png
>
> When I try to import extension from local repository (that is present
> there) I get exception: http://i.imgur.com/PucSgOL.png
> Full stack trace: https://pastebin.com/iUnJ29wm
>
> What may be the problem? Url to local repository (
> *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I paste it
> in browser I can access this directory flawlessly.
> I'm working on Windows. (url with backslashes, escaped or not, is not
> recognized by xwiki)

In your title you say "Local maven repository in Extension Manager”. This works for sure and once you’ve aded "extension.repositories=maven-local:maven:…” in xwiki.properties, you can then using the Extension Manager admin UI to install extensions (using advanced search).

Now according to http://i.imgur.com/ep9yazr.png you seem to be using the Repository Application (http://extensions.xwiki.org/xwiki/bin/view/Extension/Repository%20Application). Is that correct? I have no idea if this app works with a local maven repo.

Thanks
-Vincent

>
> Thanks in advance!
> Krzysztof

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

Krzysiek Płachno
Firstly I was trying with Extension Manager and it didn't worked with no
information why. That's why I moved to testing it via Repository
Application (since it uses the same configuration of repositories) which
prints stacktrace.
During testing I made some corrections to URL and now when I tested again
Extension Manager it started working.

So problem with Extension Manager no longer exists, but I still don't know
what's wrong with Repository Application.

Thanks ;)
Krzysztof


2017-04-21 16:16 GMT+02:00 Vincent Massol <[hidden email]>:

> Hi,
>
> > On 21 Apr 2017, at 15:48, Krzysiek Płachno <[hidden email]>
> wrote:
> >
> > Hi,
> >
> > I want to connect local maven repository Extension Manager (and so
> > Extension Repository) according to http://platform.xwiki.org/
> > xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensionManager
> >
> > In 'xwiki.properties' I put following line:
> > *extension.repositories=maven-local:maven:file:///C:/Users/
> Krzysztof/.m2/repository/*
> > It was discovered by XWiki since in Repository Application it's visible:
> > http://i.imgur.com/ep9yazr.png
> >
> > When I try to import extension from local repository (that is present
> > there) I get exception: http://i.imgur.com/PucSgOL.png
> > Full stack trace: https://pastebin.com/iUnJ29wm
> >
> > What may be the problem? Url to local repository (
> > *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I paste
> it
> > in browser I can access this directory flawlessly.
> > I'm working on Windows. (url with backslashes, escaped or not, is not
> > recognized by xwiki)
>
> In your title you say "Local maven repository in Extension Manager”. This
> works for sure and once you’ve aded "extension.repositories=maven-local:maven:…”
> in xwiki.properties, you can then using the Extension Manager admin UI to
> install extensions (using advanced search).
>
> Now according to http://i.imgur.com/ep9yazr.png you seem to be using the
> Repository Application (http://extensions.xwiki.org/
> xwiki/bin/view/Extension/Repository%20Application). Is that correct? I
> have no idea if this app works with a local maven repo.
>
> Thanks
> -Vincent
>
> >
> > Thanks in advance!
> > Krzysztof
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

Thomas Mortagne
Administrator
There is nothing special about Repository Application. It's getting
the extension trough Extension Manager.

The problem is that Maven does not generate the maven-metadata.xml
file in local repository which as you can see in the error contains
the available versions. I can see there is a maven-metadata-local.xml
file but looks like Aether does not support it (or maybe Aether needs
to be configured to look at it).

Given your use case I don't think you need to use the Maven local
repository. You should do the same as extensions.xwiki.org and import
extension from the default Maven repository ("maven-xwiki"). The only
constraint is that you need internet access during the import. IF you
really can't do that then I guess the easiest for you would be to copy
the maven-metadata-local.xml into maven-metadata.xml in your local
repository for the extension you want to import.

On Fri, Apr 21, 2017 at 11:50 PM, Krzysiek Płachno
<[hidden email]> wrote:

> Firstly I was trying with Extension Manager and it didn't worked with no
> information why. That's why I moved to testing it via Repository
> Application (since it uses the same configuration of repositories) which
> prints stacktrace.
> During testing I made some corrections to URL and now when I tested again
> Extension Manager it started working.
>
> So problem with Extension Manager no longer exists, but I still don't know
> what's wrong with Repository Application.
>
> Thanks ;)
> Krzysztof
>
>
> 2017-04-21 16:16 GMT+02:00 Vincent Massol <[hidden email]>:
>
>> Hi,
>>
>> > On 21 Apr 2017, at 15:48, Krzysiek Płachno <[hidden email]>
>> wrote:
>> >
>> > Hi,
>> >
>> > I want to connect local maven repository Extension Manager (and so
>> > Extension Repository) according to http://platform.xwiki.org/
>> > xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensionManager
>> >
>> > In 'xwiki.properties' I put following line:
>> > *extension.repositories=maven-local:maven:file:///C:/Users/
>> Krzysztof/.m2/repository/*
>> > It was discovered by XWiki since in Repository Application it's visible:
>> > http://i.imgur.com/ep9yazr.png
>> >
>> > When I try to import extension from local repository (that is present
>> > there) I get exception: http://i.imgur.com/PucSgOL.png
>> > Full stack trace: https://pastebin.com/iUnJ29wm
>> >
>> > What may be the problem? Url to local repository (
>> > *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I paste
>> it
>> > in browser I can access this directory flawlessly.
>> > I'm working on Windows. (url with backslashes, escaped or not, is not
>> > recognized by xwiki)
>>
>> In your title you say "Local maven repository in Extension Manager”. This
>> works for sure and once you’ve aded "extension.repositories=maven-local:maven:…”
>> in xwiki.properties, you can then using the Extension Manager admin UI to
>> install extensions (using advanced search).
>>
>> Now according to http://i.imgur.com/ep9yazr.png you seem to be using the
>> Repository Application (http://extensions.xwiki.org/
>> xwiki/bin/view/Extension/Repository%20Application). Is that correct? I
>> have no idea if this app works with a local maven repo.
>>
>> Thanks
>> -Vincent
>>
>> >
>> > Thanks in advance!
>> > Krzysztof
>>
>>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

Krzysiek Płachno
2017-04-24 9:26 GMT+02:00 Thomas Mortagne <[hidden email]>:

> There is nothing special about Repository Application. It's getting
> the extension trough Extension Manager.
>
> The problem is that Maven does not generate the maven-metadata.xml
> file in local repository which as you can see in the error contains
> the available versions. I can see there is a maven-metadata-local.xml
> file but looks like Aether does not support it (or maybe Aether needs
> to be configured to look at it).
>
> Given your use case I don't think you need to use the Maven local
> repository. You should do the same as extensions.xwiki.org and import
> extension from the default Maven repository ("maven-xwiki"). The only
> constraint is that you need internet access during the import. IF you
> really can't do that then I guess the easiest for you would be to copy
> the maven-metadata-local.xml into maven-metadata.xml in your local
> repository for the extension you want to import.
>

The case is I want to test the modified extension locally. So after a build
of extension locally I want to import it to running XWiki from local maven
repo.




>
> On Fri, Apr 21, 2017 at 11:50 PM, Krzysiek Płachno
> <[hidden email]> wrote:
> > Firstly I was trying with Extension Manager and it didn't worked with no
> > information why. That's why I moved to testing it via Repository
> > Application (since it uses the same configuration of repositories) which
> > prints stacktrace.
> > During testing I made some corrections to URL and now when I tested again
> > Extension Manager it started working.
> >
> > So problem with Extension Manager no longer exists, but I still don't
> know
> > what's wrong with Repository Application.
> >
> > Thanks ;)
> > Krzysztof
> >
> >
> > 2017-04-21 16:16 GMT+02:00 Vincent Massol <[hidden email]>:
> >
> >> Hi,
> >>
> >> > On 21 Apr 2017, at 15:48, Krzysiek Płachno <[hidden email]
> >
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I want to connect local maven repository Extension Manager (and so
> >> > Extension Repository) according to http://platform.xwiki.org/
> >> > xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensionManager
> >> >
> >> > In 'xwiki.properties' I put following line:
> >> > *extension.repositories=maven-local:maven:file:///C:/Users/
> >> Krzysztof/.m2/repository/*
> >> > It was discovered by XWiki since in Repository Application it's
> visible:
> >> > http://i.imgur.com/ep9yazr.png
> >> >
> >> > When I try to import extension from local repository (that is present
> >> > there) I get exception: http://i.imgur.com/PucSgOL.png
> >> > Full stack trace: https://pastebin.com/iUnJ29wm
> >> >
> >> > What may be the problem? Url to local repository (
> >> > *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I
> paste
> >> it
> >> > in browser I can access this directory flawlessly.
> >> > I'm working on Windows. (url with backslashes, escaped or not, is not
> >> > recognized by xwiki)
> >>
> >> In your title you say "Local maven repository in Extension Manager”.
> This
> >> works for sure and once you’ve aded "extension.repositories=maven-
> local:maven:…”
> >> in xwiki.properties, you can then using the Extension Manager admin UI
> to
> >> install extensions (using advanced search).
> >>
> >> Now according to http://i.imgur.com/ep9yazr.png you seem to be using
> the
> >> Repository Application (http://extensions.xwiki.org/
> >> xwiki/bin/view/Extension/Repository%20Application). Is that correct? I
> >> have no idea if this app works with a local maven repo.
> >>
> >> Thanks
> >> -Vincent
> >>
> >> >
> >> > Thanks in advance!
> >> > Krzysztof
> >>
> >>
>
>
>
> --
> Thomas Mortagne
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

Krzysiek Płachno
Whilst attempt to import extension from local repo via Extension Mager I
get following error:

2017-04-24 14:30:13,496 [
http://localhost:8080/xwiki/bin/get/XWiki/Extensions] WARN
 o.e.a.i.i.WarnChecksumPolicy   - Could not validate integrity of download
from
file:///C:/Users/Krzysztof/.m2/repository/org/xwiki/commons/xwiki-commons/9.3-SNAPSHOT/xwiki-commons-9.3-SNAPSHOT.pom:
Checksum validation failed, no checksums available

I guess what's missing are files: maven-metadata.xml.md5,
maven-metadata.xml.sha1 like here:
http://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/contrib/xwiki-social-login-api/
How this files are generated? Can I generate them locally or disable
checksum verification?

Krzysiek


2017-04-24 14:28 GMT+02:00 Krzysiek Płachno <[hidden email]>:

>
>
> 2017-04-24 9:26 GMT+02:00 Thomas Mortagne <[hidden email]>:
>
>> There is nothing special about Repository Application. It's getting
>> the extension trough Extension Manager.
>>
>> The problem is that Maven does not generate the maven-metadata.xml
>> file in local repository which as you can see in the error contains
>> the available versions. I can see there is a maven-metadata-local.xml
>> file but looks like Aether does not support it (or maybe Aether needs
>> to be configured to look at it).
>>
>> Given your use case I don't think you need to use the Maven local
>> repository. You should do the same as extensions.xwiki.org and import
>> extension from the default Maven repository ("maven-xwiki"). The only
>> constraint is that you need internet access during the import. IF you
>> really can't do that then I guess the easiest for you would be to copy
>> the maven-metadata-local.xml into maven-metadata.xml in your local
>> repository for the extension you want to import.
>>
>
> The case is I want to test the modified extension locally. So after a
> build of extension locally I want to import it to running XWiki from local
> maven repo.
>
>
>
>
>>
>> On Fri, Apr 21, 2017 at 11:50 PM, Krzysiek Płachno
>> <[hidden email]> wrote:
>> > Firstly I was trying with Extension Manager and it didn't worked with no
>> > information why. That's why I moved to testing it via Repository
>> > Application (since it uses the same configuration of repositories) which
>> > prints stacktrace.
>> > During testing I made some corrections to URL and now when I tested
>> again
>> > Extension Manager it started working.
>> >
>> > So problem with Extension Manager no longer exists, but I still don't
>> know
>> > what's wrong with Repository Application.
>> >
>> > Thanks ;)
>> > Krzysztof
>> >
>> >
>> > 2017-04-21 16:16 GMT+02:00 Vincent Massol <[hidden email]>:
>> >
>> >> Hi,
>> >>
>> >> > On 21 Apr 2017, at 15:48, Krzysiek Płachno <
>> [hidden email]>
>> >> wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > I want to connect local maven repository Extension Manager (and so
>> >> > Extension Repository) according to http://platform.xwiki.org/
>> >> > xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensi
>> onManager
>> >> >
>> >> > In 'xwiki.properties' I put following line:
>> >> > *extension.repositories=maven-local:maven:file:///C:/Users/
>> >> Krzysztof/.m2/repository/*
>> >> > It was discovered by XWiki since in Repository Application it's
>> visible:
>> >> > http://i.imgur.com/ep9yazr.png
>> >> >
>> >> > When I try to import extension from local repository (that is present
>> >> > there) I get exception: http://i.imgur.com/PucSgOL.png
>> >> > Full stack trace: https://pastebin.com/iUnJ29wm
>> >> >
>> >> > What may be the problem? Url to local repository (
>> >> > *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I
>> paste
>> >> it
>> >> > in browser I can access this directory flawlessly.
>> >> > I'm working on Windows. (url with backslashes, escaped or not, is not
>> >> > recognized by xwiki)
>> >>
>> >> In your title you say "Local maven repository in Extension Manager”.
>> This
>> >> works for sure and once you’ve aded "extension.repositories=maven-
>> local:maven:…”
>> >> in xwiki.properties, you can then using the Extension Manager admin UI
>> to
>> >> install extensions (using advanced search).
>> >>
>> >> Now according to http://i.imgur.com/ep9yazr.png you seem to be using
>> the
>> >> Repository Application (http://extensions.xwiki.org/
>> >> xwiki/bin/view/Extension/Repository%20Application). Is that correct? I
>> >> have no idea if this app works with a local maven repo.
>> >>
>> >> Thanks
>> >> -Vincent
>> >>
>> >> >
>> >> > Thanks in advance!
>> >> > Krzysztof
>> >>
>> >>
>>
>>
>>
>> --
>> Thomas Mortagne
>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [xwik-devs] Local maven repository in Extension Manager

Thomas Mortagne
Administrator
On Mon, Apr 24, 2017 at 2:45 PM, Krzysiek Płachno
<[hidden email]> wrote:

> Whilst attempt to import extension from local repo via Extension Mager I
> get following error:
>
> 2017-04-24 14:30:13,496 [
> http://localhost:8080/xwiki/bin/get/XWiki/Extensions] WARN
>  o.e.a.i.i.WarnChecksumPolicy   - Could not validate integrity of download
> from
> file:///C:/Users/Krzysztof/.m2/repository/org/xwiki/commons/xwiki-commons/9.3-SNAPSHOT/xwiki-commons-9.3-SNAPSHOT.pom:
> Checksum validation failed, no checksums available
>
> I guess what's missing are files: maven-metadata.xml.md5,
> maven-metadata.xml.sha1 like here:
> http://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/contrib/xwiki-social-login-api/
> How this files are generated? Can I generate them locally or disable
> checksum verification?

Don't worry about that, it won't change anything to your test since
Extension Manager just warn about it (this does not fail the
download).

>
> Krzysiek
>
>
> 2017-04-24 14:28 GMT+02:00 Krzysiek Płachno <[hidden email]>:
>
>>
>>
>> 2017-04-24 9:26 GMT+02:00 Thomas Mortagne <[hidden email]>:
>>
>>> There is nothing special about Repository Application. It's getting
>>> the extension trough Extension Manager.
>>>
>>> The problem is that Maven does not generate the maven-metadata.xml
>>> file in local repository which as you can see in the error contains
>>> the available versions. I can see there is a maven-metadata-local.xml
>>> file but looks like Aether does not support it (or maybe Aether needs
>>> to be configured to look at it).
>>>
>>> Given your use case I don't think you need to use the Maven local
>>> repository. You should do the same as extensions.xwiki.org and import
>>> extension from the default Maven repository ("maven-xwiki"). The only
>>> constraint is that you need internet access during the import. IF you
>>> really can't do that then I guess the easiest for you would be to copy
>>> the maven-metadata-local.xml into maven-metadata.xml in your local
>>> repository for the extension you want to import.
>>>
>>
>> The case is I want to test the modified extension locally. So after a
>> build of extension locally I want to import it to running XWiki from local
>> maven repo.
>>
>>
>>
>>
>>>
>>> On Fri, Apr 21, 2017 at 11:50 PM, Krzysiek Płachno
>>> <[hidden email]> wrote:
>>> > Firstly I was trying with Extension Manager and it didn't worked with no
>>> > information why. That's why I moved to testing it via Repository
>>> > Application (since it uses the same configuration of repositories) which
>>> > prints stacktrace.
>>> > During testing I made some corrections to URL and now when I tested
>>> again
>>> > Extension Manager it started working.
>>> >
>>> > So problem with Extension Manager no longer exists, but I still don't
>>> know
>>> > what's wrong with Repository Application.
>>> >
>>> > Thanks ;)
>>> > Krzysztof
>>> >
>>> >
>>> > 2017-04-21 16:16 GMT+02:00 Vincent Massol <[hidden email]>:
>>> >
>>> >> Hi,
>>> >>
>>> >> > On 21 Apr 2017, at 15:48, Krzysiek Płachno <
>>> [hidden email]>
>>> >> wrote:
>>> >> >
>>> >> > Hi,
>>> >> >
>>> >> > I want to connect local maven repository Extension Manager (and so
>>> >> > Extension Repository) according to http://platform.xwiki.org/
>>> >> > xwiki/bin/view/DevGuide/CreatingExtensions/#HUsingtheExtensi
>>> onManager
>>> >> >
>>> >> > In 'xwiki.properties' I put following line:
>>> >> > *extension.repositories=maven-local:maven:file:///C:/Users/
>>> >> Krzysztof/.m2/repository/*
>>> >> > It was discovered by XWiki since in Repository Application it's
>>> visible:
>>> >> > http://i.imgur.com/ep9yazr.png
>>> >> >
>>> >> > When I try to import extension from local repository (that is present
>>> >> > there) I get exception: http://i.imgur.com/PucSgOL.png
>>> >> > Full stack trace: https://pastebin.com/iUnJ29wm
>>> >> >
>>> >> > What may be the problem? Url to local repository (
>>> >> > *file:///C:/Users/Krzysztof/.m2/repository/)* is ok since when I
>>> paste
>>> >> it
>>> >> > in browser I can access this directory flawlessly.
>>> >> > I'm working on Windows. (url with backslashes, escaped or not, is not
>>> >> > recognized by xwiki)
>>> >>
>>> >> In your title you say "Local maven repository in Extension Manager”.
>>> This
>>> >> works for sure and once you’ve aded "extension.repositories=maven-
>>> local:maven:…”
>>> >> in xwiki.properties, you can then using the Extension Manager admin UI
>>> to
>>> >> install extensions (using advanced search).
>>> >>
>>> >> Now according to http://i.imgur.com/ep9yazr.png you seem to be using
>>> the
>>> >> Repository Application (http://extensions.xwiki.org/
>>> >> xwiki/bin/view/Extension/Repository%20Application). Is that correct? I
>>> >> have no idea if this app works with a local maven repo.
>>> >>
>>> >> Thanks
>>> >> -Vincent
>>> >>
>>> >> >
>>> >> > Thanks in advance!
>>> >> > Krzysztof
>>> >>
>>> >>
>>>
>>>
>>>
>>> --
>>> Thomas Mortagne
>>>
>>
>>



--
Thomas Mortagne
Loading...