Discussion:
How to run PiTest mutation testing with Tycho?
(too old to reply)
Christian Schwarz
2014-01-08 12:52:17 UTC
Permalink
Hello,

i wan't to help enhance the quality of tests in our project using PiTest
mutation testing (see www.pitest.org) for maven. I was able to start the
pitest-coverage goal in our jenkins build job but i get this error from the
No test library found on classpath. PIT requires either JUnit 4 (but can run JUnit 3 tests) or TestNG
Pitest doesn't find JUnit4 but the tests run by tycho-surefire succeed.
How can it make surefire and pitest work together?

Thanks
Chris
Jeff MAURY
2014-01-08 12:59:03 UTC
Permalink
As PiTest does not seem to be based on Java agent, I think integration will
the tycho surefire plugin will be not that simple or impossible.

Jeff
Post by Christian Schwarz
Hello,
i wan't to help enhance the quality of tests in our project using PiTest
mutation testing (see www.pitest.org) for maven. I was able to start the
pitest-coverage goal in our jenkins build job but i get this error from the
No test library found on classpath. PIT requires either JUnit 4 (but can run JUnit 3 tests) or TestNG
Pitest doesn't find JUnit4 but the tests run by tycho-surefire succeed.
How can it make surefire and pitest work together?
Thanks
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Christian Schwarz
2014-01-08 14:23:20 UTC
Permalink
Post by Jeff MAURY
As PiTest does not seem to be based on Java agent, I think integration
will the tycho surefire plugin will be not that simple or impossible.
Does it mean that PiTest won't work at all to test OSGi-Bundles? What have
to be done to make it work?

Chris
Jeff MAURY
2014-01-08 17:14:29 UTC
Permalink
Christian,

I'm not an expert with PiTest but according to the web site, PiTest does
have its own main class which is in contrast with OSGI as OSGI containers
are also main entry points for the JVM.
Jacoco solved the issue by being a Java agent so its is compatible with any
runner: Maven surefire, TYcho surefire, JVM,...

Jeff
Post by Jeff MAURY
As PiTest does not seem to be based on Java agent, I think integration
Post by Jeff MAURY
will the tycho surefire plugin will be not that simple or impossible.
Does it mean that PiTest won't work at all to test OSGi-Bundles? What have
to be done to make it work?
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Christian Schwarz
2014-01-09 09:00:38 UTC
Permalink
Hi Jeff,

thanks for your explanation! Maybe it is possible to rewrite pitest to an
agent.
I raised this topic a the pitest-google-group for further discussion:
https://groups.google.com/forum/#!topic/pitusers/IH21Q4jJaco.

Regards Chris
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2014-01-09 01:52:36 UTC
Permalink
Hi all

so maybe this is a crazy idea, but I'm wondering if there is a way to circumvent setting up p2 update sites altogether, and have tycho discover and add needed osgi artifacts directly from a maven repository to the target platform?

I was experimenting with the <pomDependencies>consider</pomDependencies> in the target-platform-configuration, but what I've found is 2 problems:

-Eclipse does not recognize these plugins and still shows build errors, since dependencies described in the manifest are not in the workspace,

-while this will instruct Maven to find and download the needed jar file(s), it fails to traverse up the dependency tree because versions are not specified in the manifest of the included plugin :

Require-Bundle: gov.nasa.arc.irg.util;visibility:=reexport,
org.codehaus.jackson.json;visibility:=reexport,
com.google.guava;bundle-version="11.0.2";visibility:=reexport

This causes errors like this:
[ERROR] Missing requirement: gov.nasa.arc.irg.plan 1.0.0.201401082355 requires 'bundle gov.nasa.arc.irg.util 1.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: gov.nasa.arc.irg.plan.spheres 1.0.0.qualifier depends on: bundle gov.nasa.arc.irg.plan 0.0.0
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle gov.nasa.arc.irg.util 1.0.0.; Unable to satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle org.codehaus.jackson.json 0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle gov.nasa.arc.irg.util 1.0.0.; Unable to satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle org.codehaus.jackson.json 0.0.0.; No solution found because the problem is unsatisfiable.]

