Giter Site home page Giter Site logo

enonic-plugin-archetype's Introduction

#cms plugin archetype

Generated archetype project will include one example of each of Enonic's extension types.

  1. FunctionLibrary
  2. HttpAutoLogin
  3. HttpController (simple example + one advanced example with thymeleaf view)
  4. HttpInterceptor
  5. HttpResponseFilter
  6. TaskHandler
  7. TextExtractor
  8. Authenticator
  9. RemoteUserStoreFactory

Delete the extensions you don't want to use before starting your project, and expand the ones you want to implement. If not using the ThymeleafController, delete the src/java/com.enonic.plugin.thymeleafcontroller package, the curresponding package below src/resources and also the src/resources/thymeleafcontroller-views folder.

To install enonic-plugin-archetype locally, run:

  1. mvn archetype:create-from-project
  2. cd target/generated-sources/archetype
  3. mvn install

This will install the archetype in your local .m2/repository/com/enonic/plugin/enonic-plugin-archetype folder. Make sure you update your local .m2 repository in your IDE for the archetype to be available.

Example for IntelliJ:
Go to Preferences->Maven->Repositories and press the update button after installing the archetype
To create new project from archetype:

  1. Select 'New module'
  2. Create module of type 'Maven', select 'Create from archetype'
  3. Select com.enonic.plugin:enonic-plugin-archtype:4.7.6 (version follows enonic cms version)
  4. Fill inn groupId, artifactId, version and package

Example for commandline:

  1. mvn archetype:generate -DarchetypeCatalog=local
  2. Choose: # with local -> com.enonic.plugin:enonic-plugin-archetype (enonic-plugin-archetype)
  3. Fill inn groupId, artifactId, version and package for your plugin, example:

Example:
1: local -> com.enonic.plugin:enonic-plugin-archetype (enonic-plugin-archetype)

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
Define value for property 'groupId': : com.enonic.plugin Define value for property 'artifactId': : my-enonic-plugin Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': com.enonic.plugin:
Confirm properties configuration:
groupId: com.enonic.plugin
artifactId: my-enonic-plugin
version: 1.0-SNAPSHOT
package: com.enonic.plugin
Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: enonic-plugin-archetype:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.enonic.plugin
[INFO] Parameter: artifactId, Value: my-enonic-plugin
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.enonic.plugin
[INFO] Parameter: packageInPathFormat, Value: com/enonic/plugin
[INFO] Parameter: package, Value: com.enonic.plugin
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: com.enonic.plugin
[INFO] Parameter: artifactId, Value: my-enonic-plugin
[INFO] project created from Archetype in dir: /Users/rfo/development/sourcecode/enonic/archetype/my-enonic-plugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.