Page 1 of 1

Creating a plugin

Posted: Fri Mar 06, 2020 11:51 pm
by wmaclean
Hello,
I made some customizations to the oxygen-sample-plugin-workspace-access sample of the oxygen-sdk-samples-archetype maven project, and would like to use them as a basis for a project. But, if I try to copy the \mySample\oxygen-sample-plugins\oxygen-sample-plugin-workspace-access folder to another location, it opens as a project, but I get a “Non-resolvable parent POM” error in the POM file:
image.png
image.png (83.02 KiB) Viewed 1471 times

How can I resolve that?

I have also tried creating a new project from the GIT you have provided:
https://github.com/oxygenxml/sample-plu ... ce-access/

I managed to get it to build successfully both by cloning it and by unzipping the project from the zip, but in both cases, when I try to create a new Java class or Package, I get a “Source folder is not a Java project” error:
image.png
image.png (43.78 KiB) Viewed 1471 times

And, the folders in the navigator on the left behave like folders, instead of Packages.

If solving that is the better way to go, then I am happy with whatever can work.

Thanks,
Will

Re: Creating a plugin

Posted: Mon Mar 09, 2020 4:54 pm
by alex_jitianu
Hi Will,
But, if I try to copy the \mySample\oxygen-sample-plugins\oxygen-sample-plugin-workspace-access folder to another location, it opens as a project, but I get a “Non-resolvable parent POM” error in the POM file:
That's because that project is a Maven module, its parent being the oxygen-sdk-samples project. It can be extracted as a standalone Maven project, but it is much simpler to start from the Github sample which is already a standalone Maven project.
I managed to get it to build successfully both by cloning it and by unzipping the project from the zip, but in both cases, when I try to create a new Java class or Package, I get a “Source folder is not a Java project” error:
From the screenshot it doesn't look like Eclipse has detected the Maven/Java nature of the project. When it does, it usually decorates the root folder Icon with J and M letters.

You can try one of the following:
- Invoke the contextual menu on the project in the Project explorer. Go to Configure-> Convert to Maven project.
- Use the File -> Import, Existing Maven Projects action

Best regards,
Alex

Re: Creating a plugin

Posted: Thu Mar 19, 2020 4:47 am
by wmaclean
Hi Alex,
Import as Maven Project worked.

Thanks much for your help,
Will