アダプティブFormsコアコンポーネントの有効化

バージョン 記事リンク
AEM 6.5 ここをクリックしてください
AEM as a Cloud Service この記事

AEM Formsas a Cloud ServiceのアダプティブFormsコアコンポーネントを有効にすると、AEM FormsCloud Serviceインスタンスを使用して、複数のチャネルに対して、アダプティブFormsおよびヘッドレスFormsベースのコアコンポーネントの作成、公開、配信を開始できます。 ヘッドレスアダプティブフォームを使用するには、アダプティブフォームコアコンポーネントを有効にした環境が必要です。

検討事項

アダプティブFormsコアコンポーネントとヘッドレスアダプティブFormsの有効化

AEM Formsas a Cloud Service環境でアダプティブFormsコアコンポーネントとヘッドレスアダプティブFormsを有効にするには、次の手順を上の順に実行します

コアコンポーネントとヘッドレスアダプティブフォームの有効化

1. AEM Forms as a Cloud Service Git リポジトリを複製する

  1. Cloud Manager にログインし、組織とプログラムを選択します。

  2. プログラムの概要​ページから​パイプライン​カードに移動し、「リポジトリ情報にアクセス」ボタンをクリックして、Git リポジトリにアクセスして管理します。このページには以下の情報が含まれます。

    • Cloud Manager Git リポジトリへの URL。
    • Git リポジトリの資格情報(ユーザー名とパスワード)Git ユーザー名。

    パスワードを生成」をクリックして、パスワードを表示または生成します。

  3. ローカルコンピューターでターミナルまたはコマンドプロンプトを開いて、次のコマンドを実行します。

    git clone [Git Repository URL]
    

    プロンプトが表示されたら、資格情報を入力します。リポジトリがローカルコンピューターに複製されます。

