Unable to build spring-cloud-contract - spring-cloud

Attempting to build the latest https://github.com/spring-cloud/spring-cloud-contract repository.
forked repo from github
cloned fork to my local machine
mvn clean install -U
The error:
[ERROR] The build could not read 2 projects -> [Help 1] [ERROR] [ERROR] The project org.springframework.cloud:spring-cloud-contract-verifier:2.0.0.BUILD-SNAPSHOT (/Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-verifier/pom.xml) has 1 error [ERROR] 'dependencies.dependency.version' for javax.inject:javax.inject:jar is missing. # org.springframework.cloud:spring-cloud-contract-verifier:[unknown-version], /Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-verifier/pom.xml, line 43, column 15 [ERROR] [ERROR] The project org.springframework.cloud:spring-cloud-contract-maven-plugin:2.0.0.BUILD-SNAPSHOT (/Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/pom.xml) has 1 error [ERROR] 'dependencies.dependency.version' for javax.inject:javax.inject:jar is missing. # line 337, column 15 [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
I'm able to fix by adding this entry to spring-cloud-contract-parent pom.xml
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject.version}</version>
</dependency>
Seems like a bug?
I can file an issue (https://github.com/spring-cloud/spring-cloud-contract/issues/new) and submit a PR if so...

We've fixed this issue recently. Pull the Changes and try again

Related

sbt / native-packager, new jdeps error: java.lang.module.FindException: Module java.activation not found, required by java.xml.bind

I have not changed my setup as far as I can see. As of today, trying to run sbt native packager with jlink gives this error:
[info] Running: jdeps --multi-release 11 -R ...
[error] Exception in thread "main" java.lang.module.FindException: Module java.activation not found, required by java.xml.bind
[error] at java.base/java.lang.module.Resolver.findFail(Resolver.java:877)
[error] at java.base/java.lang.module.Resolver.resolve(Resolver.java:191)
[error] at java.base/java.lang.module.Resolver.resolve(Resolver.java:140)
[error] at java.base/java.lang.module.Configuration.resolve(Configuration.java:422)
[error] at java.base/java.lang.module.Configuration.resolve(Configuration.java:256)
[error] at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:564)
[error] at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:603)
[error] at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:557)
[error] at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:533)
[error] at jdk.jdeps/com.sun.tools.jdeps.Main.run(Main.java:64)
[error] at jdk.jdeps/com.sun.tools.jdeps.Main$JDepsToolProvider.run(Main.java:73)
[error] at java.base/java.util.spi.ToolProvider.run(ToolProvider.java:137)
[error] at ru.eldis.toollauncher.ToolLauncher.runTool(ToolLauncher.java:68)
[error] at ru.eldis.toollauncher.ToolLauncher.lambda$main$1(ToolLauncher.java:33)
[error] at ru.eldis.toollauncher.ToolLauncher.main(ToolLauncher.java:48)
How do I fix this? I tried adding javax.activation to libraryDependencies, that doesn't seem to have any effect or anything to do with this problem.
Edit: The root problem of seems to be my dependency on Pi4j 1.4, which depends on javax.xml.bind:jaxb-api which in turn depends on javax.activation:javax.activation-api. Now I don't understand much of this Java module stuff, but javax.activation-api does exist on Maven, so why does jdeps complain? If I exclude javax.xml.bind, it works, but now I'm worried I'm actually missing stuff on the class path.
javax.activation has been removed since java 11.
To fix it you can:
Download the javax.activation jar and run the command by adding this jar on module path:
jdeps --multi-release 11 -R --module-path path\to\javax.activation.jar ...
Running this command with java 8 jdeps

Building Apache Spark 2.1.0 from source fails

