Adobe-Consulting-Services/acs-aem-commons

View on GitHub
oakpal-checks/pom.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ACS AEM Commons
  ~
  ~ Copyright (C) 2013 - 2023 Adobe
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <!-- ====================================================================== -->
    <!-- P A R E N T P R O J E C T D E S C R I P T I O N -->
    <!-- ====================================================================== -->
    <parent>
        <groupId>com.adobe.acs</groupId>
        <artifactId>acs-aem-commons</artifactId>
        <version>6.6.1-SNAPSHOT</version>
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T D E S C R I P T I O N -->
    <!-- ====================================================================== -->

    <artifactId>acs-aem-commons-oakpal-checks</artifactId>
    <packaging>jar</packaging>
    <name>ACS AEM Commons Oakpal Checks</name>
    <description>AEM Oakpal Checks for ACS AEM Commons Package.</description>

    <!-- ====================================================================== -->
    <!-- B U I L D D E F I N I T I O N -->
    <!-- ====================================================================== -->
    <build>
        <plugins>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                        <configuration>
                            <bnd><![CDATA[
                                Bundle-SymbolicName: com.adobe.acs.acs-aem-commons-oakpal-checks
                                Oakpal-ModuleName: com.adobe.acs.acs-aem-commons-oakpal-checks
                                Oakpal-Checklist: OAKPAL-INF/checklist/acs-internal.json,\
                                    OAKPAL-INF/checklist/acs-commons-integrators.json,\
                                    OAKPAL-INF/checklist/content-class-aem64.json,\
                                    OAKPAL-INF/checklist/content-class-aem65.json
                                Export-Package: com.adobe.acs.commons.oakpal.checks
                            ]]></bnd>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.adamcin.oakpal</groupId>
                <artifactId>oakpal-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>opear-package</id>
                        <goals>
                            <goal>opear-plan</goal>
                            <goal>opear-package</goal>
                        </goals>
                        <configuration>
                            <planParams>
                                <checklists>
                                    <checklist>basic</checklist>
                                    <checklist>acs-commons-integrators</checklist>
                                    <checklist>content-class-aem65</checklist>
                                </checklists>
                            </planParams>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <!-- here we need to explicitly list the set of dependencies which are allowed with scope=compile -->
                                    <includes>
                                        <include>org.osgi:osgi.core</include>
                                    </includes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>extract-bundle-info</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>groovy-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>extract-bundle-info</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <defaults>
                                        <aemVersion>6.5</aemVersion>
                                    </defaults>
                                    <source>${pom.basedir}/src/main/script/ExtractBundleInfo.groovy</source>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.groovy.modules.http-builder</groupId>
                                <artifactId>http-builder</artifactId>
                                <version>0.7</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>webster-aem65</id>
            <!-- to be able to execute oakpal:webster with this profile, first create a profile with the same name in
            your settings.xml file that sets a "webster.repositoryHome" property with an absolute path to the
            crx-quickstart/repository directory of a locally-installed AEM 6.5 server. -->
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.adamcin.oakpal</groupId>
                        <artifactId>oakpal-maven-plugin</artifactId>
                        <configuration>
                            <websterTargets>
                                <checklist>
                                    <file>src/main/resources/OAKPAL-INF/checklist/content-class-aem65.json</file>
                                    <config>
                                        <selectNodeTypes>
                                            <type>granite:PublicArea</type>
                                            <type>granite:FinalArea</type>
                                            <type>granite:InternalArea</type>
                                            <type>granite:AbstractArea</type>
                                        </selectNodeTypes>
                                        <nodeTypeFilters>
                                            <filter>
                                                <type>exclude</type>
                                                <pattern>nt:file</pattern>
                                            </filter>
                                            <filter>
                                                <type>exclude</type>
                                                <pattern>nt:resource</pattern>
                                            </filter>
                                        </nodeTypeFilters>
                                    </config>
                                </checklist>
                            </websterTargets>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <!-- override managed version from io.wcm.maven.aem-dependencies -->
            <dependency>
                <artifactId>oak-jcr</artifactId>
                <groupId>org.apache.jackrabbit</groupId>
                <version>1.26.0</version><!-- use Oak version used in oakpal-core -->
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.adamcin.oakpal</groupId>
            <artifactId>oakpal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>net.adamcin.oakpal</groupId>
            <artifactId>oakpal-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.adamcin.oakpal</groupId>
            <artifactId>oakpal-testing</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>