Is this even a feasible idea?

thanks much
Tamar Cohen
NASA Ames Research Center
Igor Fedorenko
2014-01-09 02:27:03 UTC
Permalink
Short answer is no, you can't use maven repository to resolve p2 (and
osgi in general) dependencies.

Maven repositories simply don't have required metatata. P2 needs to be
able to efficiently find all artifacts by bundle-id, package name or
using even more interesting conditions. This requires access to overall
repository metadata, which is not supported by maven2 repository layout.

--
Regards,
Igor

On 1/8/2014, 20:52, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Hi all
so maybe this is a crazy idea, but I'm wondering if there is a way to
circumvent setting up p2 update sites altogether, and have tycho
discover and add needed osgi artifacts directly from a maven repository
to the target platform?
I was experimenting with the <pomDependencies>consider</pomDependencies>
-Eclipse does not recognize these plugins and still shows build errors,
since dependencies described in the manifest are not in the workspace,
-while this will instruct Maven to find and download the needed jar
file(s), it fails to traverse up the dependency tree because versions
Require-Bundle: gov.nasa.arc.irg.util;visibility:=reexport,
org.codehaus.jackson.json;visibility:=reexport,
com.google.guava;bundle-version="11.0.2";visibility:=reexport
[ERROR] Missing requirement: gov.nasa.arc.irg.plan 1.0.0.201401082355
requires 'bundle gov.nasa.arc.irg.util 1.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: gov.nasa.arc.irg.plan.spheres
1.0.0.qualifier depends on: bundle gov.nasa.arc.irg.plan 0.0.0
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found
because the problem is unsatisfiable.: [Unable to satisfy dependency
from gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle
gov.nasa.arc.irg.util 1.0.0.; Unable to satisfy dependency from
gov.nasa.arc.irg.plan 1.0.0.201401082355 to bundle
org.codehaus.jackson.json 0.0.0.; No solution found because the problem
is unsatisfiable.] -> [Help 1]
java.lang.RuntimeException: No solution found because the problem is
unsatisfiable.: [Unable to satisfy dependency from gov.nasa.arc.irg.plan
1.0.0.201401082355 to bundle gov.nasa.arc.irg.util 1.0.0.; Unable to
satisfy dependency from gov.nasa.arc.irg.plan 1.0.0.201401082355 to
bundle org.codehaus.jackson.json 0.0.0.; No solution found because the
problem is unsatisfiable.]
Is this even a feasible idea?
thanks much
Tamar Cohen
NASA Ames Research Center
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Kai Zimmermann
2014-01-09 06:48:17 UTC
Permalink
For distributing your *own *bundles, you can use Sonatype Nexus with the
https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin
to
generate these metadata.
Neil Corbet
2014-01-09 13:22:22 UTC
Permalink
I use this feature in Nexus exclusively for our bundles and features. I
also create feature groups of my project dependencies and put those in
Nexus as well.

My target definitions are then made up of these feature sets that I get
directly from Nexus. It has worked well for our group.

Neil
Post by Kai Zimmermann
For distributing your *own *bundles, you can use Sonatype Nexus with the
https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin to
generate these metadata.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Kai Zimmermann
2014-01-09 13:41:36 UTC
Permalink
For third party bundles I can recommend
https://github.com/reficio/p2-maven-plugin
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2014-01-09 16:34:15 UTC
Permalink
Fantastic, thanks for the tip, we will definitely look into that!

Tamar

On Jan 8, 2014, at 10:48 PM, Kai Zimmermann <***@gmail.com<mailto:***@gmail.com>> wrote:

For distributing your own bundles, you can use Sonatype Nexus with the https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin to generate these metadata.
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2014-01-15 19:22:18 UTC
Permalink
Hi Kai / everyone else --

We followed the steps on that page and set Nexus up to provision our p2 site; despite the fact that we have followed all the configurations carefully and are attempting to hit the p2 site from our target platform, it shows no content. Is there an example? Are there special settings in tycho? We're publishing all the p2 content, so for each Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml file and the contents look clean. It seems like the aggregator is not aggregating them?