Am trying to build Apache Spark 2.1.0 source, but get these errors below that baffle me...
Hadoop 2.8.0 was installed and is working
Scala 2.12.1 was installed in advance of executing the Spark install (Which seems to auto install Scala 2.11.8 ?!?)
My build line is:
build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package
Does anybody know why I get:
user#server:/usr/local/share/spark/spark-2.1.0$ sudo /usr/local/share/spark/spark-2.1.0/build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package
[sudo] password for user:
exec: curl --progress-bar -L https://downloads.typesafe.com/zinc/0.3.9/zinc-0.3.9.tgz
######################################################################## 100.0%
exec: curl --progress-bar -L https://downloads.typesafe.com/scala/2.11.8/scala-2.11.8.tgz
######################################################################## 100.0%
exec: curl --progress-bar -L https://www.apache.org/dyn/closer.lua?action=download&filename=/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
######################################################################## 100.0%
Using `mvn` from path: /usr/local/share/spark/spark-2.1.0/build/apache-maven-3.3.9/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
[INFO] Scanning for projects...
Downloading: https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.1.0: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): repo1.maven.org: Name or service not known and 'parent.relativePath' points at wrong local POM # line 22, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.spark:spark-parent_2.11:2.1.0 (/usr/local/share/spark/spark-2.1.0/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.1.0: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): repo1.maven.org: Name or service not known and 'parent.relativePath' points at wrong local POM # line 22, column 11: Unknown host repo1.maven.org: Name or service not known -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I tested downloading manually (To see if that was causing the errors), which downloads without issues:
https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
I also tested accessing the URL below, which also shows content:
https://repo1.maven.org/maven2
Hope somebody smart knows how to solve this...
I found out what the issue was:
I had to configure our proxy settings in the SETTINGS.XML in the directory:
/usr/local/share/spark/spark-2.1.0/build/apache-maven-3.3.9/conf
After editing the file, the build went without any issues :)
Hope this helps someone else running into the same issue...
EDIT: Just to be extra clear, having a working proxy configuration in bash only is NOT SUFFICIENT for the Maven Build to succeed. I was able to download all files from bash manually, but Maven needed the proxy configuration in the SETTINGS.XML file present as well...

failed to compile dataflow sample

I tried the Google sample dataflow but I get the following error when I run maven install as described in the following link:
[ERROR] Failed to execute goal on project
google-cloud-dataflow-java-examples-all: Could not resolve
dependencies for project
com.google.cloud.dataflow:google-cloud-dataflow-java-examples-all:jar:manual_build:
Could not find artifact
com.google.cloud.dataflow:google-cloud-dataflow-java-sdk-all:jar:tests:manual_build
in central (http://repo.maven.apache.org/maven2) -> [Help 1] [ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch. [ERROR] Re-run Maven using the -X switch to enable full
debug logging. [ERROR] [ERROR] For more information about the errors
and possible solutions, please read the following articles: [ERROR]
[Help 1]
In fact I did mvn clean install and always get the error. It seams that the jar google-cloud-dataflow-java-sdk cannot be build.

Getting the following error " The build could not read 1 project and Non resolvablle parent error" when down mvn clean install

Hello I'm very new to yang, I tried getting used to it and followed this tutorial page on : http://sdntutorials.com/yang-to-java-conversion-how-to-create-maven-project-in-eclipse/#comment-21958.
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.opendaylight.controller.model:Yang-03:0.0.1-SNAPSHOT (/home/shrenik/workspace/Yang-03/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact org.opendaylight.controller.model:model-parent:pom:1.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM # line 6, column 11 -> [Help 2]
I'm unable to resolve this issue. Any help would be appreciated.
Remove the <parent> section from your POM.
I'm pretty sure you neither have a POM org.opendaylight.controller.model:model-parent:pom:1.1-SNAPSHOT in your local Maven repository (~/.m2/repository) nor in your Eclipse workspace.
Don't ask me why the blog post insists on adding this without explaining why and how to establish it.

Maven Error in Eclipse - BPMN2 Modeler

my problem is the following. I have Eclipse Kepler SR1 and imported an maven project out of the following git: http://git.eclipse.org/c/bpmn2/.git/
This is a metamodel for the BPMN 2.0. After that i wanted to do a maven install but when i do this the following Error pops up
[ERROR] Failed to execute goal org.eclipse.cbi.maven.plugins:eclipse-jarsigner-plugin:1.0.3:sign (sign) on project org.eclipse.bpmn2: Could not sign artifact org.eclipse.bpmn2:org.eclipse.bpmn2:eclipse-plugin:0.7.0-SNAPSHOT: Connection to http://build.eclipse.org:31338 refused: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.eclipse.bpmn2
Maven is correctly installed and i checked the superpom. There is no mistake in my opinion. I also updated the pluginRepository for plugin signin to https://repo.eclipse.org/content/repositories/cbi-releases/. Is there anyone who knows the mistake and can help me?
Best Regards
The first line of your error message contains a timeout for http://build.eclipse.org:31338 - that seems to me an internal address.
If I am not mistaken, this is used by the jar signer plug-in mentioned in the build script that is an eclipse.org-only service (for obvious reasons). Search for the followi
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-jarsigner-plugin</artifactId>
As signing is an internal service, we in the EMF-IncQuery project execute signing only when a specific profile is selected, thus allowing building our project outside eclipse.org servers.