Closed yegor256 closed 8 years ago
NO, It is not so simple ...
And ok casperjs
is just one file but it relies on several javascript modules files, and also on phantomjs (or slimerjs)
What is your real need ?
Check this article: http://www.yegor256.com/2014/06/21/casperjs-with-maven.html
I'm using Git in order to get CasperJS. Would be much better to use your plugin.
I do not agree with your approch ... the maven-compiler-plugin call a java compiler but does not supply such a compiler itself, the same for maven-gpg-plugin ... The phantomjs-maven-plugin you quote in your blog is, for me, just an ugly hack ...
Again, what is your use case ? For my part, either I ran CasperJS test on my computer where I installed CapserJS (and even several, so I can switch from one version to another), either my tests are run on a Continuous Integration system, like Jenkins, which has plugins to install on the master or on slaves needed tools by jobs
But after all, it is not my plugin ... @linsolas what do you think ?
Well, I think I agree. How about packaging casperjs as Maven artifact and deploying it to Maven Central? This is how we package PostgreSQL (https://github.com/adrianboimvaser/postgresql-maven-plugin) and MySQL (http://www.yegor256.com/2014/05/21/mysql-maven-plugin.html), for example.
why not :)
To explain one use case:
I use Jenkins to build my application, but it's hosted, and I can't install arbitrary software on the machines (CloudBees). The phantomjs-maven-plugin grabs the PhantomJS runner needed for the specific platform, so the Maven build is sufficient to get the runner activated. The compiler plugin doesn't include a JDK (probably for legal reasons as much as anything else), but JUnit will get downloaded automatically, as will compilers for languages like LESS and CoffeeScript.
@chrylis
JUnit will get downloaded
are you talking about the maven-surefire-plugin ? If yes, no, the maven-surefire-plugin does not download JUnit, it is your maven project which depends on it, making JUnit available to the surefire plugin
So, I keep thinking @yegor256 proposal is the best one
Surefire and Failsafe don't pull JUnit on their own, but it's available as a dependency on Central. I wasn't clear that the artifact suggestion @yegor256 is what I'd like to see as well.
I can give another example where casperjs
is not possible to have at the platform. It is Heroku. When I deploy a Java app to Heroku, I push my sources to them, through git. They run literally this: mvn clean package
on their server. Obviously, they don't have casperjs
installed there.
Hi !
Sorry for all this silent time ! CasperJS is not dead, neither it's maven plugin ! I just joined the CasperJs community : https://github.com/casperjs, and I will now work on the maven plugin directly from here : https://github.com/casperjs/casperjs-runner-maven-plugin So feel free to reopen an issue there and I will see what I can do for this !
Would be convenient to have an ability to load
casperjs
automatically. It is just one file, should not be difficult.