Thanks so much for any input, this is a key part of using Nexus for us!

Tamar

On Jan 8, 2014, at 10:48 PM, Kai Zimmermann <***@gmail.com<mailto:***@gmail.com>> wrote:

For distributing your own bundles, you can use Sonatype Nexus with the https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin to generate these metadata.
Neil Corbet
2014-01-15 19:34:39 UTC
Permalink
Tamar,

If you did indeed set up Nexus and created a proxy to the p2 site like the
link says It should work fine. One thing that trips me up occasionally is I
have to uncheck the Group By Category in the Edit Software Site dialog.
Since I do not include a category.xml the dialog cannot group my features
by category. Is this unchecked?

Neil


On Wed, Jan 15, 2014 at 2:22 PM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Hi Kai / everyone else --
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target platform,
it shows no content. Is there an example? Are there special settings in
tycho? We're publishing all the p2 content, so for each Eclipse artifact
we build there is a p2artifacts.xml and p2metadata.xml file and the
contents look clean. It seems like the aggregator is not aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
Tamar
For distributing your *own *bundles, you can use Sonatype Nexus with the
https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin to
generate these metadata.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Moritz Bechler
2014-01-16 09:58:00 UTC
Permalink
Hi,
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target
platform, it shows no content. Is there an example? Are there special
settings in tycho? We're publishing all the p2 content, so for each
Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml
file and the contents look clean. It seems like the aggregator is not
aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
The nexus p2 plugin is indeed not aggregating the tycho generated P2
data, but only what their generator produces from the JARs. So you will
also have to enable the meta data generator on the repository (I'm not
sure whether this will be useful, especially for features).

We do have a customized plugin which in-cooperates the tycho generated
descriptors - but I need to get approval for publishing first and have
some time to get it ready for release.

Also, note that you won't be able to pick individual plugins for the
target platform using this repository layout, but only features and as
Neil noted you have to disable categories to see any contents at all.


with best regards

Moritz
--
AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
Persönlich haftend:
Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
Vertreten durch Joachim Keltsch
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2014-01-16 17:06:57 UTC
Permalink
AH.

Unchecked group by category, and suddenly everything is there! That was my issue.

Our structure looks like this, roughly:
We have hundreds of Eclipse plugins and features that are used to build dozens of RCP applications.
These are grouped by area / package name and separated into logical git repositories.

We then have Bamboo set up to build each area, which might include a number of plugins and features. RCP builds are done separately by Bamboo.
Snapshots and then releases are pushed to our Nexus repository.

What I am going for is a system where my developers can follow a simple process to get the source code for the plugins they need to edit for the RCP application they are building. I am using repo from Google to clone multiple repositories, and then I was planning to set up a target platform and a psf (project set) to simplify importing just the needed projects into the Eclipse workspace.

The issue I'm emailing about is provisioning the target platform.

Thanks so very much for all the assistance.

Tamar
Post by Moritz Bechler
Hi,
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target
platform, it shows no content. Is there an example? Are there special
settings in tycho? We're publishing all the p2 content, so for each
Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml
file and the contents look clean. It seems like the aggregator is not
aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
The nexus p2 plugin is indeed not aggregating the tycho generated P2
data, but only what their generator produces from the JARs. So you will
also have to enable the meta data generator on the repository (I'm not
sure whether this will be useful, especially for features).
We do have a customized plugin which in-cooperates the tycho generated
descriptors - but I need to get approval for publishing first and have
some time to get it ready for release.
Also, note that you won't be able to pick individual plugins for the
target platform using this repository layout, but only features and as
Neil noted you have to disable categories to see any contents at all.
with best regards
Moritz
--
AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
Vertreten durch Joachim Keltsch
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2014-01-16 17:13:53 UTC
Permalink
Ok and I see this only has the features, as Moritz wrote. This won't work for our 3rd party plugins as they are not organized into features.

Sonatype support suggested I publish the artifacts to a hosted site repository in Nexus, but I'm a bit concerned if those will be aggregated into one p2 site or not.

