Flink: Why is Hive dependency flink-sql-connector-hive not available on Maven Central? - maven

According to Flink SQL Hive: Using bundled hive jar:
The following tables list all available bundled hive jars. You can pick one to the /lib/ directory in Flink distribution.
flink-sql-connector-hive-1.2.2 (download link)
flink-sql-connector-hive-2.2.0 (download link)
...
However, these dependencies are not available from Maven central. As a work around, I use user defined dependencies, but this is not recommended:
the recommended way to add dependency is to use a bundled jar. Separate jars should be used only if bundled jars don’t meet your needs.
I wonder why the bundle jars are not available in Maven central?
Follow-up: Since they are not available from Maven central, I wonder how to include them in pom.xml in order to run mvn package, if I don't want to use user defined dependencies?
Thanks!

The answer is, I am wrong. flink-sql-connector-hive does exist in maven central, see https://search.maven.org/artifact/org.apache.flink/flink-sql-connector-hive-2.2.0_2.11/1.12.0/jar.

Related

How to add unmanned jars directory to specif profile in Maven with out install

I want to add my jars library which is c:\tmp\jars\ (more than 100 jars files) to specific profile in Maven with out installing.
Installing each jar in maven and adding each dependency is not i'm looking.
I'm using Intellij and Maven
I can add the jar directory by project module settings add Jars but its applicable to all profiles, i want add this jars to specific profile.
for example y project has 2 profiles hdp,azure
for hdp profile the external jars not required but azure profile the external jar required.
Agian I don't want to install in maven add each dependency is not my option.
If the jars are not listed as dependencies in your POM, Maven cannot see them.
Even if IntelliJ sees them, you get a strange hybrid project that Maven cannot build any more.

Update Maven Dependencies Jars

I am new to Maven and have a quick question. I am using the JBoss IDE and have my Maven project set up. I have several jar files in my Maven Dependencies build path that need to be updated to a newer version. I have tried adding the external jars manually, but they do not go within the Maven Dependencies library and the outdated jar remains within that library.
What is the best way to update the jars with the Maven Dependencies library?

What is the purpose of providing a downloaded pom.xml on mvnrepository.com

On mvnrepositry, when you search for a certain module, there's a link to download the binary. For some versions it has a pom.xml file available for download instead of the jar. What are you supposed to do with that pom.xml? It seems like if I specify a version that does not have a downloadable jar, but instead downloadable pom.xml, my maven build will fail. Is what I'm seeing correct?
Modules that only have pom files are maven modules with pom packaging. They are used to aggregate multiple modules into one unit. You can use such a module as a dependency for your maven project. Maven will download the pom file, analyze the dependencies included in that pom file and download those & add it to your automatically.
Even modules that have jars (jar packaging) have a pom file associated with them. This pom file defines the other dependencies that are required for using it. Maven will automatically process and fetch those dependencies (transitive dependencies).
This makes specifying and managing dependency for any project. You will specify the top level modules that your projects directly depends on and other things required will automatically figured out and downloaded. It also makes it easier when you have upgrade to a new version - all the transitive dependencies will get upgraded automatically.
One of the reason that cause this is because of licensing issue.
License for such JARs prohibit public redistribution in such approach. So someone provide only the POM so that you can get the JAR yourself and install it to your local maven repo/ internal repo, together with the POM provided.

Add multiple JARs and Javadoc to local Maven repository

I have a number of JAR files that comprise two different Java SDKs for BOXI R3.1: BusinessObjects Enterprise Java SDK and the Web Services Consumer Java SDK.
The BusinessObjects Enterprise Java SDK has a number of 'core' JARs:
biarengine.jar
biplugins.jar
cecore.jar
celib.jar
ceplugins_client.jar
ceplugins_core.jar
ceplugins_cr.jar
cereports.jar
cesession.jar
ceutils.jar
corbaidl.jar
ebus405.jar
flash.jar
SL_plugins.jar
logging.jar
pluginhelper.jar
xcelsius.jar
and a number of dependencies:
asn1.jar
backport-util-concurrent-2.2.jar
certj.jar
commons-logging.jar
derby.jar
freessl201.jar
jsafe.jar
log4j.jar
rascore.jar
sslj.jar
The Javadocs are available as a ZIP file.
The situation is similar for the web-services SDK, so I will omit the details.
Goal: package each SDK and its Javadoc as a local, Maven repository (it doesn't appear that SAP is providing a remote one).
Questions:
can one Maven repository contain multiple JAR files? The mvn deploy:deploy-file plugin seems to only work on a single file: How to add a jar, source and Javadoc to the local Maven repository?
should Javadocs be kept in ZIP format in a Maven repository?
if i choose to make to repos for a given SDK (i.e. core and dependencies), is specifying the linkage as easy as editing the core repos' configuration file?
rather than creating a repo for the dependencies, I'm assuming that it would be better to identify and reference existing Maven repos (e.g log4j.jar). Will this lead me to JAR hell?
Yes a maven repo can contain multiple files, you can execute mvn deploy:deploy-file on each one (using -Djavadoc and -Dsources as needed).
To specify dependencies for a jar, create a pom file for it (with dependencies) and use -DpomFile (and omit -DgeneratePom) in mvn deploy:deploy-file.
Yes you should not re-invent the wheel and deploy artifacts to your repository that are already in central. You can use tools like http://mvnrepository.com to search for your jars (look META-INF/MANIFEST.MF in your jars to find the version).
For more info see: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html.

Why can't I download MysqlConnectionPoolDataSource sources and find javadocs with Maven?

I see that for some jars Maven (m2e) automatically downloads sources and/or javadocs. But not for com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource class in mysql-connector-java ver. 5.1.18.
Why?
Is this my mistake or sources and docs are not on repository? How to check artifact has no sources using http://search.maven.org/ website?
The sources are not delivered into Maven Central by the vendor. I assume MySQL does not like to put the sources of their driver onto Maven Central.
Checking for sources is simple, cause there must be a package called mysql-connector-java-5.1.18-sources.jar which isn't their.

Resources