Problem resolving profiled dependency from maven repository


I’m just trying to migrate an eclipse plugin project from maven to gradle, reusing an existing internal maven repository. The problem is that the dependency to the OS specific eclipse SWT plugin cannot be resolved. I’m getting the following message:

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find group:unknown, module:unknown, version:3.7.2.
  Required by:
      :myplugin:unspecified > org.eclipse:jface:3.7.0 > org.eclipse:swt:3.7.2

In the pom of the SWT plugin the OS specific dependency is defined using profiles:


Has anyone an idea regarding this problem? Without solving it I cannot migrate to gradle.


Using profiles in published POMs is highly discouraged, and their behavior is undefined. From what I know, Gradle skips them.

Hi Peter,

what a pity. I cannot modify the SWT plugin pom because other projects are depending on the OS specific build. Do you have any idea for a workaround that enables me to use Gradle instead of Maven?

BTW: Thanks for the prompt reply.

You can republish the artifact with a corrected POM to your repository manager. Alternatively you can try to reference the artifact with “org.eclipse:swt:3.7.2@jar” and declare its transitive dependencies manually. More on that in the Gradle user guide.