Get the App
SLTechnology News&Howtos  ›  Development  › 

The class starting with Q in Java cannot be found. What if the plug-in cannot be loaded?

Shulou Source: shulou.com Published: 2022-06-02 01:29:17 10月03日 Update

This article mainly introduces Java Q beginning of the class can not be found, can not load plug-in how to do related knowledge, detailed and easy to understand, simple and fast operation, has a certain reference value, I believe we read this Java Q beginning of the class can not be found, can not load plug-in how to do the article will be harvested, let's take a look at it.

If there is a situation where the com. mysa.maven:apt-maven-plugin cannot be loaded, it is usually due to a problem with the maven plugin repository. All classes starting with Q (such as QInfo, QNode, QVoteMark, etc.) cannot be found due to this problem. QueryDSL generated classes for queries, src/generated-sources/java. Since src/generated-sources/java is not the default source path, if the com. mysa.maven:apt-maven-plugin does not load properly, the source code under this path will not be recognized, resulting in a class not being found. If the plugin loads properly, src/generated-sources/java will be automatically taken as the source path, and everything will work properly.

Error messages are usually:

Execution default of goal com.mysema.maven:apt-maven-plugin:1.1.3:process failed: Unable to load the mojo 'process' (or one of its required components) from the plugin 'com.mysema.maven:apt-maven-plugin:1.1.3' (com.mysema.maven:apt-maven-plugin:1.1.3:process:default:generate-sources)

Since the maven dependency package repository and the maven plugin repository are not configured in the same place, it is easy to ignore them. The maven dependency repository is configured via mirror, while the maven plug-in repository is configured via pluginRepository for profiles.

The complete configuration is as follows:

central * Nexus Aliyun http://maven.aliyun.com/nexus/content/groups/public/ nexus nexus-repo http://maven.aliyun.com/nexus/content/groups/public/ true true nexus-repo http://maven.aliyun.com/nexus/content/groups/public/ true true nexus

After modifying the configuration, you need to reload maven configuration in eclipse Window -> Preferences -> Maven -> User Settings Click Update settings, it is best to restart eclipse, and then right-click the project name- Maven - Update Project to update the project.

If you are using IDEA, you will also need to open View -> Tool Windows -> Maven Projects and click Generate Sources and Update Folders For All Projects.

If you really can't solve this problem, there is a more violent way to delete the com.mysema.maven:apt-maven-plugin configuration in the pom.xml file:

com.mysema.maven apt-maven-plugin

Then copy all the files from src/generated-sources/java to src/main/java.

About "Java Q beginning of the class can not be found, can not load plug-in how to do" The content of this article is introduced here, thank you for reading! I believe everyone has a certain understanding of the knowledge of "Java Q can not be found, can not load plug-in how to do", if you still want to learn more knowledge, welcome to pay attention to the industry information channel.

Tags: Plug-ins configuration beginning repository what to do source code knowledge paths questions content situations files directories articles projects values information places tools development tools Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MariaDB Shulou Technology Redmi Apple