I'm developing a Nexus plugin very similar to the Nexus Archetype
plugin. It just searches for a different packaging type. What I've found out, the hard way, is that I can't search the index for artifacts with this packaging type if searchable is turned off for the repo. This affects the archetype plugin as well. The first problem is that if I turn off search for a repo, indexing is turned off too. But if I enable that manually in nexus.xml, the plugin still can't find any artifacts. I'm guessing that the NexusIndexer used by the plugin to search checks if the repo is searchable. Is there any way around this? For my use case I would like to be able to turn off the possibility for the users to search for artifacts in the staging repos, but allow my Nexus plugin to produce a catalog of artifacts with a specific packaging type in the staging repos. /Anders --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Just pass in all contexts explicitly in the search request. When there is none passed in obly those "searchable" ones are searched otherwise what you pass in (searchable is neglected). See maven indexer defaultsearchengine Thanks, On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote:
I'm developing a Nexus plugin very similar to the Nexus Archetype |
Tamas, that doesn't make any sense to me. I heard you're on vacation
so we should talk about this when you're back instead. If files NEXUS-5216 which is related to this. But there's more to it than in that ticket. /Anders On Tue, Aug 21, 2012 at 11:18 PM, Tamas Cservenak <[hidden email]> wrote: > Just pass in all contexts explicitly in the search request. When there is > none passed in obly those "searchable" ones are searched otherwise what you > pass in (searchable is neglected). See maven indexer defaultsearchengine > > Thanks, > ~t~ mobile > > On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote: >> >> I'm developing a Nexus plugin very similar to the Nexus Archetype >> plugin. It just searches for a different packaging type. What I've >> found out, the hard way, is that I can't search the index for >> artifacts with this packaging type if searchable is turned off for the >> repo. This affects the archetype plugin as well. >> The first problem is that if I turn off search for a repo, indexing is >> turned off too. But if I enable that manually in nexus.xml, the plugin >> still can't find any artifacts. I'm guessing that the NexusIndexer >> used by the plugin to search checks if the repo is searchable. >> >> Is there any way around this? For my use case I would like to be able >> to turn off the possibility for the users to search for artifacts in >> the staging repos, but allow my Nexus plugin to produce a catalog of >> artifacts with a specific packaging type in the staging repos. >> >> /Anders >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Just to bump this thread: comment added to issue:
https://issues.sonatype.org/browse/NEXUS-5216?focusedCommentId=167775#comment-167775 Thanks, ~t~
On Wed, Aug 22, 2012 at 8:30 AM, Anders Hammar <[hidden email]> wrote: Tamas, that doesn't make any sense to me. I heard you're on vacation |
Thanks for looking into that issue. I *think* there was also some
issue if indexable is true but searchable is false. I'll verify tomorrow unless you beat me to it....:-) /Anders On Thu, Sep 6, 2012 at 1:13 PM, Tamás Cservenák <[hidden email]> wrote: > Just to bump this thread: comment added to issue: > https://issues.sonatype.org/browse/NEXUS-5216?focusedCommentId=167775#comment-167775 > > Thanks, > ~t~ > > > On Wed, Aug 22, 2012 at 8:30 AM, Anders Hammar <[hidden email]> wrote: >> >> Tamas, that doesn't make any sense to me. I heard you're on vacation >> so we should talk about this when you're back instead. >> >> If files NEXUS-5216 which is related to this. But there's more to it >> than in that ticket. >> >> /Anders >> >> On Tue, Aug 21, 2012 at 11:18 PM, Tamas Cservenak <[hidden email]> >> wrote: >> > Just pass in all contexts explicitly in the search request. When there >> > is >> > none passed in obly those "searchable" ones are searched otherwise what >> > you >> > pass in (searchable is neglected). See maven indexer defaultsearchengine >> > >> > Thanks, >> > ~t~ mobile >> > >> > On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote: >> >> >> >> I'm developing a Nexus plugin very similar to the Nexus Archetype >> >> plugin. It just searches for a different packaging type. What I've >> >> found out, the hard way, is that I can't search the index for >> >> artifacts with this packaging type if searchable is turned off for the >> >> repo. This affects the archetype plugin as well. >> >> The first problem is that if I turn off search for a repo, indexing is >> >> turned off too. But if I enable that manually in nexus.xml, the plugin >> >> still can't find any artifacts. I'm guessing that the NexusIndexer >> >> used by the plugin to search checks if the repo is searchable. >> >> >> >> Is there any way around this? For my use case I would like to be able >> >> to turn off the possibility for the users to search for artifacts in >> >> the staging repos, but allow my Nexus plugin to produce a catalog of >> >> artifacts with a specific packaging type in the staging repos. >> >> >> >> /Anders >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [hidden email] >> >> For additional commands, e-mail: [hidden email] >> >> >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Verified with my plugin which employs code very similar to the
archetype plugin, and if searchable is set to false (but indexable to true) nothing is returned in the catalog. I'm guessing that something in the Nexus code checks if the repo is searchable. Is there some way around this for a plugin such as the archetype plugin? /Anders On Thu, Sep 6, 2012 at 10:33 PM, Anders Hammar <[hidden email]> wrote: > Thanks for looking into that issue. I *think* there was also some > issue if indexable is true but searchable is false. I'll verify > tomorrow unless you beat me to it....:-) > > /Anders > > On Thu, Sep 6, 2012 at 1:13 PM, Tamás Cservenák <[hidden email]> wrote: >> Just to bump this thread: comment added to issue: >> https://issues.sonatype.org/browse/NEXUS-5216?focusedCommentId=167775#comment-167775 >> >> Thanks, >> ~t~ >> >> >> On Wed, Aug 22, 2012 at 8:30 AM, Anders Hammar <[hidden email]> wrote: >>> >>> Tamas, that doesn't make any sense to me. I heard you're on vacation >>> so we should talk about this when you're back instead. >>> >>> If files NEXUS-5216 which is related to this. But there's more to it >>> than in that ticket. >>> >>> /Anders >>> >>> On Tue, Aug 21, 2012 at 11:18 PM, Tamas Cservenak <[hidden email]> >>> wrote: >>> > Just pass in all contexts explicitly in the search request. When there >>> > is >>> > none passed in obly those "searchable" ones are searched otherwise what >>> > you >>> > pass in (searchable is neglected). See maven indexer defaultsearchengine >>> > >>> > Thanks, >>> > ~t~ mobile >>> > >>> > On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote: >>> >> >>> >> I'm developing a Nexus plugin very similar to the Nexus Archetype >>> >> plugin. It just searches for a different packaging type. What I've >>> >> found out, the hard way, is that I can't search the index for >>> >> artifacts with this packaging type if searchable is turned off for the >>> >> repo. This affects the archetype plugin as well. >>> >> The first problem is that if I turn off search for a repo, indexing is >>> >> turned off too. But if I enable that manually in nexus.xml, the plugin >>> >> still can't find any artifacts. I'm guessing that the NexusIndexer >>> >> used by the plugin to search checks if the repo is searchable. >>> >> >>> >> Is there any way around this? For my use case I would like to be able >>> >> to turn off the possibility for the users to search for artifacts in >>> >> the staging repos, but allow my Nexus plugin to produce a catalog of >>> >> artifacts with a specific packaging type in the staging repos. >>> >> >>> >> /Anders >>> >> >>> >> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: [hidden email] >>> >> For additional commands, e-mail: [hidden email] >>> >> >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Anders,
I verified the fix manually (as there still no support to separately switch indexable/searchable over REST API). What I did: 1. start virgin nexus, no config change (out of the box, "default" config)
2. fetched central's catalog, is empty -- OK (index still empty) 3. performed on UI GAV search with artifactId "maven-archetype-quickstart", no results -- OK (index still empty) 4. enabled central index download, wait for it to finish 5. fetched central's catalog, is full and contains entry for "maven-archetype-quickstart" version 1.1 -- OK
6. performed on UI GAV search with artifactId "maven-archetype-quickstart", multiple results -- OK 7. shut down nexus 8. edited nexus.xml and set "searchable" to false on Central
9. start up nexus 10. fetched central's catalog, is full and contains entry for "maven-archetype-quickstart" version 1.1 -- OK 11. performed on UI GAV search with artifactId "maven-archetype-quickstart", no results -- OK (searchable=false)
So, I don't get what your plugin does, as Nexus should not interfere here (if, as you note, your plugin is "similar" to Archetype).... Can I peek into your code?
Note: for catalog I used wget to avoid any "browser cache" issues that might mislead. Thanks, ~t~ On Fri, Sep 7, 2012 at 9:48 AM, Anders Hammar <[hidden email]> wrote: Verified with my plugin which employs code very similar to the |
I'm wrestling with some p2 proxy problems right now, but I'll try your
steps and see if there's something on my end. Btw, you used latest snapshot version of the nexus-archetype-plugin I assume? If not I'll see if I can share the source privately with you. Thanks for testing, /Anders On Fri, Sep 7, 2012 at 12:16 PM, Tamás Cservenák <[hidden email]> wrote: > Anders, > > I verified the fix manually (as there still no support to separately switch > indexable/searchable over REST API). > > What I did: > > 1. start virgin nexus, no config change (out of the box, "default" config) > 2. fetched central's catalog, is empty -- OK (index still empty) > 3. performed on UI GAV search with artifactId "maven-archetype-quickstart", > no results -- OK (index still empty) > > 4. enabled central index download, wait for it to finish > > 5. fetched central's catalog, is full and contains entry for > "maven-archetype-quickstart" version 1.1 -- OK > 6. performed on UI GAV search with artifactId "maven-archetype-quickstart", > multiple results -- OK > > 7. shut down nexus > 8. edited nexus.xml and set "searchable" to false on Central > 9. start up nexus > > 10. fetched central's catalog, is full and contains entry for > "maven-archetype-quickstart" version 1.1 -- OK > 11. performed on UI GAV search with artifactId "maven-archetype-quickstart", > no results -- OK (searchable=false) > > > So, I don't get what your plugin does, as Nexus should not interfere here > (if, as you note, your plugin is "similar" to Archetype).... > Can I peek into your code? > > > Note: for catalog I used wget to avoid any "browser cache" issues that might > mislead. > > > > Thanks, > ~t~ > > On Fri, Sep 7, 2012 at 9:48 AM, Anders Hammar <[hidden email]> wrote: >> >> Verified with my plugin which employs code very similar to the >> archetype plugin, and if searchable is set to false (but indexable to >> true) nothing is returned in the catalog. I'm guessing that something >> in the Nexus code checks if the repo is searchable. Is there some way >> around this for a plugin such as the archetype plugin? >> >> /Anders >> >> On Thu, Sep 6, 2012 at 10:33 PM, Anders Hammar <[hidden email]> wrote: >> > Thanks for looking into that issue. I *think* there was also some >> > issue if indexable is true but searchable is false. I'll verify >> > tomorrow unless you beat me to it....:-) >> > >> > /Anders >> > >> > On Thu, Sep 6, 2012 at 1:13 PM, Tamás Cservenák <[hidden email]> >> > wrote: >> >> Just to bump this thread: comment added to issue: >> >> >> >> https://issues.sonatype.org/browse/NEXUS-5216?focusedCommentId=167775#comment-167775 >> >> >> >> Thanks, >> >> ~t~ >> >> >> >> >> >> On Wed, Aug 22, 2012 at 8:30 AM, Anders Hammar <[hidden email]> >> >> wrote: >> >>> >> >>> Tamas, that doesn't make any sense to me. I heard you're on vacation >> >>> so we should talk about this when you're back instead. >> >>> >> >>> If files NEXUS-5216 which is related to this. But there's more to it >> >>> than in that ticket. >> >>> >> >>> /Anders >> >>> >> >>> On Tue, Aug 21, 2012 at 11:18 PM, Tamas Cservenak >> >>> <[hidden email]> >> >>> wrote: >> >>> > Just pass in all contexts explicitly in the search request. When >> >>> > there >> >>> > is >> >>> > none passed in obly those "searchable" ones are searched otherwise >> >>> > what >> >>> > you >> >>> > pass in (searchable is neglected). See maven indexer >> >>> > defaultsearchengine >> >>> > >> >>> > Thanks, >> >>> > ~t~ mobile >> >>> > >> >>> > On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote: >> >>> >> >> >>> >> I'm developing a Nexus plugin very similar to the Nexus Archetype >> >>> >> plugin. It just searches for a different packaging type. What I've >> >>> >> found out, the hard way, is that I can't search the index for >> >>> >> artifacts with this packaging type if searchable is turned off for >> >>> >> the >> >>> >> repo. This affects the archetype plugin as well. >> >>> >> The first problem is that if I turn off search for a repo, indexing >> >>> >> is >> >>> >> turned off too. But if I enable that manually in nexus.xml, the >> >>> >> plugin >> >>> >> still can't find any artifacts. I'm guessing that the NexusIndexer >> >>> >> used by the plugin to search checks if the repo is searchable. >> >>> >> >> >>> >> Is there any way around this? For my use case I would like to be >> >>> >> able >> >>> >> to turn off the possibility for the users to search for artifacts >> >>> >> in >> >>> >> the staging repos, but allow my Nexus plugin to produce a catalog >> >>> >> of >> >>> >> artifacts with a specific packaging type in the staging repos. >> >>> >> >> >>> >> /Anders >> >>> >> >> >>> >> >> >>> >> --------------------------------------------------------------------- >> >>> >> To unsubscribe, e-mail: [hidden email] >> >>> >> For additional commands, e-mail: [hidden email] >> >>> >> >> >>> > >> >>> >> >>> --------------------------------------------------------------------- >> >>> To unsubscribe, e-mail: [hidden email] >> >>> For additional commands, e-mail: [hidden email] >> >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
In reply to this post by Tamás Cservenák
Tamás,
I verified a slightly different scenario and nexus-archetype-plugin does work as it should. That's good! Now I just need to figure out what's wrong in my plugin... /Anders On Fri, Sep 7, 2012 at 12:16 PM, Tamás Cservenák <[hidden email]> wrote: > Anders, > > I verified the fix manually (as there still no support to separately switch > indexable/searchable over REST API). > > What I did: > > 1. start virgin nexus, no config change (out of the box, "default" config) > 2. fetched central's catalog, is empty -- OK (index still empty) > 3. performed on UI GAV search with artifactId "maven-archetype-quickstart", > no results -- OK (index still empty) > > 4. enabled central index download, wait for it to finish > > 5. fetched central's catalog, is full and contains entry for > "maven-archetype-quickstart" version 1.1 -- OK > 6. performed on UI GAV search with artifactId "maven-archetype-quickstart", > multiple results -- OK > > 7. shut down nexus > 8. edited nexus.xml and set "searchable" to false on Central > 9. start up nexus > > 10. fetched central's catalog, is full and contains entry for > "maven-archetype-quickstart" version 1.1 -- OK > 11. performed on UI GAV search with artifactId "maven-archetype-quickstart", > no results -- OK (searchable=false) > > > So, I don't get what your plugin does, as Nexus should not interfere here > (if, as you note, your plugin is "similar" to Archetype).... > Can I peek into your code? > > > Note: for catalog I used wget to avoid any "browser cache" issues that might > mislead. > > > > Thanks, > ~t~ > > On Fri, Sep 7, 2012 at 9:48 AM, Anders Hammar <[hidden email]> wrote: >> >> Verified with my plugin which employs code very similar to the >> archetype plugin, and if searchable is set to false (but indexable to >> true) nothing is returned in the catalog. I'm guessing that something >> in the Nexus code checks if the repo is searchable. Is there some way >> around this for a plugin such as the archetype plugin? >> >> /Anders >> >> On Thu, Sep 6, 2012 at 10:33 PM, Anders Hammar <[hidden email]> wrote: >> > Thanks for looking into that issue. I *think* there was also some >> > issue if indexable is true but searchable is false. I'll verify >> > tomorrow unless you beat me to it....:-) >> > >> > /Anders >> > >> > On Thu, Sep 6, 2012 at 1:13 PM, Tamás Cservenák <[hidden email]> >> > wrote: >> >> Just to bump this thread: comment added to issue: >> >> >> >> https://issues.sonatype.org/browse/NEXUS-5216?focusedCommentId=167775#comment-167775 >> >> >> >> Thanks, >> >> ~t~ >> >> >> >> >> >> On Wed, Aug 22, 2012 at 8:30 AM, Anders Hammar <[hidden email]> >> >> wrote: >> >>> >> >>> Tamas, that doesn't make any sense to me. I heard you're on vacation >> >>> so we should talk about this when you're back instead. >> >>> >> >>> If files NEXUS-5216 which is related to this. But there's more to it >> >>> than in that ticket. >> >>> >> >>> /Anders >> >>> >> >>> On Tue, Aug 21, 2012 at 11:18 PM, Tamas Cservenak >> >>> <[hidden email]> >> >>> wrote: >> >>> > Just pass in all contexts explicitly in the search request. When >> >>> > there >> >>> > is >> >>> > none passed in obly those "searchable" ones are searched otherwise >> >>> > what >> >>> > you >> >>> > pass in (searchable is neglected). See maven indexer >> >>> > defaultsearchengine >> >>> > >> >>> > Thanks, >> >>> > ~t~ mobile >> >>> > >> >>> > On Aug 17, 2012 6:00 PM, "Anders Hammar" <[hidden email]> wrote: >> >>> >> >> >>> >> I'm developing a Nexus plugin very similar to the Nexus Archetype >> >>> >> plugin. It just searches for a different packaging type. What I've >> >>> >> found out, the hard way, is that I can't search the index for >> >>> >> artifacts with this packaging type if searchable is turned off for >> >>> >> the >> >>> >> repo. This affects the archetype plugin as well. >> >>> >> The first problem is that if I turn off search for a repo, indexing >> >>> >> is >> >>> >> turned off too. But if I enable that manually in nexus.xml, the >> >>> >> plugin >> >>> >> still can't find any artifacts. I'm guessing that the NexusIndexer >> >>> >> used by the plugin to search checks if the repo is searchable. >> >>> >> >> >>> >> Is there any way around this? For my use case I would like to be >> >>> >> able >> >>> >> to turn off the possibility for the users to search for artifacts >> >>> >> in >> >>> >> the staging repos, but allow my Nexus plugin to produce a catalog >> >>> >> of >> >>> >> artifacts with a specific packaging type in the staging repos. >> >>> >> >> >>> >> /Anders >> >>> >> >> >>> >> >> >>> >> --------------------------------------------------------------------- >> >>> >> To unsubscribe, e-mail: [hidden email] >> >>> >> For additional commands, e-mail: [hidden email] >> >>> >> >> >>> > >> >>> >> >>> --------------------------------------------------------------------- >> >>> To unsubscribe, e-mail: [hidden email] >> >>> For additional commands, e-mail: [hidden email] >> >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Skype me if you want to chat about this...
Thanks, ~t~
On Wed, Sep 12, 2012 at 10:28 AM, Anders Hammar <[hidden email]> wrote: Tamás, |
Free forum by Nabble | Edit this page |