Skip to content

Conversation

ivy-rew
Copy link
Contributor

@ivy-rew ivy-rew commented Jul 1, 2020

…eWorkspaceArtifactRepository

  • Use EFS cache to create real local java.io.File representations of remotely available POM.xml files
  • Avoid conversion to java.io.File at all and prefer InputStream reading since that works also for remote FS.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Reguel Wermelinger reguel.wermelinger@ivyteam.ch

@ivy-rew ivy-rew force-pushed the bugfix/564787-npe-on-RFS-resolve branch from 4f1db1d to a313386 Compare July 1, 2020 06:04
@ivy-rew
Copy link
Contributor Author

ivy-rew commented Jul 1, 2020

* @deprecated use {@link #readMavenModel(InputStream)} instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
public org.apache.maven.model.Model readMavenModel(File pomFile) throws CoreException {
return maven.readModel(pomFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use

try (InputStream is = new FileInputStream(pomFile)) {
  return maven.readModel(is);
} catch (IOException ex) {
  throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, null, ex));
}

and get rid of the @SuppressWarnings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, it's ok like this, let's not bother more than necessary ;)

@mickaelistria
Copy link
Contributor

This change looks good. I hope I'll be able to fix the CI job today to get it running the tests and so on to validate it before we can merge.

@mickaelistria
Copy link
Contributor

An important patch fixing some versioning issue was merged and make the build behave a bit better. Can you please rebase your patch and push --force the rebased result?

@ivy-rew ivy-rew force-pushed the bugfix/564787-npe-on-RFS-resolve branch from a313386 to 4001cb5 Compare July 8, 2020 06:56
@ivy-rew
Copy link
Contributor Author

ivy-rew commented Jul 8, 2020

Yes sure, I've just rebased on top of the m2e-core/master should be up to date now.
Hopefully the CI will now like my change too :)

@mickaelistria
Copy link
Contributor

That's better ;) However, as described in https://github.com/eclipse-m2e/m2e-core/blob/master/CONTRIBUTING.md#%EF%B8%8F-version-bump , you need to increase the version of the bundle you modified (and of including references) in case no change did happen since last release.
So please move version of org.eclipse.m2e.core to 1.16.1, and you'll probably need to bump the version of the features that include it by the way.
Running mvn clean verify focally should reproduce the same issue and help you to remediate them.

@mickaelistria
Copy link
Contributor

The last commit is mostly to be discarded. Please first rebase on top of master, and then only update the version of the bundles you modified.
What specifically in https://github.com/eclipse-m2e/m2e-core/blob/master/CONTRIBUTING.md#%EF%B8%8F-version-bump makes you assume that all versions need to be bumped? Why are you changing dependency ranges and so on for bundles that don't require it?

@ivy-rew
Copy link
Contributor Author

ivy-rew commented Jul 10, 2020

The thing is that almost every bundle has a dependency to m2e.core .... which I have changed. So I thought they must be adjusted too.
But I'll gladly drop that commit and bump only the one that I've actually touched. Since most bundles have a range dependency this should be an easy change.

Reguel Wermelinger added 2 commits July 10, 2020 10:15
…eWorkspaceArtifactRepository

- Use EFS cache to create real local java.io.File representations of remotely available POM.xml files
- Avoid conversion to java.io.File at all and prefer InputStream reading since that works also for remote FS.

Change-Id: I0000000000000000000000000000000000000000
Signed-off-by: Reguel Wermelinger <reguel.wermelinger@ivyteam.ch>
Signed-off-by: Reguel Wermelinger <reguel.wermelinger@ivyteam.ch>
@ivy-rew ivy-rew force-pushed the bugfix/564787-npe-on-RFS-resolve branch from b7287e9 to 19f4348 Compare July 10, 2020 08:26
@ivy-rew
Copy link
Contributor Author

ivy-rew commented Jul 10, 2020

I have one additional test that did not fail on master, but on my branch (MissingSchemaMarkerTest). Locally it runs just fine .... so I hope its just a flaky test. Maybe someone with rights on the build node can trigger the build once again ?
MissingSchemaMarker-localRun

@mickaelistria
Copy link
Contributor

Yes, it's a flaky test and can be ignored.
Thanks for your contribution, I'm going to merge it.

@mickaelistria mickaelistria merged commit d81a433 into eclipse-m2e:master Jul 10, 2020
@ivy-rew
Copy link
Contributor Author

ivy-rew commented Jul 10, 2020

Thanks a lot for your help and guidance @mickaelistria
One last thing, I absolutely like the switch to Github as SCM/Review platform. It makes contributions way easier for newcomers.
Keep up the good work.

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

Successfully merging this pull request may close these issues.

2 participants