Skip to content
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

fix unexpected dependency 'guice' #27

Merged
merged 2 commits into from
Jan 1, 2019

Conversation

missedone
Copy link
Contributor

@missedone missedone commented Jan 1, 2019

the testng-7.0.0-beta2 generates extra unexpected depeendecies, remove them
screenshot at jan 01 03-34-39

Copy link
Member

@krmahadevan krmahadevan left a comment

Choose a reason for hiding this comment

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

I didn't quite understand the issue here Nick. Can you please explain it to me ?

@missedone
Copy link
Contributor Author

well, it's not really an issue, but since 7.0.0-beta2, it generates more optional dependencies (due to the Export-Package in MANIFEST.MF), while they are not before.
i want to keep as it is before, don't want to have these extra optional jars generated in the p2 repo.

@juherr
Copy link
Member

juherr commented Jan 1, 2019

@missedone Do you think we should fix it in cbeust/testng too?

@missedone
Copy link
Contributor Author

@juherr
I'm not sure what's the impact to the users.
But it looks to me better to fix in testing because normally we just export the own packages (saying org.test... , the thirtld party lib should have its own export directive.

@missedone missedone merged commit 1fb7fe0 into master Jan 1, 2019
@missedone missedone deleted the fixed_unexpected_extra_dependencies branch January 1, 2019 15:13
@juherr
Copy link
Member

juherr commented Jan 1, 2019

I've no idea.
The related commit is testng-team/testng@800cb34
And issue testng-team/testng#759

the third party lib should have its own export directive
I don't know OSGI enough. What should we do when the 3rd party provides osgi manifest or when it doesn't provide one?
Can we use testng-p2 as official osgi repository?

@missedone
Copy link
Contributor Author

Can we use testng-p2 as official osgi repository?

That was the goal of testng-p2.

But I'm not sure what the compatibility level testng-p2 offers, I haven't yet verified it in any OSGi framework except Eclipse.
We need the community effort to verify testng-p2 in this case. But I don't see any request come in before.

There is one more thing, we need to publish this osgified testing to Maven repo as some user manages OSGi dependency with Maven.

@juherr
Copy link
Member

juherr commented Jan 1, 2019

Ok. What do you think if we remove the 3rd party references and add a link to testng-p2 into the documentation?

At the same time, I found the following:

Because TestNG is not an OSGi Bundle, you have to provide the TestNG classes and it's dependencies (currently only com.beust.jcommander) as OSGi bundles by either include the jars into your test plugin and export the TestNG java packages so that the Tycho Surefire Plugin can see them or create a separate Eclipse Plug-in ("Plug-in from Existing JAR Archives" Wizard) that contains the jars. Make sure the TestNG java packages are exported. Add this newly created Plug-in as a dependency to all your Test Plug-ins /Fragments.

https://wiki.eclipse.org/Tycho/Release_Notes/0.26

Any idea why they say TestNG is not a OSGi Bundle?

@missedone
Copy link
Contributor Author

missedone commented Jan 3, 2019

What do you think if we remove the 3rd party references and add a link to testng-p2 into the documentation?

yes, this might redirect the users to testng-p2

Any idea why they say TestNG is not a OSGi Bundle?

I have no idea...
@mbooth101, do you happen to know any info?
or, we might email the tycho team to ask if they met any tech issue with using TestNG in OSGi system.

@mbooth101
Copy link

https://wiki.eclipse.org/Tycho/Release_Notes/0.26

Any idea why they say TestNG is not a OSGi Bundle?

Because the release notes for Tycho 0.26 are super old and pre-dates the OSGi-fication of TestNG.

@juherr
Copy link
Member

juherr commented Jan 3, 2019

@mbooth101 Thanks for your answer.
The 0.26 version is very old but the newer release notes don't explicitly say that the previous workaround is useless now. :)

@mbooth101
Copy link

Fair enough. If TestNG is fully available as an OSGi bundle, such workarounds are no longer necessary :-)

@missedone
Copy link
Contributor Author

@mbooth101
We are also discussing if make testing-p2 the official testng osgi bundle
But we are lack of verification from the community.

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.

4 participants