Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to run pitmp/descartes on xwiki-commons-component #18

Open
vmassol opened this issue Aug 24, 2018 · 10 comments
Open

Failing to run pitmp/descartes on xwiki-commons-component #18

vmassol opened this issue Aug 24, 2018 · 10 comments
Assignees

Comments

@vmassol
Copy link

vmassol commented Aug 24, 2018

Hi. I can run pit and descartes on this XWiki module (https://github.com/xwiki/xwiki-commons/tree/master/xwiki-commons-core/xwiki-commons-component) but it fails when I follow the quick start guide of pitmp:

[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building XWiki Commons - Component - Default Implementation 10.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- pitmp-maven-plugin:1.3.4:descartes (default-cli) @ xwiki-commons-component-default ---
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : JSON report plugin
[INFO] Found plugin : Produces a JSON file reporting mutation results aggregated by method and each method classfied according to its mutation status
[INFO] Found plugin : Generates an HTML document containing classes and methods with found testing issues
[INFO] Found plugin : Filters the mutations by their location in the source code. The wanted locations are passed via an external file
[INFO] Found plugin : Static initializer code detector plugin
[INFO] Found plugin : Static initializer filter plugin
[INFO] Found plugin : Excluded annotations plugin
[INFO] Found plugin : Inlined finally block filter plugin
[INFO] Found plugin : Try with resources filter
[INFO] Found plugin : Implicit null check filter
[INFO] Found plugin : For each loop filter
[INFO] Found plugin : Logging calls filter
[INFO] Found plugin : Infinite for loop filter
[INFO] Found plugin : Long running iterator loop filter
[INFO] Found plugin : For loop counter filter
[INFO] Found plugin : Kotlin junk mutations filter
[INFO] Found plugin : Max mutations per class limit
[INFO] Found plugin : Equals shortcut equivalent mutant filter
[INFO] Found plugin : Trivial return vals equivalence filter
[INFO] Found plugin : Mutant export plugin
[INFO] Found plugin : Removes mutation in methods which are of no interest
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Found shared classpath plugin : Engine for extreme mutation operators
[INFO] Found shared classpath plugin : JUnit plugin
[INFO] Found shared classpath plugin : TestNG plugin
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Adding eu.stamp-project:descartes to SUT classpath
[INFO] Mutating from /Users/vmassol/dev/xwiki/xwiki-commons/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/target/classes
3:35:51 PM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
3:35:51 PM PIT >> INFO : MINION : objc[70183]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x10f6ce4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10f75
3:35:51 PM PIT >> INFO : MINION : a4e0). One of the two will be used. Which one is undefined.

3:35:51 PM PIT >> INFO : Sending 88 test classes to minion
3:35:51 PM PIT >> INFO : Sent tests to minion
3:35:51 PM PIT >> INFO : MINION : 3:35:51 PM PIT >> INFO : Checking environment

3:35:52 PM PIT >> INFO : MINION : 3:35:52 PM PIT >> INFO : Found  38 tests

3:35:52 PM PIT >> INFO : MINION : 3:35:52 PM PIT >> INFO : Dependency analysis reduced number of potential tests by 0

3:35:52 PM PIT >> INFO : MINION : 3:35:52 PM PIT >> INFO : 38 tests received

3:35:52 PM PIT >> INFO : MINION : 3:35:52 PM PIT >> SEVERE : Description [testClass=org.xwiki.component.annotation.ComponentAnnotationLoaderTest, name=testPriorities(org.xwiki.component.annotation.ComponentAnnotationLoaderTest)]
java.lang.AssertionError: unexpected invocation: logger.warn(
3:35:52 PM PIT >> INFO : MINION : "Component [{}] which implements [{}] tried to overwrite component [{}]. However, no action was taken since both components have the same priority level of [{}].", ["org.xwiki.component.internal.multi.DefaultComponentManagerManager", <role = [interface org
3:35:52 PM PIT >> INFO : MINION : .xwiki.component.internal.multi.ComponentManagerManager] hint = [default]>, "org.xwiki.component.internal.multi.DefaultComponentManagerManager", <1000>])
expectations:
  expected once, never invoked: componentManager.registerComponent(<implementation = [or
3:35:52 PM PIT >> INFO : MINION : g.xwiki.component.annotation.ComponentAnnotationLoaderTest$DeprecatedOverrideRole], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.RootComponentManager], inst
3:35:52 PM PIT >> INFO : MINION : antiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.annotation.ComponentAnnotationLoaderTest$OverrideRole], instantiation = [SINGLETON]>)
  expected once, never invoked: compon
3:35:52 PM PIT >> INFO : MINION : entManager.registerComponent(<implementation = [org.xwiki.component.internal.embed.EmbeddableComponentManagerFactory], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.i
3:35:52 PM PIT >> INFO : MINION : nternal.multi.DefaultComponentManagerManager], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.ContextComponentManagerProvider], instantiation = [SINGLETON]>)

3:35:52 PM PIT >> INFO : MINION :   expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.namespace.DefaultNamespaceValidator], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<imple
3:35:52 PM PIT >> INFO : MINION : mentation = [org.xwiki.component.ProviderTest$TestProvider1], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProvider12], instantiation = [SINGLETON]>
3:35:52 PM PIT >> INFO : MINION : )
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProvider2], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org
3:35:52 PM PIT >> INFO : MINION : .xwiki.component.ProviderTest$TestComponentWithProviders], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProviderWithExceptionInInitialize], instanti
3:35:52 PM PIT >> INFO : MINION : ation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestComponentWithProviderInException], instantiation = [SINGLETON]>)
what happened before this: nothing!
	at org.jm
3:35:52 PM PIT >> INFO : MINION : ock.api.ExpectationError.unexpected(ExpectationError.java:23)
	at org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:85)
	at org.jmock.Mockery.dispatch(Mockery.java:231)
	at org.jmock.Mockery.access$100(Mockery.java:29)
	at org.jmoc
3:35:52 PM PIT >> INFO : MINION : k.Mockery$MockObject.invoke(Mockery.java:271)
	at org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java:27)
	at org.jmock.internal.FakeObjectMethods.invoke(FakeObjectMethods.java:38)
	at org.jmock.lib.concurrent.Synchroniser.synchroniseInvoc
3:35:52 PM PIT >> INFO : MINION : ation(Synchroniser.java:82)
	at org.jmock.lib.concurrent.Synchroniser.access$000(Synchroniser.java:23)
	at org.jmock.lib.concurrent.Synchroniser$1.invoke(Synchroniser.java:74)
	at org.jmock.lib.JavaReflectionImposteriser$1.invoke(JavaReflectionImposteriser
3:35:52 PM PIT >> INFO : MINION : .java:33)
	at com.sun.proxy.$Proxy19.warn(Unknown Source)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.addComponent(ComponentAnnotationLoader.java:206)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotatio
3:35:52 PM PIT >> INFO : MINION : nLoader.java:175)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:136)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:118)
	at org.xwiki.componen
3:35:52 PM PIT >> INFO : MINION : t.annotation.ComponentAnnotationLoaderTest.testPriorities(ComponentAnnotationLoaderTest.java:249)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.refl
3:35:52 PM PIT >> INFO : MINION : ect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model
3:35:52 PM PIT >> INFO : MINION : .ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.
3:35:52 PM PIT >> INFO : MINION : statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.jmock.integration.junit4.JUnitRuleMockery$1.evaluate(JUnitRuleMockery.java:49)
	at org.junit.runners.ParentRunner.run
3:35:52 PM PIT >> INFO : MINION : Leaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.ja
3:35:52 PM PIT >> INFO : MINION : va:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evalu
3:35:52 PM PIT >> INFO : MINION : ate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.pitest.junit.adapter.CustomRunnerExecutor.run(CustomRunnerExecutor.java:42)
	at org.pitest.junit.adapter.AdaptedJUnitTestUnit.execute(AdaptedJUnitTestUnit.java
3:35:52 PM PIT >> INFO : MINION : :69)
	at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:50)
	at org.pitest.testapi.execute.containers.UnContainer.execute(UnContainer.java:31)
	at org.pitest.testapi.execute.Pitest.executeTests(Pitest.java:57)
	at org.pitest.t
3:35:52 PM PIT >> INFO : MINION : estapi.execute.Pitest.run(Pitest.java:48)
	at org.pitest.coverage.execute.CoverageWorker.run(CoverageWorker.java:51)
	at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:90)
3:35:52 PM PIT >> SEVERE : Description [testClass=org.xwiki.com
3:35:52 PM PIT >> INFO : MINION : ponent.annotation.ComponentAnnotationLoaderTest, name=testPriorities(org.xwiki.component.annotation.ComponentAnnotationLoaderTest)]
java.lang.AssertionError: unexpected invocation: logger.warn("Component [{}] which implements [{}] tried to overwrite compon
3:35:52 PM PIT >> INFO : MINION : ent [{}]. However, no action was taken since both components have the same priority level of [{}].", ["org.xwiki.component.internal.multi.DefaultComponentManagerManager", <role = [interface org.xwiki.component.internal.multi.ComponentManagerManager] hint =
3:35:52 PM PIT >> INFO : MINION :  [default]>, "org.xwiki.component.internal.multi.DefaultComponentManagerManager", <1000>])
expectations:
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.annotation.ComponentAnnotationLoaderTest$Depr
3:35:52 PM PIT >> INFO : MINION : ecatedOverrideRole], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.RootComponentManager], instantiation = [SINGLETON]>)
  expected once, never invoked: compo
3:35:52 PM PIT >> INFO : MINION : nentManager.registerComponent(<implementation = [org.xwiki.component.annotation.ComponentAnnotationLoaderTest$OverrideRole], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.compo
3:35:52 PM PIT >> INFO : MINION : nent.internal.embed.EmbeddableComponentManagerFactory], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.multi.DefaultComponentManagerManager], instantiation = 
3:35:52 PM PIT >> INFO : MINION : [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.internal.ContextComponentManagerProvider], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerCompon
3:35:52 PM PIT >> INFO : MINION : ent(<implementation = [org.xwiki.component.internal.namespace.DefaultNamespaceValidator], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProvider1], i
3:35:52 PM PIT >> INFO : MINION : nstantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProvider12], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComp
3:35:52 PM PIT >> INFO : MINION : onent(<implementation = [org.xwiki.component.ProviderTest$TestProvider2], instantiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestComponentWithProviders], inst
3:35:52 PM PIT >> INFO : MINION : antiation = [SINGLETON]>)
  expected once, never invoked: componentManager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestProviderWithExceptionInInitialize], instantiation = [SINGLETON]>)
  expected once, never invoked: component
3:35:52 PM PIT >> INFO : MINION : Manager.registerComponent(<implementation = [org.xwiki.component.ProviderTest$TestComponentWithProviderInException], instantiation = [SINGLETON]>)
what happened before this: nothing!
	at org.jmock.api.ExpectationError.unexpected(ExpectationError.java:23)
	
3:35:52 PM PIT >> INFO : MINION : at org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:85)
	at org.jmock.Mockery.dispatch(Mockery.java:231)
	at org.jmock.Mockery.access$100(Mockery.java:29)
	at org.jmock.Mockery$MockObject.invoke(Mockery.java:271)
	at org.jmock.int
3:35:52 PM PIT >> INFO : MINION : ernal.InvocationDiverter.invoke(InvocationDiverter.java:27)
	at org.jmock.internal.FakeObjectMethods.invoke(FakeObjectMethods.java:38)
	at org.jmock.lib.concurrent.Synchroniser.synchroniseInvocation(Synchroniser.java:82)
	at org.jmock.lib.concurrent.Synchr
3:35:52 PM PIT >> INFO : MINION : oniser.access$000(Synchroniser.java:23)
	at org.jmock.lib.concurrent.Synchroniser$1.invoke(Synchroniser.java:74)
	at org.jmock.lib.JavaReflectionImposteriser$1.invoke(JavaReflectionImposteriser.java:33)
	at com.sun.proxy.$Proxy19.warn(Unknown Source)
	at o
