-
Notifications
You must be signed in to change notification settings - Fork 543
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
[SUREFIRE-1972] Use current version of surefire-shared-utils #443
Conversation
@michael-o
|
Why should it? |
@michael-o |
Likely not. Let see what happens. |
In here I found out that the class path contains other artifacts however the shadefire does not have any transitive dependencies. So, we will verify it and fix it separately. Currently, the internal surefire and failsafe plugins, which are used for internal testing purposes, should use the old version |
</goals> | ||
<configuration> | ||
<artifactId>surefire-shared-utils</artifactId> | ||
<version>3-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 3-SNAPSHOT ? is this a random name ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this version is not used in deployment or elsewhere. Basically the number also does not matter ;-)
The only reason why this section is here is the fact that Intellij IDEA and maybe Eclipse too, is not able to work with Shaded Jar in module surefire-shared-utils
. So the IDEA is not able to load the shaded jar even if Maven attached it to the POM. So this is only the trick that we can enable this profile ide-development
and identical Jar is loaded by IDEA from local repo and then we do not have the red lines in the code. Of course Maven build does not need it because Maven can work with shaded and attached Jar. But IDEA has this problem, pity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eoliveli I can change this number. Let me know pls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that nobody will not install project with special profile ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slawekjaranowski
I spoke about it with @miachael-o , it is not Maven problem. The IDEA is an open source project and can be fixed, see the ticket. These are two separate issues and they are in progress..
@@ -266,12 +266,12 @@ | |||
<postBuildHookScript>verify</postBuildHookScript> | |||
<settingsFile>src/it/settings.xml</settingsFile> | |||
<skipInvocation>${skipTests}</skipInvocation> | |||
<streamLogs>true</streamLogs> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this line ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the info logs do not help. And debug logs cannot be read in the main logs.
Several days ago we fixed logs archives and so these logs of this module can be downloaded as a zip.
<showErrors>true</showErrors> | ||
<properties> | ||
<integration-test-port>${failsafe-integration-test-port}</integration-test-port> | ||
<integration-test-stop-port>${failsafe-integration-test-stop-port}</integration-test-stop-port> | ||
</properties> | ||
<debug>true</debug> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I need to have debug logs if I investigate a problem. For instance failures of downloading artifacts of plugin parameters, etc.
@@ -115,11 +115,12 @@ | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<version>3.0.0-M3</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using this older version "3.0.0-M3" ? what's the reasoning about choosing this one ? could it be 2.x ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try with 2.22.2. Let's see what happens...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eolivelli
I have used the 2.22.2 but it gives me bad result
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it is too complicated ...
If I good understand reason for creating surefire-shared-utils
is to hide used shared classes from testing code to avoid conflicts on it.
But I think that we can consider to drop surefire-shared-utils
with all problems and use m-shade-p
at the last components.
It will be more clear and easier.
Another case which I don't like we build shared-utils
with many commons library packed in one black box .. and we don't know which common library and where is needed.
<profile> | ||
<!-- First, install the project without tests -> mvn install -DskipTests | ||
This is a workaround for IntelliJ IDEA, see https://youtrack.jetbrains.com/issue/IDEA-148573 | ||
IDEA is able to recognize external artifacts with classifiers. But IDEA expects modules and their artifacts | ||
without classifier. If the version differs from project, the idea would understand it as external artifact. | ||
--> | ||
<id>ide-development</id> | ||
<properties> | ||
<surefire-shared-utils.version>3-SNAPSHOT</surefire-shared-utils.version> | ||
</properties> | ||
</profile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that nobody will not install project with special profile ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slawekjaranowski
Slawomir, we were talking about it in previous PR. There is no other way. I was explaining it that the IDE and Maven work different way, the Maven understands shading and attaching artifacts but the IDEs don't and that's the reason why it has to be like this. We don't live in ideal world but we cannot wait forever until Jetbrain would fix the issue. If the developers does not care about red line, okay, but I don't because I do not want to have red lines in the code and also I do not want to copy paste the source code from external libraries because it is not maintainable way. So this is the explanation. Regarding the version 3-SNAPSHOT, it can be anything, that's only cosmetic issue.
private static final String[][] PROVIDER_CLASSPATH_ORDER = { | ||
// groupId, artifactId [, classifier] | ||
{"org.apache.maven.surefire", "surefire-junit3"}, | ||
{"org.apache.maven.surefire", "surefire-junit4"}, | ||
{"org.apache.maven.surefire", "surefire-junit47"}, | ||
{"org.apache.maven.surefire", "surefire-testng"}, | ||
{"org.apache.maven.surefire", "surefire-junit-platform"}, | ||
{"org.apache.maven.surefire", "surefire-api"}, | ||
{"org.apache.maven.surefire", "surefire-logger-api"}, | ||
{"org.apache.maven.surefire", "surefire-shared-utils"}, | ||
{"org.apache.maven.surefire", "common-java5"}, | ||
{"org.apache.maven.surefire", "common-junit3"}, | ||
{"org.apache.maven.surefire", "common-junit4"}, | ||
{"org.apache.maven.surefire", "common-junit48"}, | ||
{"org.apache.maven.surefire", "common-testng-utils"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it related to subject of PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I know, this was related to the thinking process with classifier.
Let me pls squash the commits, it's easier to avoid changing this class afterwards.
{ | ||
Iterator<Artifact> providerArtifactsIt = providerArtifacts.iterator(); | ||
while ( providerArtifactsIt.hasNext() ) | ||
{ | ||
String groupId = coordinates[0]; | ||
String artifactId = coordinates[1]; | ||
String classifier = coordinates.length == 3 ? coordinates[2] : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iterate by static PROVIDER_CLASSPATH_ORDER
, I don't see items with classifier ...
</goals> | ||
<configuration> | ||
<artifactId>surefire-shared-utils</artifactId> | ||
<version>3-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that nobody will not install project with special profile ...
@slawekjaranowski |
@slawekjaranowski |
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
SUREFIRE-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean install
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install
).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.