Skip to content

Commit

Permalink
Merge branch 'React/create-project-start' into React/navigation-routi…
Browse files Browse the repository at this point in the history
…ng-solution
  • Loading branch information
godanny86 committed Jun 10, 2020
2 parents 96ea31b + b847667 commit c818746
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 16 deletions.
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,37 @@

This is the code companion for a series of tutorials designed for developers new to the **SPA Editor** feature in Adobe Experience Manager (AEM). There are two parallel versions of the tutorial:

* [Create your first React SPA in AEM](https://docs.adobe.com/content/help/en/experience-manager-learn/tutorials/develop-spa-react/overview.html)
* [Create your first Angular SPA in AEM](https://docs-stg.corp.adobe.com/content/help/en/experience-manager-learn/tutorials/develop-spa-angular/overview.html)
* [Create your first React SPA in AEM](https://docs.adobe.com/content/help/en/experience-manager-learn/tutorials/develop-spa-react/overview.html)

The starter and solution branches in this repository correspond to **Angular** and **React** versions of the tutorial.

## Modules

The main parts of the project are:

* **core**: Java bundle containing all core functionality like OSGi services, listeners or schedulers, as well as component-related Java code such as servlets or request filters.
* **ui.apps**: contains the /apps (and /etc) parts of the project, ie JS&CSS clientlibs, components, templates and runmode specific configs
* **ui.content**: contains sample content using the components from the ui.apps
* **ui.tests**: Java bundle containing JUnit tests that are executed server-side. This bundle is not to be deployed onto production.
* **ui.frontend**: an optional dedicated front-end build mechanism. Depending on the branch this will be either the **React** or **Angular** source code.

## How to build

To build all the modules run in the project root directory the following command with Maven 3:

mvn clean install

If you have a running AEM instance you can build and package the whole project and deploy into AEM with

mvn clean install -PautoInstallSinglePackage

Or to deploy it to a publish instance, run

mvn clean install -PautoInstallSinglePackagePublish

The starter and solution branches in this repository correspond to **React** and **Angular** versions of the tutorial.
### Building for AEM 6.x.x

## React Branches
The project has been designed for **AEM as a Cloud Service**. The project is also backward compatible with AEM **6.4.8** by adding the `classic` profile when executing a build, i.e:

* **Create a Project**
* [Tutorial](https://docs.adobe.com/content/help/en/experience-manager-learn/tutorials/develop-spa-react/create-project.html)
* [Solution](https://github.com/adobe/aem-guides-wknd-spa/tree/React/create-project-solution)
* **Integrate the SPA**
* [Tutorial](https://docs.adobe.com/content/help/en/experience-manager-learn/tutorials/develop-spa-react/integrate-spa.html)
* [Start](https://github.com/adobe/aem-guides-wknd-spa/tree/React/integrate-spa-start)
* [Solution](https://github.com/adobe/aem-guides-wknd-spa/tree/React/integrate-spa-solution)
mvn clean install -PautoInstallSinglePackage -Pclassic
4 changes: 2 additions & 2 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<embedded>
<groupId>com.adobe.aem</groupId>
<artifactId>spa.project.core.ui.apps</artifactId>
<target>/apps/wknd-spa-react-vendor-packages/install</target>
<target>/apps/wknd-spa-react-vendor-packages/application/install</target>
</embedded>
</embeddeds>
</configuration>
Expand Down Expand Up @@ -182,7 +182,7 @@
<embedded>
<groupId>com.adobe.aem</groupId>
<artifactId>spa.project.core.ui.apps</artifactId>
<target>/apps/wknd-spa-react-vendor-packages/install</target>
<target>/apps/wknd-spa-react-vendor-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.cq</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CreatePageIT {
// passed to the tests.

@ClassRule
public static CQAuthorClassRule cqBaseClassRule = new CQAuthorClassRule();
public static final CQAuthorClassRule cqBaseClassRule = new CQAuthorClassRule();

// CQRule decorates your test and adds additional functionality on top of
// it, like session stickyness, test filtering and identification of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class GetPageIT {
// passed to the tests.@ClassRule

@ClassRule
public static CQAuthorPublishClassRule cqBaseClassRule = new CQAuthorPublishClassRule();
public static final CQAuthorPublishClassRule cqBaseClassRule = new CQAuthorPublishClassRule();

// CQRule decorates your test and adds additional functionality on top of
// it, like session stickyness, test filtering and identification of the
Expand Down
67 changes: 65 additions & 2 deletions ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
</plugin>
</plugins>
</build>

<!-- ====================================================================== -->
<!-- D E P E N D E N C I E S -->
<!-- ====================================================================== -->
Expand Down Expand Up @@ -211,5 +210,69 @@
</dependency>
</dependencies>


<!-- Additional profile to support AEM 6.x -->
<profiles>
<profile>
<id>classic</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>com.adobe.aem.guides</group>
<name>wknd-spa-react.ui.apps</name>
<packageType>application</packageType>
<accessControlHandling>merge</accessControlHandling>
<properties>
<cloudManagerTarget>none</cloudManagerTarget>
</properties>
<repositoryStructurePackages>
<repositoryStructurePackage>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>wknd-spa-react.ui.apps.structure</artifactId>
</repositoryStructurePackage>
</repositoryStructurePackages>
<embeddeds>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>wknd-spa-react.core</artifactId>
<target>/apps/wknd-spa-react/install</target>
</embedded>
<embedded>
<groupId>com.adobe.aem</groupId>
<artifactId>spa.project.core.core</artifactId>
<target>/apps/wknd-spa-react/install</target>
</embedded>
<!-- Embed Core Component dependency 6.x -->
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<target>/apps/wknd-spa-react/install</target>
</embedded>
</embeddeds>
<dependencies>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.config</artifactId>
</dependency>
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>spa.project.core.ui.apps</artifactId>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit c818746

Please sign in to comment.