Permalink
Browse files

why are my unit tests not working??????

  • Loading branch information...
1 parent cd4685f commit 8e244118a8d5844999b37f3a1c23cb503c973bde @sirrapa committed Dec 13, 2012
View
@@ -1,4 +1,61 @@
nodejs-maven-plugin
===================
-A maven plugin that executes nodejs commands
+A maven plugin that executes nodejs commands
+
+How to install:
+
+Repository
+Upload nodejs artifact to your own repository or use Sirrapa repository.
+Configure Sirrapa repository
+<pre>
+<pre>
+
+Configure your pom file:
+<pre>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>sample</groupId>
+ <artifactId>maven-sample</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Sample pom</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.sirrapa.maven.plugins</groupId>
+ <artifactId>nodejs-maven-plugin</artifactId>
+ <configuration>
+ <goal>compile</goal>
+ <!-- Optional, the values are default -->
+ <nodejsGroupId>org.nodejs</nodejsGroupId>
+ <nodejsArtifactId>nodejs</nodejsArtifactId>
+ <nodejsVersion>0.8.15</nodejsVersion>
+ <nodejsClassifier>${os.family}</nodejsClassifier>
+ <nodejsType>tar</nodejsType>
+ <!-- Optional end -->
+ <modules>
+ <module>
+ <name>jshint.js</name>
+ <arguments>
+ <argument>--node foo bar</argument>
+ </arguments>
+ </module>
+ <module>
+ <name>r.js</name>
+ <arguments>
+ <argument>--o out.js</argument>
+ </arguments>
+ </module>
+ </modules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+<pre>
+
+Test it
+<pre>
+mvn nodejs:compile
+<pre>
View
177 pom.xml
@@ -13,7 +13,11 @@
<packaging>maven-plugin</packaging>
<properties>
<mavenVersion>2.2.1</mavenVersion>
- <mavenPluginVersion>2.2.1</mavenPluginVersion>
+ <mavenPrevVersion>2.0.9</mavenPrevVersion>
+ <doxiaVersion>1.0</doxiaVersion>
+ <pluginTestingVersion>2.1</pluginTestingVersion>
+ <mavenPluginPluginVersion>3.1</mavenPluginPluginVersion>
+
<nodejs.version>0.8.15</nodejs.version>
</properties>
<profiles>
@@ -50,79 +54,6 @@
<envClassifier>mac</envClassifier>
</properties>
</profile>
- <profile>
- <id>run-its</id>
- <properties>
- <localRepositoryPath>${project.build.testOutputDirectory}/m2repo</localRepositoryPath>
- </properties>
- <build>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/pom.xml</include>
- </includes>
- </testResource>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>false</filtering>
- <excludes>
- <exclude>**/pom.xml</exclude>
- </excludes>
- </testResource>
- <testResource>
- <directory>src/test/filtered-resources</directory>
- <filtering>true</filtering>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <configuration>
- <escapeString>\</escapeString>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-invoker-plugin</artifactId>
- <version>1.8</version>
- <configuration>
- <!-- NOTE: Must be synced with the repo path used by NodeJsPluginIT -->
- <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
- <goals>
- <goal>clean</goal>
- <goal>package</goal>
- </goals>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/*IT.java</include>
- </includes>
- <systemPropertyVariables combine.children="append">
- <!--<maven.home>${maven.home}</maven.home>-->
- <userlocalRepository>${settings.localRepository}</userlocalRepository>
- <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
- <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
- <basedirectory>${basedir}</basedirectory>
- </systemPropertyVariables>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<dependencies>
<dependency>
@@ -133,41 +64,87 @@
<type>tar</type>
</dependency>
<dependency>
- <groupId>org.apache.maven.plugin-testing</groupId>
- <artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.2</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.6</version>
</dependency>
+
+ <!-- dependencies to annotations -->
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-compat</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>${mavenPluginPluginVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- test -->
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- this seems to be a critical dependency,
+ must be declared before org.apache.maven.plugin-testing so it's first on the classpath -->
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>maven-compat</artifactId>
+ <groupId>org.apache.maven</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.6</version>
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>${pluginTestingVersion}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>maven-compat</artifactId>
+ <groupId>org.apache.maven</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-verifier</artifactId>
- <version>1.3</version>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.9</version>
+ <scope>test</scope>
</dependency>
</dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>${mavenPluginPluginVersion}</version>
+ <configuration>
+ <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+ </configuration>
+ <executions>
+ <execution>
+ <id>mojo-descriptor</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>descriptor</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>help-goal</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
<developers>
<developer>
<id>aparris</id>
Oops, something went wrong.

0 comments on commit 8e24411

Please sign in to comment.