So I’ve gone back and re-read the doco and I’m left even more confused.
The question that I’ve not got a clear answer to is, what ‘plugin’ should I use when pulling in a local part.
The doco says this:
plugin:
Specifies the plugin that will manage this part. Snapcraft will pass the plugin all the other user-specified part options, those options defined with the other keys below. There are three ways in which the plugin can be defined: a plugin name to use a built-in plug-in (for details, see the list of built-in plugins), a local path such as parts/plugins/x-plugin_name.py to use a local (custom defined) plugin and if plugin is not defined locally, the plugin defined for the part in the parts repository.
Now the point of interest is this:
and if plugin is not defined locally, the plugin defined for the part in the parts repository.
This seems to imply that for remote parts you don’t specify a plugin as the plugin details are taken from the yaml of the remote part.
Now this makes a lot of sense. A remote part will actually have one or more of its own parts. Each of these parts will in turn have their own plugin that defines how to build them.
So if there are multiple parts, each with their own plugin then it makes NO SENSE to specify the plugin when pulling a remote part.
This is in fact demonstrated by the ‘after’ clause. If you pull in a remote part using the ‘after’ clause then there is no need and in fact no way to specify the plugin for the remote part.
So why would we be specifying a plugin for a ‘local part’. Where a local part means a part with its own snapcraft.yaml which lives in another directory on the host machine.
So why then can’t i do the following:
parts:
tomcat-with-ssl:
source: ../../../tomcat-with-ssl
the path …/…/…/tomcat-with-ssl points to the local path which has its own snapcraft.yaml.
The problem is that when I try to build this I get:
Failed to get part information: Cannot find the definition for part 'tomcat-with-ssl'. If it is a remote part, run `snapcraft update` to refresh the remote parts cache. If it is a local part, make sure that it is defined in the `snapcraft.yaml`.
I’m banging my head against a brick wall on this one.