Create Java project with Maven archetype sling-project-archetype

This archetype is creating a full Sling Project composed of a OSGi Bundle and a Content Package which can be deployed to the Sling using specific profiles. It also contains two shadow folders that provide example code / files which are not part of the default build but can be easily copied into the active modules. If the project was created with the **optionAll** property set to **y** (yes) then an **All** package is created with acts as the single deployment unit of all bundles and packages in that project. Otherwise the **ui.apps** package is the deployment unit.

Create a Java Project by archetype sling-project-archetype with Command Line:

mvn archetype:generate   -DgroupId="com.mycompany.app"   -DartifactId="my-app-id"   -DartifactName="My-artifactName"   -DappsFolderName="My-appsFolderName"   -DcontentFolderName="My-contentFolderName"   -Dpackage="My-package"   -DpackageGroup="My-packageGroup"   -DslingModelSubPackage="My-slingModelSubPackage"   -DslingHostName="My-slingHostName"   -DslingPort="My-slingPort"   -DoptionAll="My-optionAll"   -DoptionExample="My-optionExample"   -DarchetypeGroupId="org.apache.sling"   -DarchetypeArtifactId="sling-project-archetype"   -DarchetypeVersion="1.0.8"   -DinteractiveMode=false 

Required parameters for generate java project:

artifactName
validationRegex: none
appsFolderName
validationRegex: none
contentFolderName
validationRegex: none
package
validationRegex: none
packageGroup
validationRegex: none
slingModelSubPackage
validationRegex: none
slingHostName
validationRegex: none
slingPort
validationRegex: none
optionAll
validationRegex: ^(y|n)$
optionExample
validationRegex: ^(s|m|d)$

Generated Project modules

  • core
  • core.example
  • ui.apps
  • ui.apps.example
  • launcher
  • all

Details about maven archetype sling-project-archetype

License

License

GroupId

GroupId

org.apache.sling
ArtifactId

ArtifactId

sling-project-archetype
Version

Version

1.0.8
Type

Type

maven-archetype
Description

Description

Project Archetype
This archetype is creating a full Sling Project composed of a OSGi Bundle and a Content Package which can be deployed to the Sling using specific profiles. It also contains two shadow folders that provide example code / files which are not part of the default build but can be easily copied into the active modules. If the project was created with the **optionAll** property set to **y** (yes) then an **All** package is created with acts as the single deployment unit of all bundles and packages in that project. Otherwise the **ui.apps** package is the deployment unit.
Project Organization

Project Organization

The Apache Software Foundation

How to add to project

mvn archetype:generate -DgroupId=<com.mycompany.app> -DartifactId=<my-app>  -DarchetypeGroupId=org.apache.sling -DarchetypeArtifactId=sling-project-archetype -DarchetypeVersion=1.0.8 -DinteractiveMode=false

Dependencies

compile (1)

Group / Artifact Type Version
commons-io : commons-io jar 2.6

Project Modules

There are no modules declared in this project.