A year later...as that user was asking how to make a binding i've now
added a binding archetype. Until its in a release you need to build
the archetype yourself to try it out (ie a full build or mvn in
archetypes\binding) then do:

mvn archetype:generate -DarchetypeCatalog=local

That will prompt with a list of archetypes to choose and one is:

7: local -> tuscany-binding-archetype (Create a Tuscany binding
extension project)

so do:

Choose a number: : 7
Define value for property 'groupId': : some.group
Define value for property 'artifactId': : test
Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': some.group: some.group.binding.test
Define value for property 'bindingName': : Test

That will create a folder names "test" with a module for a
binding.test extension. I've not found a way to get default package
and bindingName generated automatically from the artifactId which
would be a bit nicer so if anyone can see how to do that or has any
other comments or changes...Would be good to add another archetype for
an implementation extension too.

   ...ant

On Tue, Jun 16, 2009 at 8:04 PM, ant elder <ant.el...@gmail.com> wrote:
> On Tue, Jun 16, 2009 at 4:48 PM, Raymond Feng<enjoyj...@gmail.com> wrote:
>> Hi,
>>
>> I realized that we have an established pattern for the code of
>> implementation and binding extensions. We also use "copy/paste" to create
>> new modules for implementation/binding extensions. I think it would be
>> useful to develop two maven archetypes that can be used to generate the
>> skeleton modules for implementation/binding extensions. Developers can just
>> provide the name of the implementation/binding. The java and resource files
>> will be generated in a maven module. For example, the
>> sample-implementation-pojo will contain the following files:
>>
>> *
>> META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
>> *
>> META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
>> *
>> META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
>> * META-INF/services/pojo.POJOImplementationFactory
>> # sample-implementation-pojo.xsd
>> # pojo/POJOImplementation.java
>> * pojo/POJOImplementationFactory.java
>> * pojo/impl/POJOImplementationFactoryImpl.java
>> # pojo/impl/POJOImplementationImpl.java
>> # pojo/impl/POJOImplementationProcessor.java
>> # pojo/provider/POJOImplementationProvider.java
>> # pojo/provider/POJOImplementationInvoker.java
>> # pojo/provider/POJOImplementationProviderFactory.java
>>
>> The files marked with * will be completely generated while those with # will
>> have skeleton code produced.
>>
>> Thoughts? Want to help?
>>
>> Thanks,
>> Raymond
>>
>
> Absolutley, archetypes for creating Tuscany extensions was always
> something i'd intended to have so +1.
>
> I'm not sure if you're aware (its not particularly well documented in
> the Maven plugin doc) that it is possible to have the archetype define
> additional properties that get prompted for when archetype:generate is
> run, so along with the goupId, artifactId, version and package, we can
> have it prompt for things like the extension name and namespace.
>
>  ...ant
>

Reply via email to