maven error for https://github.com/googleapis/java-translate - java

I am trying to get jar file for using google translation api for java. I downloaded pom.xml from https://github.com/googleapis/java-translate. Then type 'mvn install' got errors:
$ mvn install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module D:\googleTranslation\proto-google-cloud-translate-v3beta1 of D:\googleTranslation\pom.xml does not exist #
[ERROR] Child module D:\googleTranslation\proto-google-cloud-translate-v3 of D:\googleTranslation\pom.xml does not exist #
[ERROR] Child module D:\googleTranslation\grpc-google-cloud-translate-v3beta1 of D:\googleTranslation\pom.xml does not exist #
[ERROR] Child module D:\googleTranslation\grpc-google-cloud-translate-v3 of D:\googleTranslation\pom.xml does not exist #
[ERROR] Child module D:\googleTranslation\google-cloud-translate of D:\googleTranslation\pom.xml does not exist #
[ERROR] Child module D:\googleTranslation\google-cloud-translate-bom of D:\googleTranslation\pom.xml does not exist #
What I am missing? Any information would be appreciated. Thank you in advance.

Related

mvnw clean install throwing the following errors

I am trying to set up nvim for java development, I am rather new to all this, and hence am following this tutorial, because it didn't work when I tried on my own.
tutorial
I first cloned this repo using ssh, then i did a mvnw clean install as told.
and i got the following errors
1 error #
#
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]
[ERROR] The project com.microsoft.java:com.microsoft.java.debug.plugin:0.41.0 (/home/demo/.config/nvim/java-debug/com.microsoft.java.debug.plugin/pom.xml) has 1 error
[ERROR] Invalid artifact repository: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error in custom provider, java.lang.TypeNotPresentException: Type org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout not present
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.3, parent: java.net.URLClassLoader#2cb4c3ab] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.3, parent: java.net.URLClassLoader#2cb4c3ab] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout annotated with #com.google.inject.name.Named(value=p2)
[ERROR]
[ERROR] 1 error: org/eclipse/tycho/core/p2/P2ArtifactRepositoryLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR]
[ERROR] The project com.microsoft.java:com.microsoft.java.debug.repository:0.41.0 (/home/demo/.config/nvim/java-debug/com.microsoft.java.debug.repository/pom.xml) has 1 error
[ERROR] Invalid artifact repository: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error in custom provider, java.lang.TypeNotPresentException: Type org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout not present
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.3, parent: java.net.URLClassLoader#2cb4c3ab] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.3, parent: java.net.URLClassLoader#2cb4c3ab] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout annotated with #com.google.inject.name.Named(value=p2)
[ERROR]
[ERROR] 1 error: org/eclipse/tycho/core/p2/P2ArtifactRepositoryLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[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
Is there any chance that this could be a firewall error? Because I am on a public network currently
The error is because you are trying to build that project using Java 8 (class file 52.0) and some of its dependencies requires Java 11 (class file version 55.0).
See:
https://www.java.com/releases/
https://en.wikipedia.org/wiki/Java_class_file#General_layout

Error while running maven command in gcp console unable to install common package error

unable to install apache maven packages in gcp console please let me know if any one resolves the issue. I'm trying to create dataflow pipeline following the below link
enter link description here
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.368 s
[INFO] Finished at: 2020-08-30T15:27:29Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project common: Compilation failure: Compilation failure:
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/utils/CacheUtils.java:[78,12] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.utils.CacheUtils.DataStreamPkCache
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/utils/CacheUtils.java:[80,30] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.utils.CacheUtils.DataStreamPkCache
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/cdc/mappers/MergeInfoMapper.java:[29,42] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: package com.google.cloud.teleport.v2.utils
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/cdc/mappers/MergeInfoMapper.java:[59,11] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.cdc.mappers.MergeInfoMapper
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :common
By now this is well known to developers bug, confirmed on my side, getting the same kafka-to-bigquery template compilation error around DataStreamClient class. Seems the new PR for CacheUtils.java is going to appear soon, more info here.

Maven: How do I use JMetro styling with Maven?

I wanted to use JMetro styling in my Maven project, but whatever I do, Maven gives me the same error. I am using javafx-archetype-simple from org.openjfx, and I tried using JMetro by adding it as a dependency in my pom.xml, and downloading it from JCenter by adding the .settings.xml to ~/.m2/. Whenever I tried to do mvn javafx:run after mvn clean, I always get this error:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< io.colocasian.calc:ore-no-calculator >----------------
[INFO] Building ore-no-calculator 1.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:0.0.4:run (default-cli) > process-classes # ore-no-calculator >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ore-no-calculator ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/rishvic/Documents/Java/ore-no-calculator/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # ore-no-calculator ---
[WARNING] Can't extract module name from jmetro-11.6.5.pom: zip END header not found
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /home/rishvic/Documents/Java/ore-no-calculator/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[17,22] package jfxtras.styles does not exist
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[35,26] cannot find symbol
symbol: class Style
location: class io.colocasian.calc.App
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[35,40] cannot find symbol
symbol: variable Style
location: class io.colocasian.calc.App
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[377,13] cannot find symbol
symbol: class JMetro
location: class io.colocasian.calc.App
[INFO] 4 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.443 s
[INFO] Finished at: 2020-01-31T21:46:28+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project ore-no-calculator: Compilation failure: Compilation failure:
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[17,22] package jfxtras.styles does not exist
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[35,26] cannot find symbol
[ERROR] symbol: class Style
[ERROR] location: class io.colocasian.calc.App
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[35,40] cannot find symbol
[ERROR] symbol: variable Style
[ERROR] location: class io.colocasian.calc.App
[ERROR] /home/rishvic/Documents/Java/ore-no-calculator/src/main/java/io/colocasian/calc/App.java:[377,13] cannot find symbol
[ERROR] symbol: class JMetro
[ERROR] location: class io.colocasian.calc.App
[ERROR] -> [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/MojoFailureException
Link to Gist containing my edited pom.xml, settings.xml and App.java which I used to try to use JMetro in my project. Source code (without JMetro, which actually runs with mvn clean javafx:run) linked here.
Output of java -version:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10)
OpenJDK 64-Bit Server VM (build 11.0.6+10, mixed mode)
Output of mvn --version:
Apache Maven 3.6.3 (NON-CANONICAL_2019-11-27T20:26:29Z_root)
Maven home: /opt/maven
Java version: 11.0.6, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-11-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.15-2-manjaro", arch: "amd64", family: "unix"
PS: I am really new to using Maven, I would really appreciate some advice regarding using Maven, in general, and also using JavaFX on it. Originally, posted this question on Github Issues, on the JFXtras Styles Git repo, but it wasn't really an issue with JMetro itself, so posted this question here.
Extra info: I don't know if this has anything to do with it, but I am still adding it as reference. When I added JMetro 11.6.7 as a dependency and reran mvn clean javafx:run, while downloading, it gave me these warnings,
...
[WARNING] Can't extract module name from jmetro-11.6.7.pom: zip END header not found
...
[WARNING] Can't extract module name from jmetro-11.6.7.pom: Only outputDirectories and jars are accepted on the path
[WARNING] Some dependencies encountered issues while attempting to be resolved as modules and will not be included in the classpath; you can change this behavior via the 'includePathExceptionsInClasspath' configuration parameter.
The official Maven repo of JMetro didn't work for me as well. I resorted to downloading the JMetro jar from GitHub, adding it manually to Maven, and then use it in my JavaFX apps.
Here's what I did to make JMetro play nice with Maven:
Download the official JMetro jar from GitHub
Add the downloaded jar to the local Maven repo:
mvn install:install-file -Dfile=jmetro-11.6.15.jar -DgroupId=com.jfxtras -DartifactId=jmetro -Dversion=11.6.15
Add it to the project's pom.xml as a dependency:
<dependency>
<groupId>com.jfxtras</groupId>
<artifactId>jmetro</artifactId>
<version>11.6.15</version>
</dependency>
For modular projects, declare it in project's module-info.java:
module <ModuleName> {
...
requires org.jfxtras.styles.jmetro;
...
}
Now JMetro can be used normally.

SBT <project name> project refresh failed

Whenever I try to enable auto-import in IntelliJ it always gives me this error:
SBT 'mobile-aggregator' project refresh failed
Error:Error while importing SBT project:[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down serverSee complete log in href="file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log">file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log
This happens quite a few times when your compiler / editor tries to use your cached project data.
To fix this, perform the following steps:
Exit IntelliJ & Delete .idea folder from the root project folder
Delete target folder from root_project_folder\target & root_project_folder\project\target
Make sure you have a valid name for your project name inside build.sbt. It should be in the following format: name := "projectname"
Again start your intelliJ and reinitialize your project.
Hopefully, that should have solved your problem

error: package org.picketlink.idm.internal does not exist

I changed my pom.xml to add picktlink-social so I changed my pom to remove picketlink-deltaspike, and addeda apache deltaspike because I had some redundancy issues with picktlink detlaspike, and for a while my app worked.
So every once in a while when I did a mvn clean, I got this error
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project unikaimagen: Compilation failure: Compilation failure:
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[33,34] error: package org.picketlink.idm.internal does not exist
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[35,30] error: package org.picketlink.internal does not exist
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[70,9] error: cannot find symbol
[ERROR] symbol: class EEJPAContextInitializer
[ERROR] location: class IDMConfiguration
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[33,34] error: package org.picketlink.idm.internal does not exist
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[35,30] error: package org.picketlink.internal does not exist
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[70,9] error: cannot find symbol
[ERROR] symbol: class EEJPAContextInitializer
[ERROR] location: class IDMConfiguration
[ERROR] /home/jdc/git/unikaimagen/src/main/java/ec/com/unikaimagen/init/IDMConfiguration.java:[110,25] error: cannot find symbol
[ERROR] -> [Help 1]
So I changed the version of picketlink from 2.6.1 to 2.6.0 or 2.6.0 to 2.6.1 and it compiled again. But now that is not even working,
This is my pom.xml http://pastebin.com/9bRMrGkv.
org.picketlink.internal should be in picketlink-impl module, which is included in my pom.xml
This is my IDMConfiguration.java http://pastebin.com/XES0WyDQ
http://pastebin.com/XES0WyDQ
I did a jarscan and found this
$ java -jar jarscan.jar -d /home/jdc/.m2/repository/ EEJPAContextInitializer
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
+/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.0.Final/picketlink-impl-2.6.0.Final.jar
/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.0.Final/picketlink-impl-2.6.0.Final.jar/org/picketlink/internal/EEJPAContextInitializer.class
+/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.0.CR2/picketlink-impl-2.6.0.CR2.jar
/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.0.CR2/picketlink-impl-2.6.0.CR2.jar/org/picketlink/internal/EEJPAContextInitializer.class
+/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.1.Final/picketlink-impl-2.6.1.Final.jar
/home/jdc/.m2/repository/org/picketlink/picketlink-impl/2.6.1.Final/picketlink-impl-2.6.1.Final.jar/org/picketlink/internal/EEJPAContextInitializer.class
----------------------------------------------
I had the same problem when I updated the picketlink version. I checked your pom and I realized that it contains
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-api</artifactId>
</dependency>
which specifies all the dependencies, but you have also added each module separately. So, I think you should delete them and try again.

Categories