I am using IntelliJ IDEA 2020.1.4. when I create a module or import a module it is adding extra details in the project details. The extra name appears in the artifact while creating a project from Spring boot Initializer.
I am using Gradle, in the Gradle the name are seems fine:
If the module name does not match the project name - the module name is displayed in the brackets. While the other name - is the name of the directory of the module root.
Related
I started with a quarkus multi maven-module project and encountered the following problem when starting quarkus in the dev mode (mvn quarkus:dev) to support hot reload for depended modules' classes:
A module "my-app" configures its' build output path via the
<project><build><outputDirectory>build</outputDirectory> in the pom.xml. The module is build successfully, and the output exists in path my-app/build instead of the default target/classes.
Then the build of another module "momsServerQuarkus", which depends on the "my-app", and which uses quarkus-maven-plugin, fails with error:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.11.0.Final:dev (default-cli) on project momsServerQuarkus: Failed to run: Hot reloadable dependency de.kwsoft.moms:my-app:6.14.0-SNAPSHOT has not been compiled yet (the classes directory S:\trunk\moms\my-app\target\build does not exist)
As visible in the error message, the <outputDirectory>build</outputDirectory>is read correctly from the my-apps' pom.xml, but is appended to the default output path "target" instead of the projects root folder. I played also variables, e.g. <outputDirectory>${basedir}/build</outputDirectory>, but the variable is not resolved by the quarkus-maven-plugin.
Does anyone know how this could be solved, or whether this could be a bug?
Thank you in advance.
For running JTable in Java Swing at Eclips 2020-06, imported rs2xml.jar file. But after that, while running the program, the following error is occurring.
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for E:\Progrm Learning\JAVA\Student\rs2xml.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: JDOMAbout$Author.class found in top-level directory (unnamed package not allowed in module)
rs2xml.jar contains a class in the default package which is not allowed when using JPMS.
In Project > Properties: Java Build Path, tab Libraries move rs2xml.jar from the Modulepath to the Classpath and in the project, in the source folder, in the default package delete your module-info.java file to not use JPMS.
The answer provided by #howlger works but if after deleting your module-info.java file your
src file gives error then you could start a new project and while creating new project select don't create module-info
Nice question.
rs2xml.jar contains a class in the default package which is not allowed when using JPMS.
In Project > Properties: Java Build Path > Libraries, move rs2xml.jar from the Modulepath to the Classpath.
Then in the project, in the source folder, and in the default package delete your module-info.java file in order to not use JPMS.
I have a multi-module maven project that I am attempting to build.
The project structure is, generally:
Parent project (pom)
Sub Module 1
Sub Module 1A
Sub Module 1B
Sub Module 2
Sub Module 3
Inside of the parent project POM, I have the net.revel.code.formatter plugin defined in my build section to format the JAVA code inside of all of the sub-projects.
One of the attributes that I have to define in the plugin is the location of the configuration file. The file is located in a resource directory inside of Sub Module 3
I have the location attribute specified as ${project.parent.basedir}/submodule3/src/main/resources/eclipse/formatter.xml
The problem that I am running into is that when Sub Module 1A (as an example) is building, it seems that the ${project.parent.basedir} is resolving to the parent directory for Sub Module 1A (which is Sub Module 1) instead of the root of the project (where the property is actually defined).
Could someone help me sort out how to resolve this?
I am trying to setup Hibernate tools – attaching it to the spring petclinic project. So far the problem is in classpath. My actions:
Click on hibernate on the Hibernate Configuration view
Add
postgresql-9.1.jar located in the root directory of the
spring-petclinic project
The result is the error: [Classpath]: Archive classpath entry doesn't exist [/spring-petclinic/postgresql-9.1.jar] ( see http://jboston.net/HIbernateToolsError.jpg for the image)
See also the log:
java.lang.IllegalArgumentException: Path must include project and resource name: /postgresql-9.1.jar
java.lang.IllegalArgumentException: Path must include project and resource name: /postgresql-9.1.jar
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2170)
at org.eclipse.core.internal.resources.Container.getFile(Container.java:208)
at org.hibernate.eclipse.console.utils.ProjectUtils.findJavaProjects(ProjectUtils.java:308)
at org.hibernate.eclipse.console.workbench.ProjectCompilerVersionChecker.validateProjectComplianceLevel(ProjectCompilerVersionChecker.java:35)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:37)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
#Craig Ringer answer helped. My workaround was as follows:
Create the user library with a postgresql jdbc jar
From the Hibernate configuration classpath tab select Advanced on the
right menu
Choose "Add library"
It looks like you've attempted to add the JDBC jar as a required project. Don't. Add it as a library dependency instead.
See this list of ways to do it - unverified, as I thankfully no longer have to use Eclipse anymore.
I'm using maven to build a ".ear" project that resolves dependencies from a maven repository, and then packages them into an ear (that's probably a redundant sentence...).
When the dependencies show up in the ear file, they're named according to this format:
<artifactId>-<version>.<type>
I'd like them to be named:
<artifactId>.<type>
Can someone point me in the right direction?
If you're using the maven-assembly-plugin to build your ear, you can use the outputFileNameMapping property in your descriptor: http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_dependencySet
However, you're probably better off using the maven-ear-plugin, in which case you can customize the bundleFileName, as described here.
Set the finalName property. See http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html for more details