I surely cannot be the only one trying to do this …

Tamar
Post by Moritz Bechler
Hi,
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target
platform, it shows no content. Is there an example? Are there special
settings in tycho? We're publishing all the p2 content, so for each
Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml
file and the contents look clean. It seems like the aggregator is not
aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
The nexus p2 plugin is indeed not aggregating the tycho generated P2
data, but only what their generator produces from the JARs. So you will
also have to enable the meta data generator on the repository (I'm not
sure whether this will be useful, especially for features).
We do have a customized plugin which in-cooperates the tycho generated
descriptors - but I need to get approval for publishing first and have
some time to get it ready for release.
Also, note that you won't be able to pick individual plugins for the
target platform using this repository layout, but only features and as
Neil noted you have to disable categories to see any contents at all.
with best regards
Moritz
--
AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
Vertreten durch Joachim Keltsch
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Neil Corbet
2014-01-16 17:37:14 UTC
Permalink
Also, I do organize some of my 3rd party plugins ( the ones I want to add
to my target ) into features. I have a project setup to create a p2
repository out of these feature groups. I think, move this repo to an
instance of tomcat ( or whatever ) and then proxy that site through Nexus.
I can then "shop" for 3rd party features for my target that way.

In order to build the p2 repository, I utilize the 3rd Party repo in Nexus
to upload the 3rd party plugins individually. I then p2 enabled the 3rd
party repo. This way, when tycho assembles the p2 repo it can download
those plugins from nexus. This may seem clunky at first, but it has really
started to flow better for us.

Another thing I do is I have multiple p2 proxies that I also group together
using the Group feature in nexus. I can then just use that repo address in
the repositories section of my pom. I can also add it as a mirror in my
settings.xml.

Hope that helps.

Neil


On Thu, Jan 16, 2014 at 12:13 PM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Ok and I see this only has the features, as Moritz wrote. This won't work
for our 3rd party plugins as they are not organized into features.
Sonatype support suggested I publish the artifacts to a hosted site
repository in Nexus, but I'm a bit concerned if those will be aggregated
into one p2 site or not.
I surely cannot be the only one trying to do this …
Tamar
Post by Moritz Bechler
Hi,
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target
platform, it shows no content. Is there an example? Are there special
settings in tycho? We're publishing all the p2 content, so for each
Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml
file and the contents look clean. It seems like the aggregator is not
aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
The nexus p2 plugin is indeed not aggregating the tycho generated P2
data, but only what their generator produces from the JARs. So you will
also have to enable the meta data generator on the repository (I'm not
sure whether this will be useful, especially for features).
We do have a customized plugin which in-cooperates the tycho generated
descriptors - but I need to get approval for publishing first and have
some time to get it ready for release.
Also, note that you won't be able to pick individual plugins for the
target platform using this repository layout, but only features and as
Neil noted you have to disable categories to see any contents at all.
with best regards
Moritz
--
AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
Vertreten durch Joachim Keltsch
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Igor Fedorenko
2014-01-16 16:35:10 UTC
Permalink
Do you think you can explain your project structure a little bit and
what Eclipse kind of artifacts you need to share and how you need to
consume them?

I've been working on something to help me manage m2e and its numerous
extensions, which may or may not be the same problem you are trying to
solve.

--
Regards,
Igor

On 1/15/2014, 14:22, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Hi Kai / everyone else --
We followed the steps on that page and set Nexus up to provision our p2
site; despite the fact that we have followed all the configurations
carefully and are attempting to hit the p2 site from our target
platform, it shows no content. Is there an example? Are there special
settings in tycho? We're publishing all the p2 content, so for each
Eclipse artifact we build there is a p2artifacts.xml and p2metadata.xml
file and the contents look clean. It seems like the aggregator is not
aggregating them?
Thanks so much for any input, this is a key part of using Nexus for us!
Tamar
Post by Kai Zimmermann
For distributing your *own *bundles, you can use Sonatype Nexus with the
https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin to
generate these metadata.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...