Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2532

testing an addon having org.eclipse:osgi dependecy failed

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 2.19.2.Final, 2.20.0.Final, 2.20.1.Final
    • None
    • None
    • Hide

      Please find sample project attached

      Show
      Please find sample project attached

      I have implemented an Forge2 addon with org.eclipse:osgi as dependency.
      I have written a simple test with Arquillian : it fails. If I remove osgi dependency, test pass.
      But my relevant test need this dependency, as my addon to be tested is using it.

      Please find attach a dummy project to reproduce the problem.

            [FORGE-2532] testing an addon having org.eclipse:osgi dependecy failed

            ludovic Bertin (Inactive) added a comment - It's not in forge core but in forge/furnace : https://github.com/forge/furnace/blob/master/test-harness/arquillian/core/src/main/java/org/jboss/forge/arquillian/maven/ProjectHelper.java

            Not sure what you mean about "return all others dependencies". I believe org.apache.maven.project.ProjectBuildingResult.getProblems() would return the problems while resolving it, I guess an exception needs to be thrown there instead.

            Where is this ProjectHelper class in your example? I couldn't find this specific line of code in forge/core inside the existing ProjectHelper classes.

            George Gastaldi added a comment - Not sure what you mean about "return all others dependencies". I believe org.apache.maven.project.ProjectBuildingResult.getProblems() would return the problems while resolving it, I guess an exception needs to be thrown there instead. Where is this ProjectHelper class in your example? I couldn't find this specific line of code in forge/core inside the existing ProjectHelper classes.

            Hi Georges,

            sorry for the delay, I had no access to environment in which error occured.
            Indeed, I was not able to reproduce error anywhere else.

            So I investigated a bit, and the reason was an incorrect artifact in the nexus...

            In these lines

            ProjectHelper.java
                    ProjectBuildingRequest request = getBuildingRequest(plexus);
                     request.setResolveDependencies(true);
                     ProjectBuilder builder = plexus.lookup(ProjectBuilder.class);
                     ProjectBuildingResult build = builder.build(pomFile, request);
                     result = build.getDependencyResolutionResult().getDependencies();
            

            build.getDependencyResolutionResult().getDependencies() is returning zero dependency if one of dependency resolutions failed.
            I think it should warn but return all others dependencies...
            What do you think about it ?

            Thanks
            Ludovic

            ludovic Bertin (Inactive) added a comment - Hi Georges, sorry for the delay, I had no access to environment in which error occured. Indeed, I was not able to reproduce error anywhere else. So I investigated a bit, and the reason was an incorrect artifact in the nexus... In these lines ProjectHelper.java ProjectBuildingRequest request = getBuildingRequest(plexus); request.setResolveDependencies( true ); ProjectBuilder builder = plexus.lookup(ProjectBuilder.class); ProjectBuildingResult build = builder.build(pomFile, request); result = build.getDependencyResolutionResult().getDependencies(); build.getDependencyResolutionResult().getDependencies() is returning zero dependency if one of dependency resolutions failed. I think it should warn but return all others dependencies... What do you think about it ? Thanks Ludovic

            Closing as cannot reproduce.

            George Gastaldi added a comment - Closing as cannot reproduce.

            George Gastaldi added a comment - - edited

            I just run your example project as it is and I didn't get any error. Can you give more details?

            George Gastaldi added a comment - - edited I just run your example project as it is and I didn't get any error. Can you give more details?

              rhn-support-ggastald George Gastaldi
              neoludo_jira ludovic Bertin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: