-
-
Save anismiles/8781262 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
<groupId>org.acme.test</groupId> | |
<artifactId>nodejs-dependency</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>nodejs-dependency</name> | |
<description>NodeJS Dependency Project - to be references in nodejs-test</description> | |
<packaging>jar</packaging> | |
<properties> | |
</properties> | |
<organization> | |
<name>A.C.M.E.</name> | |
</organization> | |
<scm> | |
<developerConnection>scm:git:[email protected]:nodejs-dependency.git</developerConnection> | |
</scm> | |
<build> | |
<finalName>${project.name}</finalName> | |
<sourceDirectory>modules</sourceDirectory> | |
<testSourceDirectory>test</testSourceDirectory> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-resources-plugin</artifactId> | |
<version>2.4.3</version> | |
<configuration> | |
<encoding>UTF-8</encoding> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.7</version> | |
<executions> | |
<execution> | |
<id>compile</id> | |
<phase>compile</phase> | |
<configuration> | |
<tasks> | |
<!-- | |
SCM doesn't contain dependencies, so we need to install them | |
they are placed locally in node_modules folder | |
private dependencies are extracted using maven-dependency-plugin | |
--> | |
<echo message="========== installing public dependencies ===================" /> | |
<exec executable="npm" dir="${project.basedir}" failonerror="true"> | |
<arg value="install" /> | |
</exec> | |
</tasks> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>test</id> | |
<phase>test</phase> | |
<configuration> | |
<tasks> | |
<!-- | |
runs tests and exports results in specified location so Jenkins can find them | |
doesn't fail on error because we want Jenkins to pick up failed tests | |
--> | |
<echo message="========== running tests with JUnit compatible results ===================" /> | |
<exec executable="node_modules/nodeunit/bin/nodeunit" dir="${project.basedir}" failonerror="false"> | |
<arg value="--reporter" /> | |
<arg value="junit" /> | |
<arg value="test/" /> | |
<arg value="--output" /> | |
<arg value="target/failsafe-reports" /> | |
</exec> | |
</tasks> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version>2.6</version> | |
<executions> | |
<execution> | |
<id>unpack</id> | |
<phase>compile</phase> | |
<goals> | |
<goal>unpack-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory>${project.basedir}/node_modules</outputDirectory> | |
<overWriteReleases>false</overWriteReleases> | |
<overWriteSnapshots>true</overWriteSnapshots> | |
<useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact> | |
<includeGroupIds>org.acme.test</includeGroupIds> | |
<stripVersion>true</stripVersion> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<version>2.2</version> | |
<executions> | |
<execution> | |
<id>make-zip-assembly</id> | |
<phase>package</phase> | |
<goals> | |
<goal>single</goal> | |
</goals> | |
<configuration> | |
<finalName>${project.name}-${project.version}</finalName> | |
<appendAssemblyId>false</appendAssemblyId> | |
<descriptors> | |
<descriptor>assembly-zip.xml</descriptor> | |
</descriptors> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<dependencies> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment