CCustom components can be stored in the following directory structure inside your resources project:
components
- {CategoryNameForYourComponents}
- META-INF
- {componentName1}
- {componentName2]
In the META-INF directory, you need to put a file called MANIFEST.MF with the following content:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_05-b06 (Oracle Corporation)
Name: {componentName1}/{componentName1}.spec
Web-Component: True
Name: {componentName2}/{componentName2}.spec
Web-Component: True
Of course you need to replace the curly braces and the name inside them with the names you use for your components. All files for a specific component go under the components/{CategoryNameForYourComponents}/{componentName} directory.
As for the other questions: yes, you can use your own stuff, but how is really something for the training next week. I'll see if I can find the time tomorrow to whip up a simple standalone example tomorrow, but please don't hold me to that.
Paul