jdk9 maven compilationa error: module reads package from both A and B - java-9

maven compilation error:
module 'my.demo' reads package 'springfox.documentation.service' from both 'springfox.core' and 'springfox.spi'
Is it possible to solve split package problem from dependencies?

Related

Maven osgi.bundle dependency missing

I am trying to build maven package and get a error:
Missing requirement: org.talend.designer.codegen 8.8.8.qualifier requires 'osgi.bundle; org.talend.repository 0.0.0' but it could not be found
But OK, org.talend.repository is another package in the parent directory.
But all my maven compilations was failed on "osgi.bundle" dependency.
Where can I get this dependency and how can I install it.

package org.eclipse.swt does not exist

I am getting compilation error while running a project in Jenkins. The following are few of those similar errors:
cannot find symbol
[ERROR] symbol: variable SWT
package org.eclipse.swt does not exist
and
package org.eclipse.swt.widgets does not exist
I am new to rcp. Not sure how to handle this. I am using Maven 3.3.9 and JDK 1.8.

Module Dependency in Intellij- not able to reference Classes from other Projects

I need to use a java class from project A in Project B. I believe I wrote the package and import successfully but I still get a message when compiling (./gradlew clean build) saying:
java:3: `error: package x.x.x.x.x.common.api.filter does not exist`
Next, I tried to create a module dependency within IntelliJ, by importing the new package as a Module and rewriting the package and import statement to reflect the imported package (module dependency) but I am still seeing the same error.
java:3: error: package x.x.x.x.x.common.api.filter does not exist
Would this be an issue with the build.gradle file? Or my setting up of the module dependency?
How can I resolve?
The problem is with build.gradle configuration and is not related to the IDE.
You should define the dependencies between the projects as described in Gradle documentation.
Another possible solution is Composite Builds.

Groovyc: unable to resolve class geb.spock.GebReportingSpec

I'm using IntelliJ IDEA 14.0.2 Ultimate and created a Maven project.
Here's my pom file: http://pastebin.com/KQ6ARxj3
So I have this Geb Spec class: http://pastebin.com/AerXgCDh
And in my classpath there are all maven dependencies and those are getting downloaded, everything's at his place. Including: Maven: org.gebish:geb-spock:0.10.0
But when I right-click on my module and select "Make Module [Module]" it starts compiling my source files but stops with this error:
C:\Users\...\MyModule\src\test\groovy\MySpockSpec.groovy
Error:(1, 1) Groovyc: unable to resolve class geb.spock.GebReportingSpec
Why can't the groovy compiler resolve this? Maven builds the project successfull and IntelliJ can resolve everything, so what's wrong with the groovy compiler?

Tycho fails to resolve packages from my own wrapper of plain Maven dependencies

I am trying to create an Eclipse plug-in which has dependencies to plain Maven artifacts. I created the following project structure:
Parent POM
|- Dependencies (Third Party)
\- My Code
|- Bundle
\- Bundle Tests
I have followed the Tycho example itp02 but only using the third-party dependencies. As I understood the idea is to wrap all the dependencies in a bundle and use it as input for my bundle. I manage to build and install the Dependencies bundle correctly: A jar is created and it contains all the JAR files obtained from the Maven repository. But when I try to compile my bundle I get an error saying that the packages in my bundle manifest cannot be imported.
[ERROR] Missing requirement: MyPlugin 0.0.1.qualifier requires 'package org.apache.commons.lang.StringEscapeUtils 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from MyPlugin 0.0.1.qualifier to package org.apache.commons.lang.StringEscapeUtils 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from MyPlugin 0.0.1.qualifier to package org.apache.commons.lang.StringEscapeUtils 0.0.0.", "No solution found because the problem is unsatisfiable."]
What am I missing?
It is not very clear from your description how your project is set up or the commands you used to build it.
However your "POM parent" seems to suggest you are attempting to build it all in one go. If that is the case, you cannot mix pom-first (maven-bundle-plugin) projects and manifest-first (eclispe-plugin) projects in the same build see [1]. You need to build and install the pom-first projects into your local maven repository first then you can build the manifest-first projects.
The second thing to check is that your have the correct dependency configured and that you have set pomDependencies=consider as in [2].
Finally, if that does not help, check that the jar file in your local maven repository has a META-INF/MANIFEST.MF with the correct "Export-Package" statements - specifically there should be a line for org.apache.commons.lang.StringEscapeUtils.
[1] http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts#It_is_not_possible_to_mix_pom-first_and_manifest-first_projects_in_the_same_reactor_build.
[2] http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/tree/itp02/build02/pom.xml

Resources