Creating a plugin

Post here questions and problems related to oXygen frameworks/document types.
wmaclean
Posts: 48
Joined: Sat Jan 04, 2020 1:17 am

Creating a plugin

Post 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

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

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
You do not have the required permissions to view the files attached to this post.
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Creating a plugin

Post 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
wmaclean
Posts: 48
Joined: Sat Jan 04, 2020 1:17 am

Re: Creating a plugin

Post by wmaclean »

Hi Alex,
Import as Maven Project worked.

Thanks much for your help,
Will
Post Reply