Comments (9)
This has been a long-suffering todo (July 2010?)--each of the jasmine maven goals explicitly binds to the appropriate lifecycle phase, but no goal depends on another goal. I too would expect jasmine:test to depend on the previous two.
Frankly I just didn't know how to do this and I never got around to finding out. If anyone knows how to make a mojo depend on a prior one, I'd gladly implement it (I hate spelling out more goals in the POM than necessary anyway).
from jasmine-maven-plugin.
Hehe ok - how about the spec ordering? I am not sure why explicitly referencing the targets would cause different output to using "mvn package" or "mvn site" - any ideas why it would behav different ?
from jasmine-maven-plugin.
Further investigation has found that it works if I explicitly call the lifecycle items that the 4 jasmine: items bind to, e.g.
mvn clean process-resources process-test-resources generate-test-resources test
But if I call it like this:
mvn jasmine:resources jasmine:testResources jasmine:test
I get my "wrong spec order" bug. I think the POM configuration properties are not being set on the mojos, meaning the defaults are being used and no order coercion happens. I think this is the case, because the "mvn jasmine:.." execution spits out this line below, even though jsSrcDir is set in the POM.
[WARNING] JavaScript source folder was expected but was not found. Set configuration property jsSrcDir
to the directory containing your JavaScript sources. Skipping jasmine:resources processing.
Hope this makes sense.
from jasmine-maven-plugin.
Yeah, it does. I think I'd observed something similar in the past, but never chased it down.
So I think you've identified two problems:
- When the goals are invoked independently, they don't load custom configuration from the pom (this may suggest that the plugin short name ['jasmine:xxxx' ] was set up incorrectly).
- When you run the goal jasmine:test, it doesn't depend on the previous two goals, but it really should.
Both of these are officially bothering the heck out of me. Anyone reading this have any ideas of places to look to resolve it? Otherwise my next step is to go start reading the source of other plugins that don't have this problem.
from jasmine-maven-plugin.
I think I've finally figured this out, @thetoolman! I'm 99% sure that the reason this happens is because your (our) configuration is inside the <execution/>
block. I'm currently in the middle of a pretty hefty release to the plugin, so I won't update the documentation right this minute, but it's an important thing to keep in mind.
I've posted my Q&A on stackoverflow for reference. http://stackoverflow.com/questions/6560904/why-might-my-maven-mojo-lose-its-configuration-properties-when-run-individually/6561110#6561110
from jasmine-maven-plugin.
Wooo chearleading from the sides if you have solved this bug! I'll absorb the S-O and try your new version..
from jasmine-maven-plugin.
@thetoolman - to be clear, I didn't change any code. I simply changed my own project's pom that looked like this:
<plugin>
</executions>
<execution>
<configuration/>
</execution>
</executions>
</plugin>
And moved up the configuration:
<plugin>
</executions>
<execution>
</execution>
</executions>
<configuration/>
</plugin>
from jasmine-maven-plugin.
Having now read the S-O article, I got that thanks :)
from jasmine-maven-plugin.
But, what if I need 2 different configurations for 2 different executions?
I wanted to run the test goal on the target, with minified resources, and the bdd goal on the src, to hot edit code and keep tests green. If there is only 1 configuration I cannot do this.
Example of what I would expect:
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.2.0.0</version>
<extensions>true</extensions>
<executions>
<execution>
<!-- set phase to after the minimisation -->
<phase>integration-test</phase>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<jsSrcDir>${project.build.directory}/${project.build.finalName}/js-lib</jsSrcDir>
<sourceIncludes>
<include>angular.min-1.0.3.js</include>
<include>all.js</include>
</sourceIncludes>
</configuration>
</execution>
<execution>
<id>bdd</id>
<goals>
<goal>bdd</goal>
</goals>
<configuration>
<jsSrcDir>${project.basedir}/src/main/webapp/js-lib</jsSrcDir>
<sourceIncludes>
<include>angular.min-1.0.3.js</include>
<include>all.js</include>
</sourceIncludes>
</configuration>
</execution>
</executions>
</plugin>
from jasmine-maven-plugin.
Related Issues (20)
- Jasmine-Maven plugin error in Windows platform HOT 1
- antlr error HOT 1
- ReferenceErrors when running in Jenkins with symlinked JENKINS_HOME HOT 3
- How to use phantomjs 2.1.1 HOT 1
- Jenkins Maven Integration with Jasmine broken since 2.2 (Test results not shown) HOT 2
- Cannot make it work with ManualSpecRunner HOT 2
- Allow users to configure tests to run in a random order HOT 2
- turnoff the default reports generated by this plugin and print only the custom reporter messages HOT 1
- Can't customize ChromeDriver on 3.0-alpha-01 HOT 2
- Update the github pages site HOT 1
- Unable to set WebDriver IE specific capability ignoreProtectedModeSettings HOT 2
- Chrome version 74 HOT 4
- The documentation page is down HOT 3
- Blocked testing with latest version HOT 11
- Cannot make it work with RemoteWebDriver and Docker HOT 5
- timeout error after waiting for 300 sec with version 3.0-beta-01 HOT 2
- jasmine:bdd (version 3.0-beta-01) opens browser but jetty gives 403 HOT 3
- Broken link for usage page HOT 2
- The link to documentation at github is broken. HOT 5
- plugin doesn't work with Chrome version 117 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasmine-maven-plugin.