TheProjecter / phantomjs-qunit-runner

Automatically exported from code.google.com/p/phantomjs-qunit-runner
0 stars 0 forks source link

Missing information in pom.xml #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. copy the pom.xml plugin part in the example
2. past the part in your pom.xml file
3. run: mvn test

What is the expected output? What do you see instead?
Maven running the test.

What version of the product are you using? On what operating system?
Maven 3.0.4
phantomjs-qunit-runner 1.0.11
Ubuntu 11.10

Please provide any additional information below.
The version and executions tags where missing. This is my version of pom.xml

<plugin>
  <groupId>net.kennychua</groupId>
  <artifactId>phantomjs-qunit-runner</artifactId>
  <version>1.0.11</version>
  <executions>
    <execution>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <jsSourceDirectory>${project.basedir}/src/main/path/to/js/</jsSourceDirectory>
    <jsTestDirectory>${project.basedir}/src/test/path/to/js/</jsTestDirectory>
    <ignoreFailures>false</ignoreFailures>
    <phantomJsExec>/path/to/phantomjs</phantomJsExec>
  </configuration>
</plugin>

Original issue reported on code.google.com by peter.ah...@gmail.com on 9 Mar 2012 at 9:19

GoogleCodeExporter commented 8 years ago
I'm not sure what the failure was, but I suspect you didn't change the 
phantomJsExec to point to your local copy of phantomjs.  For example, I 
downloaded phantomjs from the website:
http://phantomjs.org/
Get the version you need and extract it.  Wherever you extract it, there will 
be a file under extracted folder, "bin/phantomjs".  This is the path you need 
to put in for: 
<phantomJsExec>/path/to/phantomjs</phantomJsExec>

Since this plugin requires a 3rd party executable, you have to tell it where to 
find that executable.  I like to put something like this in:
~/.m2/settings.xml:
<settings>
 <profiles>
  <profile>
   [...]
   <properties>
    <phantomjs.bin>[path to phantomjs]</phantomjs.bin>
   </properties>
  </profile>
  [...]
 </profiles>
</settings>

the [...] are where I have other stuff I've removed for brevity.  The [path of 
phantomjs] is the path I mentioned earlier.  Make sure this is part of your 
active profile.  Then inside of the pom, I put:

<phantomJsExec>${phantomjs.bin}</phantomJsExec>

This way other users can change the setting in their local settings file.

Original comment by br...@newtonius.com on 28 May 2012 at 9:54

GoogleCodeExporter commented 8 years ago
You can also pass in that property on the command line:
$ mvn -Dphantomjs.bin=/path/to/bin/phantomjs install

Original comment by br...@newtonius.com on 29 May 2012 at 1:25