How can I use ua-parser in my application? - java

How can i use "ua-parser" in my web application?. I can't find any jar archive in git hub repository https://github.com/tobie/ua-parser. I searched google but I can't find any websites for ua-parser.
Where can i download ua-parser for jar archive?.
Is there any website for ua-parser?
Is anybody using ua-parser?. Please help me.

Clone the repository and run mvn package from the java folder.
This is explained in details here
You'll end up with a jar (actually a bunch of jar if you count the dependencies)

Related

How to setup gg.classpath for Oracle goldengate BigQuery Adapter

Im tryinig to configure the BigQuery adapter for Oracle golden gate (12c). But unfortunately Im not able to understand this gg.classpath. In the doc, they mentioned to download client Lib from the GitHub
But it contains so many folders, I don't know what folder I can download and where to copy them.
Also we have download some JAR files, and put it a directory.
Next, download the following JARs from Maven Central, and then include them in the classpath for the BigQuery Handler:
Where I can put these JAR files?
Can someone give me an example to configure the gg.classpath
Oracle doc link: https://docs.oracle.com/en/middleware/goldengate/big-data/12.3.2.1/gadbd/using-bigquery-handler.html#GUID-A8426075-81E8-47AB-BA15-3C564751A490
example gg.classpath: gg.classpath= /path_to_repository/bigquery/libs/*:/path_to_repository/bigquery/*
You can download the jars file from maven as mentioned in the documentation. Once you have download the jar files you can place them in any directory of the server/machine where you have installed Oracle GoldenGate for BigData. Lets say for example /u01/OGG. After that you can include that directory in the classpath as below.
Example:
gg.classpath=dirprm:/u01/OGG/jdk1.8.0_221/:/u01/OGG/oci-java-sdk/lib/:/u01/OGG/oci-java-sdk/third-party/lib/:/u01/OGG/hdfs_jar/:/u01/OGG/parquet_jar/*
In the above example i have downloaded OCI Handler, Parquet Handler and their dependency and placed them in path /u01/OGG/. Here handler_name is oci-java-sdk and parquet_jar.
Just leaving the answer here, so others can benefit from this.
-- Steps for manually build the jar files
-- Or download all the jar from the above link and skip all these steps.
apt install maven
git clone https://github.com/googleapis/google-api-java-client-services.git
cd google-api-java-client-services/clients/google-api-services-bigquery/v2/1.29.2/
mvn clean install
-- Copy all the jar files to /opt/ogg/jar
mkdir -p /opt/ogg/jar
cp target/*.jar /opt/ogg/jar
-- We also need to download the following JARs from Maven Central
-- download path /opt/ogg/jar
api-common-1.6.0.jar
gax-1.28.0.jar
gax-httpjson-0.45.0.jar
google-auth-library-credentials-0.9.1.jar
google-auth-library-oauth2-http-0.9.1.jar
google-cloud-bigquery-1.31.0.jar
google-cloud-core-1.35.0.jar
google-cloud-core-http-1.35.0.jar
google-http-client-jackson-1.23.0.jar
guava-25.1-jre.jar
threetenbp-1.3.6.jar
Or I have a zip file that contains all the necessary files. You can get it from the below link.
https://github.com/BhuviTheDataGuy/medium-blog-files/raw/master/golden-gate-bigquery/jar-files.zip
For more detailed Step by step Setup for Oracle to BigQuery, refer the below link.
https://medium.com/searce/sync-oracle-to-bigquery-with-golden-gate-bigquery-adapter-59991bbdb5e3

How to deploy 3rd party jars in maven root repository?

I have a jar file I want to upload that jar to the central maven repository for my further use. I am tried this-link and It run successfully but as I told you above now I want to upload this jar to the central for further use and I am trying to use this-link. But I am not understanding it properly. I need a brief tutorial that what is
DRepositoryId and Durl
and how can I get DRepositoryId and Durl.
If you really want to upload your jar file to maven central, you need to follow these instructions: https://maven.apache.org/repository/guide-central-repository-upload.html

How to Create a jar file from github project

I want a jar file for the project https://github.com/klout/brickhouse but I don't see any link on the site which gives me jar file. There is a link on right menu to download the project as zip file.
I found similar question How to create single jar file from github tree?, but I have dependencies in the pom.xml. I'm using eclipse and win-7. One way I can think of is create a new project in eclipse, add all java packages and files, get all dependency jar files from pom.xml, download them and add to class path. But this will be a lengthy process. Any help is much appreciated. Thanks.
There's a Getting Started section in the project's README that shows the steps to follow to do just that. I just tried them and they work just fine:
$ git clone http://github.com/klout/brickhouse
$ cd brickhouse
$ mvn package
$ cd target
$ dir
That's it! You have to have Maven installed of course.
A little late in responding, but Brickhouse has a separate Downloads page in the wiki
https://github.com/klout/brickhouse/wiki/Downloads
Also, if you are using maven or ivy, it should be available in the sonatype public repo.
http://central.maven.org/maven2/com/klout/brickhouse/
If you are using maven to build a jar assembly, add the following lines in your pom.xml
<dependency>
<groupId>com.klout</groupId>
<artifactId>brickhouse</artifactId>
<version>0.5.5</version>
</dependency>

connect to teamcity from java and download a build

I've been googling how to connect to a TeamCity server and download a specific .war file. No luck.
I'm writing an application that needs to connect to TeamCity, download a war file, upload it to a server and some other stuff.
I can't figure out the TeamCity thing. Any suggestions?
You can do this with artifacts in TeamCity. For example you add the following artifact path to your configuration: src\YourProject\bin\Release\* => YourBuild.zip
This will pack all files located in this folder in the zip file. See this blog post for more examples.
The zip file itself is then available for download e.g. http://localhost:8080/repository/download/bt6/180:id/YourBuild.zip
To get the proper IDs (here bt6 and 180) for your download link you can use TeamCity's REST API.
Here is the official documentation how to download build artifacts from TeamCity server.
Commons HTTP client is known to work well. You need to authorize or to enable public access to your artifacts (see more on this).
Hope this helps,
KIR

Issue with Red5 server

I have installed Red5 server successfully and also am able to run the demos fine. Now, I want to create a sample red5 server application. I created a sample project according to the specific directory structure that Red5 requires. But, now when I try to open this project in Netbeans 6.8, I am unable to because both have a different directory structure. So, Netbeans doesn't consider it as a project. I actually want to convert this project to a war file, so I can deploy it to red5/webapps directory and then red5 deployer service can make project out it automatically. How do I convert this project to a war file? because in Netbeans I am unable to open it. Please help.
I don't know if this will fully answer your questions but this is my configuration.
In the main red5 directory there is a file called project.zip, you can open it to get basic configuration files, directories structure and build files for ant (Pure Java build tool).
Using netbeans, you create a new free-form project and point it to the directory of your project. because of the ant build files the project will be recognized.
Netbeans provides it's own ant version but i prefer to install and use ant from command line.
when you'll run ant in the project directory it will try to find dependencies and probably at first will complain that it cannot find ivy.
Ivy is a dependency manager that red5 project uses that can be found in the following URL: http://ant.apache.org/ivy/download.html
please notice that ant will tell you exactly where it searches for the required jar file, just download the ivy zip, unzip it, and place the jar inside it in the requested directory.
once ant will compile the project properly (just by running the commant ant), it will also create a war file under dist directory.
don't forget to add to your red5 netbeans project the relevant red5 jars in order for the project to compile properly.
I am also prefer use ant from command line. I have two directory structures. One for source files and another for deployment.
This example helped me to start.

Categories

Resources