Install new plugin to Protégé - semantic-web

I wish to install a new plugin to Protégé, that is not listed in the default Protégé plugin library.
Does anyone have any experience doing this, and may point me in the right direction? The plugin I wish to install is SHACL4P. If anyone knows about any other SHACL plugins for Protégé that I should check out, I gladly take any recommendations as well.

A protégé plugin is a jar containing the required plugin.xml and able to be loaded as an OSGi module. If the code you wish to install is already packaged this way, you only need to copy the jar in the plugins folder inside protégé, and it will be picked up the next time you start protégé.
For libraries that are not packaged as plugins, the process is more complex and requires writing code as well. I recommend reading the documentation on the protégé website before doing that.

Related

Cannot add framework support in IntelliJ 14 Ultimate

I found a pretty old post with this question but unfortunately he didn't get any help. I hope someone can assist me.
I created a repo at GitHub. After cloning it to my computer I tried to add the following framework support: Maven, JSF, EJB, CDI, etc. I know I could add the files manually. But, I want to use what the IDE has to offer.
However, the only framework showing up is SQL, which is different from this post from stackoverflow and from their documentation.
Has anyone had this same problem and got it working?
Intellij reacts to changes in your Maven pom.xml file. Maven does not react to changes in your IntelliJ project module settings.
The steps that you should follow here are
Close IntelliJ
In a command shell, clone your Github repository.
Using an editor external to IntelliJ such as VI or Notepad, create a pom.xml in the root directory. Better yet, use a Maven Archetype to generate your pom.xml.
Now open IntelliJ. Choose File, New, Project From Existing Sources. Navigate to your pom.xml and follow the prompts.
I recommend checking Search for projects recursively and Import Maven projects automatically.
Finish the project creation.
Now, add dependencies to your pom.xml via the dependencies tag. See Maven Dependencies. Intellij will automatically react to dependencies that you add as long as it can see a Maven Repository on your local machine or on your network or on the Internet.
I know it is a little bit to late but I just post it because it is still an possible issue: You need to open YourProjectName.iml and make sure that the type (<module type="JAVA_MODULE" version="4">) is JAVA_MODULE and not something else!(In my case it was WEB_MODULE)

Looking for a MyBatis plugin for IntelliJ Idea 14

I'm looking for a current MyBatis plugin for IntelliJ Idea 14. I previously used one hosted by Seventh7 but that is no longer listed (and its git is a 404). The main thing I'm looking for is decent linking between my classes that extend SqlSessionDaoSupport (my DAO classes) and their matching xml files (not using annotation driven).
Any suggestions?
As far as I know the latest free version was v2.34 and it was applied to IDEA v141.177 till v141.179 (as described in file plugin.xml inside jar). That's why this plugin is no listed in IDEA. After this author released paid version and closes free access to the repo
But there is a free fork here:
https://github.com/phoenix/intellij-mybatis-plugin (I love github and open source :) )
Short instruction how to install it:
Download intellij-mybatis-plugin.jar from repo above or use direct link
In IDEA: File>Settings>Plugins, press button "Install plugin from disk" and select downloaded jar.
Restart IDEA
Note: For me navigation to and from xml files does not work until I disabled another iBatis plugin
In Intellij, Go to Settings-->Plugin-->Browse repositories
Search for mybatis plugin.
Install it and restart.
there is a plugin named MyBatisCodeHelperPro, you can search it in repositories.
or download via https://github.com/gejun123456/MyBatisCodeHelper-Pro/blob/master/README_EN.md

How to ensure eclipse plugin has required bundles available?

