How to debug a plugin?

Hi,

I am breaking my head for quite long to figure out how to write a simple plugin , deploy it and debug it.

Yes I have seen this one https://answers.nuxeo.com/general/q/0ebf800f33c944a99cb33f41c284f2fb/Using-an-external-sso-system-for-authentication

But it's outdated and its link does not work.

If Nuxeo is providing it as a development platform as well then they should also provide simple examples on how to do. Very poor documentation, is it done purposefully so that user go for your pricey support ?

0 votes

1 answers

2953 views

ANSWER

Creating packages also does not work even after following every step https://doc.nuxeo.com/nxdoc/creating-nuxeo-packages/

Fails with the error [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for org.nuxeo.sample.project:my-project-package:[unknown-version]: Could not transfer artifact org.nuxeo.sample.project:my-project-parent:pom:1.0-SNAPSHOT from/to nuxeo-studio (https://connect.nuxeo.com/nuxeo/site/studio/maven): Not authorized , ReasonPhrase:Unauthorized. and 'parent.relativePath' points at wrong local POM @ line 3, column 11 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.nuxeo.sample.project:my-project-package:unknown-version has 1 error [ERROR] Non-resolvable parent POM for org.nuxeo.sample.project:my-project-package:[unknown-version]: Could not transfer artifact org.nuxeo.sample.project:my-project-parent:pom:1.0-SNAPSHOT from/to nuxeo-studio (https://connect.nuxeo.com/nuxeo/site/studio/maven): Not authorized , ReasonPhrase:Unauthorized. and 'parent.relativePath' points at wrong local POM @ line 3, column 11 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

…sigh…

07/19/2017

We at Nuxeo resent the suggestion that our doc would be incomplete on purpose. Please refrain from this kind of comment on this site.

We're open to suggestions on how the documentation can be improved.

Without seeing exactly the code / files you have in your project it's hard for us to help.

07/20/2017

I am convinced now that its not purposefully done and I will henceforth will not comment like that. But my frustration is still very much valid. As i said in my previous comment i tried the steps from the given link and tried exactly like said and does not work. But then tried a simple maven example and compared the generated pom file with the generated file by the nuxeo cli and nuxeo yo generator and changed the pom accordingly then it worked and I was able to load the bundle/package .

Also it says to use .zip for pacakaging but somewhere else i read that package system uses .jar so i changed that too because it did not work for me.

Now i am trying to make the loginplugin like how its done here https://www.nuxeo.com/blog/guest-post-integrating-single-sign-sso-nuxeo-case-management/

But it says to update some manifest and other things which i did not find in the generated files by the CLI, so my struggle continues to figure out what are thes files and they have added two java files whether they are in diferent projects or part of same plugin I do not know either.

I consider myself an experienced .Net Developer and worked on lot of products and used various API and developer platform. so I am not so naive in development. So I can find stuffs by myself but here I am failing quite often which frustrates me.

And i completely understand documentation is a tough job for any company but it has to be done.

07/20/2017

Looks like my post is one of the largest viewed but no one gave an answer. Either people have never tried it or they don't want to help :(
07/25/2017

A JIRA ticket has been created to update the Creating Nuxeo Packages documentation. You can follow its resolution here.
08/03/2017

Thanks
08/03/2017



I think the nuxeo-marketplace-sample is the most helpful code sample for learning this: https://github.com/nuxeo/nuxeo-marketplace-sample

Another, more minimal and more up-to-date place to start is Creating Nuxeo Packages.

In my experience, SSO authentication can be a little tricky because it often touches the servlet layer as well as the Nuxeo framework for things like JSESSIONID cookies.So you'll have to have a command of those technologies as well.

1 votes



I have managed to create a plugin but now my method is not getting triggered and for that I have asked a separate question. If you could help me there https://answers.nuxeo.com/m#/q/604ae087-48d8-4974-a2b3-10478882562a
07/25/2017