<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">
    <parent>
        <artifactId>teiid-parent</artifactId>
        <groupId>org.jboss.teiid</groupId>
        <version>8.12.1</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>teiid-olingo</artifactId>
    <name>teiid-olingo</name>
    <description>Teiid OData4 Server module</description>
    <packaging>bundle</packaging>
    
    <build>
        <plugins>
            <plugin>   
              <groupId>org.apache.felix</groupId>
              <artifactId>maven-bundle-plugin</artifactId>
              <configuration>
               <instructions>
                <Import-Package>!org.jboss.*,*</Import-Package>
               </instructions>
              </configuration>
            </plugin>      
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                    <archiveClasses>true</archiveClasses>
                    <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
                    <primaryArtifact>false</primaryArtifact>
                    <!-- Needed to use classifier to avoid conflicting with top level artifact-->
                    <classifier>odata4</classifier>
                </configuration>
                <executions>
                    <execution>
                        <id>create-assemblies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>war</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>                                    
                                    <file>${project.build.directory}/${project.artifactId}-${project.version}-odata4.war</file>
                                    <type>war</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <!-- Assembly plugin does not allow multiple DependencySets see MASSEMBLY-577 thus needed to do here-->
                        <descriptor>dependencies.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                  <execution>
                    <id>create-assemblies</id>
                    <phase>package</phase>
                    <goals>
                      <goal>single</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>              
        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-common-core</artifactId>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-engine</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-client</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-admin</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.olingo</groupId>
            <artifactId>odata-commons-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.olingo</groupId>
            <artifactId>odata-commons-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.olingo</groupId>
            <artifactId>odata-server-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.olingo</groupId>
            <artifactId>odata-server-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.olingo</groupId>
            <artifactId>odata-server-core-ext</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        
		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-databind</artifactId>
		</dependency> 
        
        <!--  runtime dependencies -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml</groupId>
            <artifactId>aalto-xml</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Test dependencies -->
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-engine</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-common-core</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <artifactId>translator-loopback</artifactId>
            <groupId>org.jboss.teiid.connectors</groupId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <artifactId>translator-jdbc</artifactId>
            <groupId>org.jboss.teiid.connectors</groupId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-metadata</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-runtime</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-runtime</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>
