[SOLVED] [Eclipse IDE] Meaning of symbols in Package Explorer; Creating a JAR file

Hello folks,

I’ve started developing a new OH2 add-on, following this guides:

  1. IDE setup
  2. Developing bindings
  3. In IDE chosen: File->Import->General->Existing Projects into Workspace

Now I have some questions related to symbols in Package Explorer:

My new binding has a question mark (?)! Is it unknown on git repository, unknown project, or whatever unknown? What to do to get rid the question mark (?) ? Is this normal?

I could compile my new binding with: --> switching to folder of the new binding (in command line): --> mvn clean install. A .jar file was created in target folder and it is running on my OH2 server without any problems…

But how can I achive the SAME with Eclipse IDE?

–> Mark the new binding --> File --> Export -->Java

What to select? JAR file or Runnable JAR file?

What else to select in next step?

The question mark means the code is not yet added and committed to your repository. This is normal and would disappear as soon as you commit your code to git.

I would not export the jar. The maven build takes care of everything and makes sure everything it packed. You really don’t want to recreated all that by manually configuring everything you want to put in the jar. I always build from the command line. But if you really insist on building from eclipse, right click on the project and select ‘Run As’ and select ‘Maven build…’ That way you run a maven build from within eclipse.

1 Like