2. Git リポジトリにアダプティブフォームコアコンポーネントの依存関係を追加する

  1. プレーンテキストコードエディターで Git リポジトリフォルダーを開きます。例:VS Code

  2. [AEM Repository Folder]\pom.xml ファイルを編集用に開きます。

  3. core.forms.components.versioncore.forms.components.af.version および core.wcm.components.version のコンポーネントのバージョンを、コアコンポーネントのドキュメントで指定されているバージョンに置き換えます。コンポーネントが存在しない場合は、これらのコンポーネントを追加します。

    <!-- Replace the version with the latest released version at https://github.com/adobe/aem-core-forms-components/tags -->
    
    <properties>
        <core.wcm.components.version>2.22.10</core.wcm.components.version>
        <core.forms.components.version>2.0.18</core.forms.components.version>
        <core.forms.components.af.version>2.0.18</core.forms.components.af.version>
    </properties>
    

    フォームのコアコンポーネントの最新バージョンについて言及

  4. [AEM Repository Folder]\pom.xml ファイルの依存関係セクションに次の依存関係を追加し、ファイルを保存します。

        <!-- WCM Core Component Examples Dependencies -->
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.apps</artifactId>
                <type>zip</type>
                <version>${core.wcm.components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.content</artifactId>
                <type>zip</type>
                <version>${core.wcm.components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.config</artifactId>
                <version>${core.wcm.components.version}</version>
                <type>zip</type>
            </dependency>
            <!-- End of WCM Core Component Examples Dependencies -->
            <!-- Forms Core Component Dependencies -->
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-core</artifactId>
                <version>${core.forms.components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-apps</artifactId>
                <version>${core.forms.components.version}</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-af-core</artifactId>
                <version>${core.forms.components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-af-apps</artifactId>
                <version>${core.forms.components.version}</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-examples-apps</artifactId>
                <type>zip</type>
                <version>${core.forms.components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-examples-content</artifactId>
                <type>zip</type>
                <version>${core.forms.components.version}</version>
            </dependency>
    <!-- End of AEM Forms Core Component Dependencies -->
    
  5. [AEM Repository Folder]/all/pom.xml ファイルを編集用として開きます。次の依存関係を <embeddeds> セクションに追加し、ファイルを保存します。

    <!-- WCM Core Component Examples Dependencies -->
    
    <!-- inside plugin config of filevault-package-maven-plugin -->
    <!-- embed wcm core components examples artifacts -->
    
    <embedded>
        <groupId>com.adobe.cq</groupId>
        <artifactId>core.wcm.components.examples.ui.apps</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/content/install</target>
    </embedded>
    <embedded>
        <groupId>com.adobe.cq</groupId>
        <artifactId>core.wcm.components.examples.ui.content</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/content/install</target>
    </embedded>
    <embedded>
        <groupId>com.adobe.cq</groupId>
        <artifactId>core.wcm.components.examples.ui.config</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/content/install</target>
    </embedded>
    <!-- embed forms core components artifacts -->
    <embedded>
        <groupId>com.adobe.aem</groupId>
        <artifactId>core-forms-components-af-apps</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/application/install</target>
    </embedded>
    <embedded>
        <groupId>com.adobe.aem</groupId>
        <artifactId>core-forms-components-af-core</artifactId>
        <target>/apps/${appId}-vendor-packages/application/install</target>
    </embedded>
    <embedded>
        <groupId>com.adobe.aem</groupId>
        <artifactId>core-forms-components-examples-apps</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/content/install</target>
    </embedded>
    <embedded>
        <groupId>com.adobe.aem</groupId>
        <artifactId>core-forms-components-examples-content</artifactId>
        <type>zip</type>
        <target>/apps/${appId}-vendor-packages/content/install</target>
    </embedded>
    
    メモ

    ${appId} を appId に置き換えます。

    ${appId} を見つけるには、[AEM Repository Folder]/all/pom.xml ファイル内で -packages/application/install を検索します。-packages/application/install の前のテキストが ${appId} です。例えば、次のコードは myheadlessform${appId} です。



    com.myheadlessform
    myheadlessform.ui.apps
    zip
    /apps/myheadlessform-packages/application install

  6. [AEM Repository Folder]/all/pom.xml ファイルの <dependencies> セクションに、次の依存関係を追加し、ファイルを保存します。

            <!-- Other existing dependencies -->
            <!-- wcm core components examples dependencies -->
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.apps</artifactId>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.config</artifactId>
                <type>zip</type>
                </dependency>
            <dependency>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.examples.ui.content</artifactId>
                <type>zip</type>
            </dependency>
                <!-- forms core components dependencies -->
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-af-apps</artifactId>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-examples-apps</artifactId>
                <type>zip</type>
            </dependency>
                <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>core-forms-components-examples-content</artifactId>
                <type>zip</type>
            </dependency>
    
  7. [AEM Repository Folder]/ui.apps/pom.xml を開いて編集します。af-core bundle 依存関係を追加し、ファイルを保存します。

        <dependency>
        <groupId>com.adobe.aem</groupId>
        <artifactId>core-forms-components-af-core</artifactId>
        </dependency>
    
    メモ

    次のアダプティブフォームのコアコンポーネントアーティファクトがプロジェクトに含まれていないことを確認します。

    <dependency>

    <groupId>com.adobe.aem</groupId>
    <artifactId>core-forms-components-apps</artifactId>

    </dependency>

    および

    <dependency>

    <groupId>com.adobe.aem</groupId>
    <artifactId>core-forms-components-core</artifactId>

    </dependency>

  8. ファイルを保存して閉じます。

3.更新したコードをビルドしてデプロイする

更新したコードをローカル開発環境とCloud Service環境にデプロイして、両方の環境でコアコンポーネントを有効にします。

更新されたコードをビルドし、ローカル開発環境にデプロイする

  1. コマンドプロンプトまたはターミナルを開きます。

  2. Git リポジトリープロジェクトのルートディレクトリに移動します。

  3. 次のコマンドを実行して、環境用のパッケージをビルドします。

        mvn clean install
    

    パッケージが正常にビルドされたら、次の場所で見つけることができます。 [Git リポジトリフォルダー]\all\target[appid].all-[version].zip

  4. 以下を使用します。 パッケージマネージャー をデプロイするには [AEM Archetype プロジェクトフォルダー]\all\target[appid].all-[version]ローカル開発環境の.zip パッケージ。

更新されたコードをビルドし、AEM Forms as a Cloud Service環境にデプロイする

  1. ターミナルまたはコマンドプロンプトを開きます。

  2. [AEM Repository Folder] に移動し、次のコマンドを順番に実行します。

     git add pom.xml
     git add all/pom.xml
     git add ui.apps/pom.xml
     git commit -m "Added dependencies for Adaptive Forms Core Components"
     git push origin
    
  3. ファイルが Git リポジトリにコミットされた後、パイプラインを実行します。

    パイプラインが正常に実行されると、対応する環境でアダプティブフォームのコアコンポーネントが有効になります。また、アダプティブフォーム(コアコンポーネント)テンプレートと Canvas 3.0 テーマが、Forms as a Cloud Service 環境に追加され、コアコンポーネントベースのアダプティブフォームをカスタマイズして作成するオプションが提供されます。

よくある質問

コアコンポーネントとは何ですか?

コアコンポーネントは、AEM で web サイトの開発時間を短縮しメンテナンスコストを削減するための、標準化された web コンテンツ管理(WCM)コンポーネントのセットです。

コアコンポーネントを有効にすると追加される機能は?

お使いの環境でアダプティブフォームのコアコンポーネントを有効にすると、空白のコアコンポーネントベースのアダプティブフォームテンプレートと Canvas 3.0 テーマが環境に追加されます。お使いの環境でアダプティブフォームのコアコンポーネントを有効にすると、次の操作を実行できます。

アダプティブフォームのコアコンポーネントは、自分の環境で有効になっていますか?

お使いの環境でアダプティブフォームのコアコンポーネントが有効になっていることを確認するには、次の操作を行います。

  1. AEM Forms as a Cloud Service リポジトリを複製します

  2. AEM Forms Cloud Service Git リポジトリの [AEM Repository Folder]/all/pom.xml ファイルを開きます。

  3. 次の依存関係を検索します。

    • core-forms-components-af-core
    • core-forms-components-core
    • core-forms-components-apps
    • core-forms-components-af-apps
    • core-forms-components-examples-apps
    • core-forms-components-examples-content

    all/pom.xml で core-forms-components-af-core アーティファクトを見つける

    依存関係が存在する場合、お使いの環境でアダプティブフォームのコアコンポーネントが有効になります。

このページ