Hibernate file into intelij module - hql

Progect Structure -> module -> Add -> Hibernate
But this file dosen't appear in mineenter image description here

Related

Two modules cannot share the same content root, Handle common gradle subproject dependency on intellij IDEA

I'm trying to handle a microservice based project in Intellijn IDEA ultimate, I've imported multiple gradle projects(spring based microservices) as Intellij modules.
My projects are A, B, C, the project B and C contain project A as a common subproject dependecy.
All three project are currently imported as modules inside intellij project.
Project B setting.gradle
rootProject.name = 'B'
include ":A"
project(":A").projectDir = file("../../A")
Project B build.gradle
dependencies {
...
implementation project(':A')
...
}
Project C setting.gradle
rootProject.name = 'C'
include ":A"
project(":A").projectDir = file("../../A")
Project C build.gradle
dependencies {
...
implementation project(':A')
...
}
Every time I open the Project setting menu (File -> Project Structure) and I try to change anything(e.g. add/edit/remove a module) i get the following error:
Content root 'path/to/module/A/src/main' is defined for modules B.A.main and C.A.main. Two modules cannot share the same content root
I've tried deleteing the A module dependency for B and C inside the Modules tab inside Project strcuture tab, but all three projects are imported via gradle so it did not work
Is there a way to tell Intellij to import both B and C project without Intellij to go mad about it?

How to add a new directory in Magento 2.4.3 backend

How to add a new directory in Store-> Settings -> Configuration. I want to add a new directory with a php file Programatically
The better way to add new section in Store -> Settings -> Configuration is to create system.xml file in a new module.
https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-systemxml.html

Spring Boot version 2.3.x src/test/resources removed

Seems in the Springboot version 2.3.x , they have removed the src/test/resources folder ,
I downloaded a skeleton from start.spring.io and did not see it , the current project structure is as below , in such a case how do I use a test specific property file , problem is even if I create a src/test/resources folder and put a test.property file in it , its not being found while I am running the test , Any help is greatly appreciated.
Options I chose while generating the skeleton project in start.spring.io
After a fair amount of research I found my answer , so the "resources" folder under src/test has been removed as part of the skeleton project that we could download from start.spring.io , but now they have included a new build task , well my project is in gradle but I am sure such is the case with Maven too , the name of this task in gradle is "processTestResources" , it copies whatever you have inside your src/test/resources folder to the <Project_HOME>/build/resources/test , which is in the classpath and you can access your resources as you could earlier , the only things is now you have to manually create the "resources" folder , now issue resolved , Thanks everyone for your inputs.
What IDE are you using ? Does the project use Maven ? In Eclipse with Maven if you right click on src/test and choose New -> Source Folder, and call it resources it should be created and added to the test classpath by Maven.
After placing the appropriate files in src/main/resources, and src/test/resources and running
try(final Stream<String> fileStreamFromClasspath = Files.lines(Path.of(ClassLoader.getSystemResource("test.file").toURI())))
{
fileStreamFromClasspath.forEach(l -> System.out.println(l)); // NOSONAR
}
try(final Stream<String> fileStreamFromFilesystem = Files.lines(Path.of(("src/main/resources/test.file"))))
{
fileStreamFromFilesystem.forEach(l -> System.out.println(l)); // NOSONAR
}
try(final Stream<String> testFileStreamFromFilesystem = Files.lines(Path.of(("src/test/resources/test.file"))))
{
testFileStreamFromFilesystem.forEach(l -> System.out.println(l)); // NOSONAR
}
Produces output:
This is the test test file.
This is the main test file.
This is the test test file.

import Spark source code into intellij, build Error: not found: type SparkFlumeProtocol and EventBatch

IntelliJ: 14.1.4
Spark: 1.5 release source code
I'm importing Spark source code into IntelliJ, and following steps on Spark website.
I'm getting errors below when building and compiling the project. I've googled around and tried what is suggested here in spark user list to "Generate Sources and Update Folders" in Maven tool bar for "Spark Project External Flume Sink", but still with same errors.
I'm pretty sure it's a resolve issue since all other classes are successfully resolved. Maybe I'm not using IntelliJ correctly? Any suggestions please?
Error:(45, 66) not found: type SparkFlumeProtocol
val transactionTimeout: Int, val backOffInterval: Int) extends SparkFlumeProtocol with Logging {
^
Error:(70, 39) not found: type EventBatch
override def getEventBatch(n: Int): EventBatch = {
I've solved the problem, and it turns out that the "Spark Project External Flume Sink" is excluded when importing Spark source code under default settings.
What I did:
File -> Project Structure -> Modules -> "spark-streaming-flume-sink_2.10" -> Sources
in the tree display of folders, initially "target" folder is excluded, but the "SparkFlumeProtocol" and "EventBatch" classes are compiled into this folder.
set "target" folder as "Sources", then leave all under "target" as "Excluded" except for "scala-2.10", see attached screenshot.
In this way, the compiles classes are included and the classes can be resolved correctly after a re-build project.
--- update June-8-2016 --------
or more specifically, the whole path of this module
please note the type and color, it will affect the package name
package org.apache.spark.streaming.flume.sink;

Can't install Kontakt Android SDK using Gradle on Android Studio

I'm trying to install the Android SDK from Kontakt into a project in Android studio. I'm following the (seemingly basic) instructions on the Kontakt site here:
http://docs.kontakt.io/android-sdk/quickstart/#installing-the-sdk---android-studio
In brief, these steps say add maven { url 'http://repo.kontakt.io/repository/internal/' } in the repositories in your top-level build file, and add to add compile 'com.kontakt.sdk.android:library:1.0.5' in the dependencies in the main module build file.
However, when I try to sync my project with the updated files, it fails with an error message:
Error:Failed to find: com.kontakt.sdk.android:library:1.0.5
I tried with a totally fresh project and the same issue.
I'm guess this all has something to do with the fact that the instructions are written for Android's 0.12 version of the Gradle tools, but I'm using v1.1.0. I'm not across the detail of Gradle, so so any help would be appreciated.
My guess is that path to Kontakt.io public repository should be added to allprojects section instead of buildscript.
allprojects {
repositories {
jcenter()
maven { url 'http://repo.kontakt.io/repository/internal/' }
}
}
I am not 100% sure so don't shoot me:P
I think adding this line:
-->compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.kontakt.sdk.android:library:1.0.6'
Directly above the gradle project I wanted to compile fixed it.
Go to the Kontakt.io Android Proximity SDK https://github.com/kontaktio/kontakt-android-sdk on GitHub.
Click the Download ZIP button
Un-zip the file to a temporary location.
Add the jar file in your Android Studio Project.
File -> New Module -> Import .JAR/ .AAR Package -> Click Next -> Browse the SDK path (2.1.1) -> Finish (Take time to add in the project)
Then, Add module in dependencies
Right Click on Project Name -> Open Module Settings -> Under the list (Modules) -> Click on Dependencies -> Click on '+' -> Module Dependency -> Add Kontakt.io-android-sdk
Now Build your project It worked for me to kontakt io SDK. If anybody find the way to do this as Gradle build, please let me know.

Resources