Adding KML Library JAK - kml

How do I add a the JAK Library to my java project so I can use it?
I Dont understand how to I acctually make it useable in my Java Porject if it is on Gittub and I dont see the Jar Files.
Can Anyone please help me with a little guidance? I've checked online and 0 videos about it so All I can ask is help from you guys.

Adding jar dependencies to a Java project depends on what build tools are used (e.g. Maven, Gradle, Ant, etc.). If you're using an IDE, the project can be created around the build artifact (pom.xml for Maven projects, build.gradle for Gradle, etc.) or explicitly add jar files to the CLASSPATH for that project.
If you have a Maven project, add this dependency to your pom.xml file:
<dependency>
<groupId>de.micromata.jak</groupId>
<artifactId>JavaAPIforKml</artifactId>
<version>2.2.1</version>
</dependency>
For Gradle project, add this to your build.gradle file:
dependencies {
compile group: 'de.micromata.jak', name: 'JavaAPIforKml', version: '2.2.1'
//...
}
Alternatively, you can manually download the jars from the official dev.java.net Maven 2 repository. Note that JAK depends on JAXB libraries so you will need them also. Review the POM for JAK for details.

Related

How do I get the sources jar from jitpack repository?

I am using jitpack to make resolve my java projects dependencies for projects on github.
I have set my maven pom.xml to build a sources jar in the project and I can see from the log-file on jitpack.io, that the sources-jar is being build. But when I include the project, the sources-jar does not appear in my local repository.
I need the sources jar for better code completion in IntelliJ.
Anyone has an idea about what I am doing wrong?
Snippet from jitpack log file that shows that the sources jar file is generated by jitpack:
✅ Build artifacts:
com.github.abstractica-org:JavaCSG:Refactor-d59d2a4908-1
Files:
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1-sources.jar
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1-sources.jar.md5
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1-sources.jar.sha1
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.jar
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.jar.md5
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.jar.sha1
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.pom
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.pom.md5
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/JavaCSG-Refactor-d59d2a4908-1.pom.sha1
com/github/abstractica-org/JavaCSG/Refactor-d59d2a4908-1/build.log
So the file IS created on jitpack.io but it never makes it to my local maven repository...
I am using jitpack to use the project from another project and everythings works fine except that I do not get the sources jar file in my local maven repository, only the main jar.
Here is the part of the pom.xml that includes the project from another project:
<dependencies>
<dependency>
<groupId>com.github.abstractica-org</groupId>
<artifactId>JavaCSG</artifactId>
<!--suppress MavenModelInspection -->
<version>Refactor-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

How create pom file in android studio for artifactory?

I have uploaded .aar without pom.xml to artifactory and thus cannot load the library using gradle.
I would be grateful if you tell me or show how it should look inside the pom.xml.
If someone knows how to create the desired content file, then it will be great.
I tried to create pom.xml using the code in gradle below, but it seems to me that this is the wrong option.
task writePom {
doLast {
pom {
project {
groupId 'com.someth.someth'
artifactId 'name'
version '1.1'
url="http://someth.com/artifactory/someth_pr/someth-release.aar"
}
}.writeTo("pom.xml")
}
}
I used url to show where to get my .aar file.
When I put my generated pom.xml file in artifactory and decided to do "Sync now" gradle gave an error:
Failed to resolve: com.someth.someth:name:1.1
From Android Gradle plugin 3.6.0 and higher you can use the afterEvaluate{} publishing which allows you to publish build artifacts to an Apache Maven repository. It includes all the components for each build variant artifact in your app or library module (with the generated pom.xml).
More info you can find in the official Android documentation.
Have in mind that the repositories tag inside the pom.xml file (if you want to import dependencies from a custom source) it's skipped by the Android's gradle tasks for security reasons.
Last, you could use also the old classic way for the publication described by the JFrog official documentation.

jhipster-entity-audit #Inject issue

I am using generator-jhipster 4.0.7 and I ve created a project, and I want to create new entity with auditing. The netity is created succesfully but the audit generator is creating dependencies with #Inject, which is not a part of the current jhipster version. Does anyone know how to solve this issue?
Thanx
the simple way will be to add the javax.inject dependencies to your project i.e. pom.xml if you are having a maven project or to your build.gradle if you have a gradle project.
for maven:
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
for gradle:
compile group: 'javax.inject', name: 'javax.inject', version: '1'
You need to check if by adding this dependencies you are not getting any conflicts in your project. This is something what I can't say because I don't know what other libs are you using.

download cassansdra jbcd 1.2.3 jar

Can someone give me a link to download the cassandra-jbcd.1.2.3.jar ?
The most recent version I found is cassandra-jbcd.1.2.1.jar and i really need the last version of cassandra for my work.
Please help
Since it's not in their downloads you can build it yourself using the dependency. Create a maven project add the dependency, compile the project and maven will create the jar for you.
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-clientutil</artifactId>
<version>1.2.3</version>
</dependency>
Here is an example build, but I dont think it will be very long before it's out of date again.

Build and include JSF taglib as jar in a Dynamic Web Project using Maven

I am working on a JSF taglib. To test it I compile it to a JAR as described here and add it manually to a Dynamic Web Project (In the WEB-INF/lib directory).
I know that this step can be automated, but I do not know how. Can anybody explain how to copy a generated jar to a second project in Eclipse?
Thanks in advance!
quite some steps to do :)
add a pom.xml into your project and follow the maven directory structure. use packaging "jar" for the taglib project. Lets assume you use groupId=com.company.taglib artifactId=company-taglib version=1.0.0-SNAPSHOT
if you do a mvn install on this project it will copy the jar into your local maven repository (usually found at ~/.m2/ - now maven can resolve the dependency on your local machine
add a pom.xml to your webproject, use packaging "war" and add the taglib project as a dependency (within <dependencies> in pom.xml).
<dependency>
<groupId>com.company.taglib</groupId>
<artifactId>company-taglib</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
Maven will resolve this dependency from your local repository. In Eclipse using the m2e Plugin it will resolve the project directly.
To "publish" the taglib.jar you need an infrastructure to share artifacts. Usually using a repository proxy (Sonatype Nexus or Artifactory). You can also use a network folder using the file:// protocol for quick startup.
In the pom.xml you need to add the <distributionManagement> section (in the taglib pom.xml) to specify the folder / proxy the artifacts are uploaded to. A mvn deploy will then build and copy the jar file for you.
Other developers need to add that location as repository in settings.xml (I dont recommend doing that in pom.xml) or if you setup a maven proxy configure a mirrorOf in settings.xml
There are archteypes available (project templates) that will help you creating initial project structures: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
see also: http://maven.apache.org/guides/getting-started/index.html

Resources