<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.gadgets</groupId>
        <artifactId>atlassian-gadgets</artifactId>
        <version>11.0.0</version>
    </parent>

    <artifactId>atlassian-gadgets-opensocial-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Opensocial Plugin</name>
    <description>Plugin for OpenSocial API Support and Gadget Rendering</description>

    <properties>
        <atlassian.plugin.key>com.atlassian.gadgets.opensocial</atlassian.plugin.key>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency><!-- transitive, provided by platform-public-api -->
                <groupId>com.atlassian.security</groupId>
                <artifactId>atlassian-secure-xml</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency><!-- transitive, provided by platform-public-api -->
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency><!-- transitive, provided by platform-public-api -->
                <groupId>com.rometools</groupId>
                <artifactId>rome</artifactId>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Compile-time, bundled dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-shared</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-bridge</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-common</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.annotations</groupId>
                    <artifactId>atlassian-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-gadgets</artifactId>
        </dependency>
        <dependency>
            <groupId>org.htmlunit</groupId>
            <artifactId>neko-htmlunit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>

        <!-- Provided, non-bundled dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.http</groupId>
            <artifactId>atlassian-http</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- transitive from gadgets-shared, needed for tests -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>edu.emory.mathcs.backport</groupId>
            <artifactId>com.springsource.edu.emory.mathcs.backport</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>io.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- transitive from gadgets-shared, needed for tests -->
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-internal-api -->
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.aopalliance</groupId>
            <artifactId>com.springsource.org.aopalliance</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- used by Shindig, but also provided by platform-public-api -->
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform-public-api -->
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Runtime-only dependencies -->
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-features</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- opensocial dependencies -->
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-social-api</artifactId>
        </dependency>
        <!-- Hamcrest is used by Shindig in production, hence compile scope -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
        </dependency>

        <!-- Test deps -->
        <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>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-test-framework</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-whitelist-api-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <configuration>
                    <fail>false</fail>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>refapp-maven-plugin</artifactId>
                <configuration>
                    <output>${project.build.directory}/refapp.log</output>
                    <productVersion>${atlassian.refapp.version}</productVersion>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Bundle-SymbolicName>${atlassian.plugin.key}</Bundle-SymbolicName>
                        <Spring-Context>*</Spring-Context>
                        <Private-Package>
                            com.atlassian.gadgets.renderer.internal.*,
                            com.atlassian.gadgets.opensocial.internal.*
                        </Private-Package>
                        <Export-Package />
                        <Import-Package>
                            !org.apache.tools.ant.*,
                            !org.apache.xerces.internal.*,
                            !org.easymock.*,
                            !junit.*,
                            !org.jmock.*,
                            !com.google.caja.*,
                            !com.google.inject.cglib.asm.util,
                            !com.atlassian.oauth.serviceprovider,
                            !com.google.inject.internal.*,
                            !com.ibm.icu.text,
                            !com.sun.org.apache.xerces.*,
                            !net.sf.ehcache.*,
                            !org.jgroups.*,
                            !org.hibernate.cache.*,
                            !org.apache.commons.digester.*,
                            !org.codehaus.groovy.*,
                            !net.sf.cglib.proxy.*,
                            !sun.misc*,
                            !nu.xom.*,
                            !org.apache.oro.text.regex.*,
                            !sun.reflect.*,
                            !groovy.lang.*,
                            !javax.jms.*,
                            !org.apache.log.*,
                            !org.apache.commons.betwixt.*,
                            !net.sf.jsr107cache.*,
                            !org.xmlpull.*,
                            !net.sf.ezmorph.*,
                            !net.sf.json.*,
                            !com.bea.xml.*,
                            !com.ctc.wstx.stax.*,
                            !com.ibm.xml.xlxp.*,
                            !com.sun.xml.internal.*,
                            !org.codehaus.jettison.*,
                            !org.jdom.*, <!-- xstream has "optional" dependency; it is not used in this plugin -->
                            !org.kxml2.io.*,
                            !org.joda.time.*,
                            !javax.servlet.*,
                            !javax.activation.*,
                            com.atlassian.security.xml.*,
                            org.apache.xerces.*;version="[2.9.1,3.0.0)",
                            org.apache.xml.serialize.*;version="[2.9.1,3.0.0)",
                            org.apache.commons.compress.compressors;resolution:=optional,
                            org.apache.commons.logging;version="1.1",
                            com.atlassian.gadgets;resolution:=optional,
                            com.atlassian.templaterenderer,
                            com.atlassian.velocity.htmlsafe,
                            org.htmlunit.cyberneko.*;resolution:=optional,
                            *
                        </Import-Package>
                    </instructions>
                    <skipManifestValidation>true</skipManifestValidation>
                    <includedFeModuleManifests>
                        <includedFeModuleManifest>${project.basedir}/package.json</includedFeModuleManifest>
                        <includedFeModuleManifest>${project.basedir}/yarn.lock</includedFeModuleManifest>
                    </includedFeModuleManifests>
                    <feManifestAssociations>
                        <feManifestAssociation>
                            <packageName>@atlassian/dc.atlassian-gadgets.opensocial-plugin</packageName>
                            <manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                                <outputDirectoryFiles>
                                    features/atlassian/util/atlassian.util.js,
                                    features/atlassian/util/atlassian.util-min.js,
                                    js/error-page.js,
                                    js/error-page-min.js,
                                </outputDirectoryFiles>
                            </manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                        </feManifestAssociation>
                    </feManifestAssociations>
                    <feExternalDependenciesDeclarations>
                        <feExternalDependenciesDeclaration>
                            <manuallyVerifiedNonAtlassianArtifactPath>META-INF/lib/shindig-gadgets-${shindig.version}.jar</manuallyVerifiedNonAtlassianArtifactPath>
                            <manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                                files/container/cookiebaseduserprefstore.js,
                                files/container/cookies.js,
                                files/container/gadgets.js,
                                files/container/rpctest_perf.js,
                                files/container/util.js,
                                files/samplecontainer/examples/popup.js,
                                files/samplecontainer/examples/rewriter/rewriter1.js,
                                files/samplecontainer/examples/rewriter/rewriter2.js,
                                files/samplecontainer/samplecontainer.js
                            </manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                        </feExternalDependenciesDeclaration>
                        <feExternalDependenciesDeclaration>
                            <manuallyVerifiedNonAtlassianArtifactPath>META-INF/lib/shindig-common-${shindig.version}.jar</manuallyVerifiedNonAtlassianArtifactPath>
                            <manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                                containers/default/container.js
                            </manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                        </feExternalDependenciesDeclaration>
                        <feExternalDependenciesDeclaration>
                            <manuallyVerifiedNonAtlassianArtifactPath>META-INF/lib/shindig-features-${shindig.version}.jar</manuallyVerifiedNonAtlassianArtifactPath>
                            <manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                                features/auth-refresh/auth-refresh.js,
                                features/auth-refresh/auth-refresh.opt.js,
                                features/core.io/io.js,
                                features/core.io/io.opt.js,
                                features/core/auth-init.js,
                                features/core/auth-init.opt.js,
                                features/core/auth.js,
                                features/core/auth.opt.js,
                                features/core/config.js,
                                features/core/config.opt.js,
                                features/core/core.js,
                                features/core/core.opt.js,
                                features/core/json.js,
                                features/core/json.opt.js,
                                features/core/legacy.js,
                                features/core/legacy.opt.js,
                                features/core/prefs.js,
                                features/core/prefs.opt.js,
                                features/core/util.js,
                                features/core/util.opt.js,
                                features/dynamic-height.util/dynamic-height-util.js,
                                features/dynamic-height.util/dynamic-height-util.opt.js,
                                features/dynamic-height/dynamic-height.js,
                                features/dynamic-height/dynamic-height.opt.js,
                                features/flash/flash.js,
                                features/flash/flash.opt.js,
                                features/minimessage/minimessage.js,
                                features/minimessage/minimessage.opt.js,
                                features/oauthpopup/oauthpopup.js,
                                features/oauthpopup/oauthpopup.opt.js,
                                features/opensocial-0.6/opensocial6to7.js,
                                features/opensocial-0.6/opensocial6to7.opt.js,
                                features/opensocial-0.7/opensocial7to8.js,
                                features/opensocial-0.7/opensocial7to8.opt.js,
                                features/opensocial-base/fieldtranslations.js,
                                features/opensocial-base/fieldtranslations.opt.js,
                                features/opensocial-base/jsonactivity.js,
                                features/opensocial-base/jsonactivity.opt.js,
                                features/opensocial-base/jsonperson.js,
                                features/opensocial-base/jsonperson.opt.js,
                                features/opensocial-jsonrpc/jsonrpccontainer.js,
                                features/opensocial-jsonrpc/jsonrpccontainer.opt.js,
                                features/opensocial-reference/activity.js,
                                features/opensocial-reference/activity.opt.js,
                                features/opensocial-reference/address.js,
                                features/opensocial-reference/address.opt.js,
                                features/opensocial-reference/bodytype.js,
                                features/opensocial-reference/bodytype.opt.js,
                                features/opensocial-reference/collection.js,
                                features/opensocial-reference/collection.opt.js,
                                features/opensocial-reference/container.js,
                                features/opensocial-reference/container.opt.js,
                                features/opensocial-reference/datarequest.js,
                                features/opensocial-reference/datarequest.opt.js,
                                features/opensocial-reference/dataresponse.js,
                                features/opensocial-reference/dataresponse.opt.js,
                                features/opensocial-reference/email.js,
                                features/opensocial-reference/email.opt.js,
                                features/opensocial-reference/enum.js,
                                features/opensocial-reference/enum.opt.js,
                                features/opensocial-reference/environment.js,
                                features/opensocial-reference/environment.opt.js,
                                features/opensocial-reference/idspec.js,
                                features/opensocial-reference/idspec.opt.js,
                                features/opensocial-reference/mediaitem.js,
                                features/opensocial-reference/mediaitem.opt.js,
                                features/opensocial-reference/message.js,
                                features/opensocial-reference/message.opt.js,
                                features/opensocial-reference/name.js,
                                features/opensocial-reference/name.opt.js,
                                features/opensocial-reference/navigationparameters.js,
                                features/opensocial-reference/navigationparameters.opt.js,
                                features/opensocial-reference/opensocial.js,
                                features/opensocial-reference/opensocial.opt.js,
                                features/opensocial-reference/organization.js,
                                features/opensocial-reference/organization.opt.js,
                                features/opensocial-reference/person.js,
                                features/opensocial-reference/person.opt.js,
                                features/opensocial-reference/phone.js,
                                features/opensocial-reference/phone.opt.js,
                                features/opensocial-reference/responseitem.js,
                                features/opensocial-reference/responseitem.opt.js,
                                features/opensocial-reference/url.js,
                                features/opensocial-reference/url.opt.js,
                                features/opensocial-rest/restfulcontainer.js,
                                features/opensocial-rest/restfulcontainer.opt.js,
                                features/opensocial-templates/base.js,
                                features/opensocial-templates/base.opt.js,
                                features/opensocial-templates/compiler.js,
                                features/opensocial-templates/compiler.opt.js,
                                features/opensocial-templates/container.js,
                                features/opensocial-templates/container.opt.js,
                                features/opensocial-templates/data.js,
                                features/opensocial-templates/data.opt.js,
                                features/opensocial-templates/domutil.js,
                                features/opensocial-templates/domutil.opt.js,
                                features/opensocial-templates/jstemplate_debug.js,
                                features/opensocial-templates/jstemplate_debug.opt.js,
                                features/opensocial-templates/loader.js,
                                features/opensocial-templates/loader.opt.js,
                                features/opensocial-templates/namespaces.js,
                                features/opensocial-templates/namespaces.opt.js,
                                features/opensocial-templates/os.js,
                                features/opensocial-templates/os.opt.js,
                                features/opensocial-templates/template.js,
                                features/opensocial-templates/template.opt.js,
                                features/opensocial-templates/util.js,
                                features/opensocial-templates/util.opt.js,
                                features/pubsub/pubsub-router.js,
                                features/pubsub/pubsub-router.opt.js,
                                features/pubsub/pubsub.js,
                                features/pubsub/pubsub.opt.js,
                                features/rpc/rpc.js,
                                features/rpc/rpc.opt.js,
                                features/setprefs/setprefs.js,
                                features/setprefs/setprefs.opt.js,
                                features/settitle/settitle.js,
                                features/settitle/settitle.opt.js,
                                features/skins/skins.js,
                                features/skins/skins.opt.js,
                                features/tabs/tabs.js,
                                features/tabs/tabs.opt.js,
                                features/views/views.js,
                                features/views/views.opt.js
                            </manuallyVerifiedEveryJsDoesntHaveExternalDependencies>
                        </feExternalDependenciesDeclaration>
                    </feExternalDependenciesDeclarations>
                </configuration>
                <executions>
                    <execution>
                        <id>js-enforcement</id>
                        <goals>
                            <goal>verify-fe-manifest-associations</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <verifyFeManifestAssociationsInputEntrypoint>
                                ${project.build.directory}/${project.build.finalName}.jar
                            </verifyFeManifestAssociationsInputEntrypoint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>