January 7, 2019 at 5:13 am #606455
when I try to toggle the “without test code” switch from Yes to No at Java-Build-Path -> Libraries -> Maven Dependencies and press apply and close, the changes are not recognized and the value is in its default state (without test code: Yes) after reopening the project properties.
Am I doing something wrong or is it a known bug?
As a workaround i tried to add the project directly (java-build-path -> projects) and toggle the switch to include test sources from the other project, but this seems to be ignored. At least the state of the toggle is preserved.
klausJanuary 7, 2019 at 7:28 am #606460
Sorry that you are seeing this issue.
We ran a couple of quick tests and do see the setting being persisted. I see the default state as No in my tests.
Can you please switch to a new workspace and check if you still see the problem? If yes, then please share with us the workspace log file by clicking on the icon for ‘Export Log’ in the Error Log view, save it as text file and attach it here. Also share with us the screenshot of the Maven Dependencies under the Libraries tab to help us get a visual.
Apologies for inconvenience caused.
Genuitec SupportJanuary 8, 2019 at 12:55 am #606535
today i created a new workspace and two simple new maven projects (new project -> maven project -> without archetype selection):
TestUser has a Dependency to TestBase in test scope. When i toggle the without test code option in the project properties modal dialog, i can see that the [without test code] mark in the project tree’s maven dependency is cleared, but shortly after that it is restored without any actions.
the error log says nothing but:
Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
it’s a fresh myeclipse installation from offline installer.
Attachments:You must be logged in to view attached files.January 8, 2019 at 3:33 am #606540
Thank you for the detailed steps and screenshots. I could replicate the problem at my end with your steps.
I have filed a bug report for the dev team to look into it. We will keep you posted about the fix.
Apologies for inconvenience caused. Thank you once again for reporting it.
Genuitec SupportMarch 26, 2019 at 5:54 am #611553
long time, so any news on this? we would like to use a newer version of myeclipse, but this bug blocks everything
klausMarch 26, 2019 at 3:26 pm #611592
Sorry about our silence on this issue. This is actually a more complicated problem that arises from new JDT capabilities wrt. test sources, as I’m sure you’re already aware. You can find related bugs here and here. Our next release of MyEclipse, due in about a week, will have a flag that will allow you to control some of this behavior.
Just so we’re clear, can you tell me what you are trying to achieve? Typically, users have run into issues with the, “Visible only for test sources”, flag being set to
Yes, because this would prevent TestUser’s non-test source from seeing the TestBase project. You mention the, “Without test code”, flag. Do you want it to be set to
Yes– I’m confused here because it is
Noby default. Do let us know exactly what you want the final states of both these flags to be, just so we can be sure the next release does have the right fixes in.
Thanks!March 27, 2019 at 1:49 am #611624
maybe the example above was a little too simplified. another one: consider four projects:
In A-Impl’s TestSources I have a builder used for Tests involving businessobjects of A. In our maven build it’s a custom artifact built from test-sources with filtering for those builders.
B-Impl depends on A-Api in compile scope.
B-Impl also has some Tests which uses the builder from A-Impl’s TestSources. In our maven build it’s a test scope dependency on the custom artifact of a-impl. So in Eclipse B-Impl’s TestSource should see A-Impl’s TestSource. But B-Impl should not see A-Impl’s sources.
does this clarify my intentions?
March 27, 2019 at 4:37 pm #611678
- This reply was modified 4 years, 6 months ago by lastrealklaus. Reason: typo
Thank you for the more detailed example, still not sure I’ll have exactly the right picture without the POMs though. To me, it would look like you would want B-Impl depending on A-Impl as a library, with the A-Impl entry having
Visible only to test sources: Yesand
Without test code: No.
1) Is this correct?
2) If yes, what value do you see for
Without test code? With my test projects, I’m seeing
No, and if I toggle this to
Yes, it is reset to
No. Are you seeing the opposite of this?March 28, 2019 at 5:29 am #611707
1) this is correct
2) have a look at my attached screenshot from January, 8th.
the pom of a-impl creates a special artifact a-impl-testsupport.jar from test sources matching following criteria: **testsupport**.
the pom of b-impl has a test scope dependeny to this special artifact a-impl-testsupport.jar.
so with pure maven, b-impl only sees those test classes in the testsupport package from a-impl.
to approximate this behavior in eclipse, a-impl should only be visible to test sources of b-impl and b-impl must be able to see classes from test-sources of a-impl.
klausMarch 29, 2019 at 2:41 pm #611823
So, interestingly, I was seeing No for
Without test codeas the default value, while you see
Yes. Regardless, I believe this fix that we’re going to pick up in the next release of MyEclipse should have it working as you expect: https://bugs.eclipse.org/bugs/show_bug.cgi?id=537578#c12
MyEclipse CI 2018.12.0
- This topic has 9 replies, 3 voices, and was last updated 4 years, 1 month ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)