<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>org.bsc</groupId>
    <artifactId>jvm-npm</artifactId>
    <version>0.3.1</version>
  </parent>
  <artifactId>jvm-npm-rhino</artifactId>
  <name>JVM-NPM::Rhino</name>

  <properties>
    <version.rhino>1.7.7.1</version.rhino>
  </properties>
  
<dependencies>

    <dependency>
       <groupId>org.kohsuke.metainf-services</groupId>
       <artifactId>metainf-services</artifactId>
       <version>1.7</version>
       <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.mozilla</groupId>
      <artifactId>rhino</artifactId>
      <version>${version.rhino}</version>
      <optional>false</optional>
    </dependency>

</dependencies>  

<build>

<plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>install</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${project.artifactId}-${project.version}-jdk7.jar</file>
                  <type>jar</type>
                  <classifier>jdk7</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
 
</plugins>
</build>
<profiles>

	<profile>
		<id>jdk7</id>
		<build>

			<plugins>
				<plugin>
					<groupId>net.orfjackal.retrolambda</groupId>
					<artifactId>retrolambda-maven-plugin</artifactId>
					<version>2.3.0</version>
					<executions>
						<execution>
							<goals>
								<goal>process-main</goal>
								<goal>process-test</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
					<configuration>
						<classifier>jdk7</classifier>
					</configuration>
				</plugin>

			</plugins>
		</build>
	</profile>
</profiles>
</project>