3:35:52 PM PIT >> INFO : MINION : rg.xwiki.component.annotation.ComponentAnnotationLoader.addComponent(ComponentAnnotationLoader.java:206)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotationLoader.java:175)
	at org.xwiki.component.annotation.ComponentA
3:35:52 PM PIT >> INFO : MINION : nnotationLoader.initialize(ComponentAnnotationLoader.java:136)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:118)
	at org.xwiki.component.annotation.ComponentAnnotationLoaderTest.testPriorities(Compo
3:35:52 PM PIT >> INFO : MINION : nentAnnotationLoaderTest.java:249)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
3:35:52 PM PIT >> INFO : MINION : rImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.jun
3:35:52 PM PIT >> INFO : MINION : it.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.juni
3:35:52 PM PIT >> INFO : MINION : t.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.jmock.integration.junit4.JUnitRuleMockery$1.evaluate(JUnitRuleMockery.java:49)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4Cl
3:35:52 PM PIT >> INFO : MINION : assRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRun
3:35:52 PM PIT >> INFO : MINION : ner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.r
3:35:52 PM PIT >> INFO : MINION : un(ParentRunner.java:363)
	at org.pitest.junit.adapter.CustomRunnerExecutor.run(CustomRunnerExecutor.java:42)
	at org.pitest.junit.adapter.AdaptedJUnitTestUnit.execute(AdaptedJUnitTestUnit.java:69)
	at org.pitest.coverage.execute.CoverageDecorator.execute(
3:35:52 PM PIT >> INFO : MINION : CoverageDecorator.java:50)
	at org.pitest.testapi.execute.containers.UnContainer.execute(UnContainer.java:31)
	at org.pitest.testapi.execute.Pitest.executeTests(Pitest.java:57)
	at org.pitest.testapi.execute.Pitest.run(Pitest.java:48)
	at org.pitest.covera
3:35:52 PM PIT >> INFO : MINION : ge.execute.CoverageWorker.run(CoverageWorker.java:51)
	at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:90)

3:35:52 PM PIT >> SEVERE : Description [testClass=org.xwiki.component.annotation.ComponentAnnotationLoaderTest, name=testPriorities(org.xwiki.component.annotation.ComponentAnnotationLoaderTest)] did not pass without mutation.
3:35:52 PM PIT >> INFO : Calculated coverage in 1 seconds.
-[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] XWiki Commons - Component - Parent POM ............. SUCCESS [  0.636 s]
[INFO] XWiki Commons - Component - API .................... SUCCESS [  1.531 s]
[INFO] XWiki Commons - Component - Observation ............ SUCCESS [  0.980 s]
[INFO] XWiki Commons - Component - Default Implementation . FAILURE [  1.518 s]
[INFO] XWiki Commons - Component - Component Archetype .... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.993 s
[INFO] Finished at: 2018-08-24T15:35:52+02:00
[INFO] Final Memory: 20M/308M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal eu.stamp-project:pitmp-maven-plugin:1.3.4:descartes (default-cli) on project xwiki-commons-component-default: Execution default-cli of goal eu.stamp-project:pitmp-maven-plugin:1.3.4:descartes failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.

What I did:

  • Step 1: mvn clean install
  • Step 2: mvn mvn eu.stamp-project:pitmp-maven-plugin:descartes

Any idea? Thanks

@sushantchoudhary
Copy link

Hi @vmassol , did you had a look at suggestions from Henry here, https://stackoverflow.com/questions/30789480/junit-tests-pass-but-pit-says-the-suite-isnt-green . In my case it was one of the reasons mentioned in the list.

@vmassol
Copy link
Author

vmassol commented Sep 17, 2018

@sushantchoudhary Thanks but as I mentioned in my message above I have no problem running PIT and Descartes on this module. It's only pitmp that has a problem. So I assumed the issue was about someone that pitmp does. Any idea? Thanks!

@Cael35 Cael35 self-assigned this Sep 21, 2018
@Cael35
Copy link

Cael35 commented Sep 24, 2018

@vmassol Did you try to run PitMP directly from the module directory ?
Using "cd xwiki-commons-component ; mvn eu.stamp-project:pitmp-maven-plugin:descartes"