I'm just starting to develop a new eclipse plugin where I want a web application server running in Eclipse. I found a nice blog, OSGi as a Web Application Server, that describes how to do this. The author suggests creating a target environment for my bundle requirements, and some of those bundles get pulled in from the Equinox Project SDK (now called Equinox Target Components in Juno). I notice that the tutorial project runs fine when my target platform is the platform I created in the tutorial, but fails to start when it is the default platform. So, now for my question...
If I need bundles that are not part of the default, how will my plugin project get access to those bundles? Will I need to deploy them along with my plugin? How would I know if the user's eclipse does or does not already have those required bundles?
You was not much clear about what kind of application you are developing. Running a web server in an Eclipse IDE as a plugin don't make any sense to me. This kind of server application is best just running on top of Equinox.
Anyway, the right path is to create a "Product Configuration" file and add categories that contains the needed bundles (go to File/Plug-in Development/Product Configuration).
With this file you can run an instance of the product (inside the IDE) and can export it (create a zip containing all needed bundles)
And if you want to able your user to install plugin inside his IDE you must create a P2 repository (using a Target Definition File) and expose the exported directory within a Http server. You could research about Tycho to build this kind of components in a maven style.
Well, I'm not sure if re-inventing the wheel again is really sufficient.
You might take a look at Pax-Web for inspiration on how to do it, or take a look Apache Karaf as a OSGi-Container (using Pax-Web). Or even better start contributing to one of the two :-)

Eclipse plugin is listed with other plug-ins, but UI contributions are missing

I wrote two Eclipse plugins that work fine when I use Eclipse to run them in another instance of Eclipse. I'd like to distribute the plugins to a relatively small number of people for feedback and was hoping that the dropins folder would provide a quick and dirty solution. When I put the plugins in the dropins folder of my Eclipse installation (Indigo), I see the plugins listed with other plugins in the installation details. The UI contributions are missing and I haven't been able to find any error messages in the logs or otherwise.
As stated, I'm looking for a quick and dirty solution. I intend to build an update site in the future, but would prefer to invest time into that only after getting feedback on the plugins because this is a side project.
It sounds like your plugin is loaded, but isn't started. A 'quick and dirty' solution is to have it use the org.eclipse.ui.startup extention point so it is activated on startup.
Another possibility is that your UI additions just aren't activated for the perspective, which you can fix by running Window > Customize Perspective.

Delivering a single jar with a Maven project

I want to deliver a single .jar file to my clients, but my project is currently built with Maven, and I have several modules that generate a single .jar each.
I know nesting different .jar files is not a great idea, so I am not sure how can I achieve this.
Any ideas?
If you really want to go this direction, there are several ways to do that:
with the Maven Assembly Plugin and maybe the jar-with-dependencies predefined assembly descriptor (that will unpack dependencies)
with the Maven Shade Plugin (similar to the above one but gives more flexibility)
with the Maven One-Jar Plugin (that uses One-JAR and its custom classloader to allow nesting of JARs)
Depending on your exact requirements and constraints, you might prefer one or the other.
First of all, ask yourself if you have a really good reason for packaging your application and all of its dependencies in to a single jar. I haven't found a very many good reason for this at all (with most reasons being related to organizational policy foolishness or just plain ignorance). The way to go is to keep libraries in their own jars and supplying a .zip/.tar.gz containing all of your libraries and your application with either
An executable .jar with the
classpath setup appropriately in
your MANFIEST.MF file
a .bat/.sh
script that invokes java and builds
an appropriate classpath based on
your deps
Conversely, use JNLP (better known as Java Web Start).
If you really want to have maven bundle all of your dependencies and your application under a single jar, what you want to use is the "jar-with-dependencies" predefined assembly. The maven assembly plugin usage page also shows how you might this up as well.
You can try Maven Shade plugin too.
http://maven.apache.org/plugins/maven-shade-plugin/
General instructions on how to use the Shade Plugin can be found on the usage page. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the plugin's wiki page.
In case you still have questions regarding the plugin's usage, please feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.
If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the guide to helping with Maven.
Actually, nesting .jar files is not possible. A jar can't have other jars in it.
.war and .ear files can contain jars, and that's a good solution if you're delivering a J2EE application.
If your app is just J2SE, however, I recommend looking at the Maven Assembly plugin. As the name implies, it allows you to create a single binary distribution of your build.