jhipster-entity-audit #Inject issue - jhipster

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.

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>

Getting Cucumber cannot resolved type

While using #RunWith(Cucumber.class) I am getting:
Cucumber cannot be resolved to type and class <Cucumber>cannot resolved to a type.
But no any suggestions to import library statement.
If I import it manually by using import cucumber.api.CucumberOptions then getting Cucumber.api cannot resolved to the type.
Is there any dependency or any external jars that needed to be added?
Have you added Cucumber as a dependency to your project? You can do so with Maven or Gradle.
For instance, if you are using Maven, you need to add the following dependency to your pom.xml:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
Note that 3.0.2 is the current version atm. There will be new versions released. You can find the latest version either in the documentation or on GitHub.
You can find more information about installation here: https://docs.cucumber.io/installation/java/

Adding KML Library JAK

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.

java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

I am getting this error, when executing JSF and PrimeFaces.
I have included these jars,
jsf-api-2.0.3.jar,
jsf-impl-2.0.3.jar ,
jstl-1.0.2.jar jars and
primefaces-2.2.RC2.jar
in the WEB-INF/lib folder.
Is there any jar I am missing?
Right click on project properties and follow below steps
"Project Properties" --> "Deployment Assembly", adding
"Java Build Path Entries" -> "Maven Dependencies" solves the problem!
Apparently, you're not missing anything else. Just try to do the following:
Ensure that the necessary jars exist in the "lib" project folder;
Do clean & build;
In the end, you should find those included jars, available within the "build" project folder.
Right click on project properties and follow below steps
"Project Properties" --> "Deployment Assembly", adding "Java Build Path Entries" ->jsf 2.0 (mojarra 2.0.3-fcs) solved my problems
I added jsf 2.0 & mojarra 2.0.3-fcs in POM and it fixed my problem.
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.4.0</version>
</dependency>
You can also do this, which solved my problem.
Right click on your project->properties->project facets->java server faces.
Then if the disabled library configuration option has selected, then change it to user library and then add mojarra's latest version and press OK button and try run the project again...
It should help.
If you tried to convert your simple java project to web project using maven and changing specificications from project facets, you won't get a compile error but when you start deployment you can see this error message.
to solve this think of it. This is a web project and needs to deploy as a war file (or ear).
change packaging spec to war in your pom.xml then compile maven again.
Download JAR's from here: http://myfaces.apache.org/download.html
Copy them to TOMCAT lib directory.
Add to Tomcat web.xml these lines from screenshot:
listener
Adding below jars to path ..WebContent\WEB-INF\lib and a maven update solved the problem.
jsf-api
jsf-impl
I had a similar issue and solved after running Maven Update a couple of times when it finally solved the issue. Running only once was not enough because the jar file was still corrupt so you need to make sure it opens with any compression tool like winzip or gzip.

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.

Resources