This is a limitation, PitMP can be called only from the root directory otherwise it will not work. You can use targetModules/skippedModules to specify in whihc directory you want to run PitMP.

@vmassol
Copy link
Author

vmassol commented Sep 24, 2018

Did you try to run PitMP directly from the module directory ? Using "cd xwiki-commons-component ; mvn eu.stamp-project:pitmp-maven-plugin:descartes"

Yes this is what I did (I didn't try running it in a different way).

Ok so it works only from the top level; you should mention that in big bold letters on the pitmp home page since this is not how standard maven plugins work. Also it could be nice to provide a better error message when not started from the top level maybe :)

I'll try again later. thanks!

@Cael35
Copy link

Cael35 commented Sep 24, 2018

I'll update the README and I'll add an issue about this limitation (I thought I already did it, but it seems I didn't :-) ), and meanwhile I'll try to add the error message in the next release.

@Cael35
Copy link

Cael35 commented Oct 11, 2018

You can use the properties "targetModules" and "skippedModules" to manage in which directories you want to run PitMP.

Properties ares documented in the README: https://github.com/STAMP-project/pitmp-maven-plugin#pitmp-properties

@Cael35 Cael35 closed this as completed Oct 11, 2018
@vmassol
Copy link
Author

vmassol commented Oct 15, 2018

Still not working for me. Here's what I did:

  • cd to xwiki-commons-core/xwiki-commons-component and ran mvn clean install
  • Went back to top level (i.e. at the root of xwiki-commons and executed mvn eu.stamp-project:pitmp-maven-plugin:run -DtargetModules=xwiki-commons-core/xwiki-commons-component

I also tried with: mvn eu.stamp-project:pitmp-maven-plugin:run -DtargetModules=xwiki-commons-core/xwiki-commons-component,xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api,xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default,xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-observation but same result.

I got:

[INFO] -------------< org.xwiki.commons:xwiki-commons-component >--------------
[INFO] Building XWiki Commons - Component - Parent POM 10.9-SNAPSHOT    [15/92]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- pitmp-maven-plugin:1.3.6:run (default-cli) @ xwiki-commons-component ---
[INFO] Skipping project because:
[INFO]   - Packaging is POM.
[INFO]   - Project has no tests, it is empty.
[INFO]   - xwiki-commons-component is not a target module
[INFO] 
[INFO] -----------< org.xwiki.commons:xwiki-commons-component-api >------------
[INFO] Building XWiki Commons - Component - API 10.9-SNAPSHOT           [16/92]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- pitmp-maven-plugin:1.3.6:run (default-cli) @ xwiki-commons-component-api ---
[INFO] Skipping project because:
[INFO]   - xwiki-commons-component-api is not a target module
...

Any idea?

Thanks

@vmassol vmassol reopened this Oct 15, 2018
@Cael35
Copy link

Cael35 commented Oct 15, 2018

I tried this:
mvn eu.stamp-project:pitmp-maven-plugin:run -Dxwiki-commons-component,xwiki-commons-component-api,xwiki-commons-component-default,xwiki-commons-component-observation

And it's better :-), but now it fails on xwiki-commons-component-default because of a "non green test suite"

And I have the same error with Descartes (mvn eu.stamp-project:pitmp-maven-plugin:descartes ...)
I'm working on it :-)

@vmassol
Copy link
Author

vmassol commented Oct 15, 2018

mvn eu.stamp-project:pitmp-maven-plugin:run -Dxwiki-commons-component,xwiki-commons-component-api,xwiki-commons-component-default,xwiki-commons-component-observation

It seems you're missing the system property name in the -D

@Cael35
Copy link

Cael35 commented Oct 17, 2018

Only when I copied/pasted the command line, not in my script. :-)
It works with:

mvn -e eu.stamp-project:pitmp-maven-plugin:descartes -DtargetModules=xwiki-commons-component,xwiki-commons-component-api,xwiki-commons-component-default,xwiki-commons-component-observation -DexcludedTestClasses=org.xwiki.component.annotation.ComponentAnnotationLoaderTest

There is no property to exclude only a method, so I added an issue (#37 ) for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants