Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » [SOLVED] create_binding_skeleton errors(Errors when trying to create a binding skeleton with the script)
[SOLVED] create_binding_skeleton errors [message #1734777] Sat, 11 June 2016 20:09 Go to next message
Juergen Messmer is currently offline Juergen MessmerFriend
Messages: 4
Registered: June 2016
Junior Member
Hi,

I am trying to create a new binding, starting with the creation of a skeleton.

I cloned the repo https://github.com/eclipse/smarthome.git

When I run the script create_binding_skeleton.sh / or .cmd (tried both on linux/windows) in /extensions/binding I get the following error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.758 s
[INFO] Finished at: 2016-06-11T21:54:18+02:00
[INFO] Final Memory: 32M/78M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project pom: The desired archetype does not exist (org.eclipse.smarthome.archetype:org.eclipse.smarthome.archetype.binding.test:0.9.0-SNAPSHOT) -> [Help 1]
[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] ...



Any help to solve the issue is appreciated.

Thx, Juergen

[Updated on: Tue, 14 June 2016 21:05]

Report message to a moderator

Re: create_binding_skeleton errors [message #1734784 is a reply to message #1734777] Sun, 12 June 2016 09:48 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 648
Registered: December 2011
Senior Member
Hi,

You need to first run a Maven build of the repo - or at least run a build within tools/archetype.
This info was indeed missing, I have added it to the OH2 documentation with https://github.com/openhab/openhab-docs/pull/21.
(In the ESH docu, we do not have any section that explains the archetype, is that correct? I at least couldn't find any...)

Regards,
Kai
Re: create_binding_skeleton errors [message #1734788 is a reply to message #1734784] Sun, 12 June 2016 14:29 Go to previous messageGo to next message
Juergen Messmer is currently offline Juergen MessmerFriend
Messages: 4
Registered: June 2016
Junior Member
works now.
Thx a lot.
Re: create_binding_skeleton errors [message #1783707 is a reply to message #1734788] Fri, 16 March 2018 04:13 Go to previous messageGo to next message
Flavio Costa is currently offline Flavio CostaFriend
Messages: 15
Registered: February 2018
Junior Member
Hello,

I am trying to use the create_binding_skeleton.cmd script to generate a ESB binding, but I am getting the same error as above. This is what I executed:

cd  openhab2-master\git\smarthome\tools\archetype
mvn install

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Eclipse SmartHome Archetypes 0.10.0-SNAPSHOT ....... SUCCESS [ 16.637 s]
[INFO] Eclipse Smarthome Binding Archetype ................ SUCCESS [ 16.831 s]
[INFO] Eclipse Smarthome Binding Archetype Testsuite 0.10.0-SNAPSHOT SUCCESS [  0.179 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

cd ..\..\extensions\binding
create_binding_skeleton.cmd SampleBinding "Flavio Costa"

[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repsoitory with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.593 s
[INFO] Finished at: 2018-03-15T22:44:41-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project pom: The desired archetype does not exist (org.eclipse.smarthome.archetype:org.eclipse.smarthome.archetype.binding:0.10.0-SNAPSHOT) -> [Help 1]


I think the "run a build within tools/archetype" above would be covered by the mvn install executed first, but the error still comes up when trying to generate the code skeleton. I have both Eclipse Projects\Smart Home and Github projects\openHAB projects on my Eclipse IDE. What else could still be causing this error message?
Re: create_binding_skeleton errors [message #1783711 is a reply to message #1783707] Fri, 16 March 2018 08:00 Go to previous messageGo to next message
Henning Treu is currently offline Henning TreuFriend
Messages: 34
Registered: April 2017
Member
Hi Flavio,

the first execution and install of the two archetypes into your local maven repository looks good. However:
[WARNING] Archetype not found in any catalog. Falling back to central repository.

Please check if the generated archetype artifacts are present in your local maven repository. By default it can be found in <user_home>/.m2/repository/org/eclipse/smarthome/archetype
Also please check if you have a custom settings.xml for your maven installation which points to different repositories.
Re: create_binding_skeleton errors [message #1783782 is a reply to message #1783711] Sat, 17 March 2018 04:22 Go to previous messageGo to next message
Flavio Costa is currently offline Flavio CostaFriend
Messages: 15
Registered: February 2018
Junior Member
Hi Henning,

Thanks for the prompt feedback. On .m2\repository\org\eclipse\smarthome\archetype I do see both archetypes:

dir
2018-03-15  22:20    <DIR>          .
2018-03-15  22:20    <DIR>          ..
2018-03-15  22:20    <DIR>          org.eclipse.smarthome.archetype.binding
2018-03-15  22:20    <DIR>          org.eclipse.smarthome.archetype.binding.test
               0 File(s)              0 bytes
               4 Dir(s)  291,777,130,496 bytes free


These two archetypes are also referenced on .m2\archetype-catalog.xml:

    <archetype>
      <groupId>org.eclipse.smarthome.archetype</groupId>
      <artifactId>org.eclipse.smarthome.archetype.binding</artifactId>
      <version>0.10.0-SNAPSHOT</version>
      <description>This is the Maven-Archetype for building new bindings for Eclipse SmartHome.</description>
    </archetype>
    <archetype>
      <groupId>org.eclipse.smarthome.archetype</groupId>
      <artifactId>org.eclipse.smarthome.archetype.binding.test</artifactId>
      <version>0.10.0-SNAPSHOT</version>
      <description>This is the Maven-Archetype for building tests for bindings for Eclipse SmartHome.</description>
    </archetype>


If I am to follow the error messages from create_binding_skeleton.cmd, I understand that the system is not finding or considering this archetype-catalog.xml. Under .m2 subdirectories, I cannot find any find named settings.xml where I could "Add a repsoitory with id 'archetype'". Any idea why the relevant catalog is not being loaded?
Re: create_binding_skeleton errors [message #1785130 is a reply to message #1783782] Mon, 09 April 2018 20:56 Go to previous message
Flavio Costa is currently offline Flavio CostaFriend
Messages: 15
Registered: February 2018
Junior Member
I have fixed the problem... it looks like create_binding_skeleton.cmd started working after I tried to execute create_openhab_binding_skeleton for the first time.

Not sure what is the dependency is between the two, and if this is something that should be expected in any way, but at least it seems to work fine now!
Previous Topic:Thoughts on a new Sitemap Concept
Next Topic:Is P2 is really necessary for Eclipse Smart Home core
Goto Forum:
  


Current Time: Mon Jun 18 11:58:49 GMT 2018

Powered by FUDForum. Page generated in 0.01783 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top