Tag Archives: idea

Bug: unable to download source code in idea, error cannot download sources sources not found for:XXX

Bug Description: idea can’t download the source code, click choose Resource & gt; [select source code package] to confirm and report an error.
Solution: enter the project in the command line interface pom.xml File folder, execute the following command:

mvn dependency:resolve -Dclassifier=sources

Note: do not directly execute the command in terminal in the lower left corner of idea, but in DOS interface.

No artifacts package solution for idea to configure Tomcat

I don’t know why my idea is always inexplicably wrong, maybe it is aimed at me
1. At this point you can see that there are no artifacts and there are warnings in the bottom that cause Tomcat to not be successfully configured

2. The solution I found on the Internet is to check this box, but my default is that the box does not solve my problem
 

3. I updated the Maven environment and solved it successfully

Conclusion: Just update the Maven environment
 

Application of IntelliJ idea in Maven project pom.xml Add dependency


You can quickly add dependencies by using the shortcut Alt + Insert key at the location where you want to add them
The first feature allows you to search directly for the module name and then add it


The Dependency Template helps us generate the corresponding tags directly in the XML

We need to complete the information ourselves

Vc2010 configuring OpenGL environment

Glut32.Lib Glut32.dll and Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h Glut.h
2, the glut. H in the C:/Program Files/Microsoft SDKs/Windows/AA/Include/gl v7.0 directory; GLUT32. lib: C:/Program Files /Microsoft SDKS /Windows/ V7.0a/lib Glut32.dll is placed in the C:/WINDOWS/system32 directory
3. Create a new empty project in VS2010 and select Win32 Console Project
 
4. Add a.cpp file to the project with the following contents:
# include “stdafx. H”
#include< gl/glut.h>
 
Void myDisplay (void)
{
GlClear (GL_COLOR_BUFFER_BIT);
GlRectf (0.5-0.5 f to 0.5 f, f, 0.5 f);
GlFlush ();
}
Int _tmain(int argc, _TCHAR* argv[])
{
GlutInitDisplayMode (GLUT_RGB | GLUT_SINGLE);
GlutInitWindowPosition (100, 100);
GlutInitWindowSize (400, 400);
GlutCreateWindow (” the first OpenGL program “);
GlutDisplayFunc (& amp; myDisplay);
GlutMainLoop ();
Return 0;
}
5. Set the IDE environment: project->; new Property-> Configuration propertites-> linker-> Input-> Additional dependencies
OpenGL32. lib GLUT32. lib, apply, confirm.
 
 
6. F5, Start Debugging, you should see a window with a white square in the middle.

Failed to execute goal

To summarize, Maven packaging, a project engineering development tool called Idea14, uses JDK version 1.8
1. You need to close the idea before packaging, otherwise part of the files will not be deleted when MVN is clean, and files will also be lost when MVN is package.

2. MVN package packaging ERROR: [ERROR] Failed to execute goal. Org. Apache maven. Plugins: maven – clean – plugin: 2.6.1: clean (default – the clean) on the project
Solutions:
1. The POM configuration for the Maven plug-in is as follows:

<plugin>  
    <groupId>org.apache.maven.plugins</groupId>  
    <artifactId>maven-compiler-plugin</artifactId>  
    <version>3.1</version>  
    <configuration>  
        <verbose>true</verbose>  
        <fork>true</fork>  
        <executable>${JAVA_HOME}/bin/javac</executable>  
    </configuration>  
</plugin>  

${JAVA8_HOME} (${JAVA8_HOME}, ${JAVA8_HOME})

The ${JAVA8_HOME} variable is configured in settings.xml as follows:

<profile>  
            <id>custom-compiler</id>  
            <properties>  
                <JAVA8_HOME>C:\Program Files (x86)\Java\jdk1.8.0_73</JAVA8_HOME>  
            </properties>  
</profile>  

Of course this should be enabled, so the settings.xml file should also have the following configuration:

<activeProfiles>  
        <activeProfile>custom-compiler</activeProfile>  
</activeProfiles>  

Maven has a default repository. M2 repository and a default settings.xml configuration file. This default settings.xml file also adds a JAVA_HOME variable, and the compile is completed. If you are using the MVN package command in the CMD window, you are not using the settings.xml in idea. You are using the settings.xml in E: Tools\ maven \conf. You are using the Settings in E: Tools\ maven \conf. Because there is no default configuration to compile using the 1.8 version of the JDK, the JAVA_HOME could not be found before, resulting in a compilation failure.

Error in @ param in idea2017.3.4 / * * / annotation

I changed a new version of IDEA these two days, and encountered the following situations in the process of writing the code:

When I saw the red bar, I was a little confused — annotate what error it reported, and then look at the top right corner to find two errors

The @param property must be owned by the following method, otherwise an error is reported.
So don’t be careless, don’t be careless!

[idea] error occurred when using @ data annotation in Lombok: no related get / set method was found

Modify compile-time rules
1. Open the project Settings

2. Check the Enable Annotation Processing
box
2. Step one cannot solve can try to reload the lombok plugin
I met question is normal to write code, you can use @ Data annotations provide the get/set methods, but unable to compile program, an error is as follows:

ultimately comes down to the choice of the compiler, switch from eclipse for javac, problem solving.

About idea reporting error “cannot access class”

Reproduced in: https://blog.csdn.net/qq_38728337/article/details/82624617


: Cannot access Backend cannot access Group
Thinking about why the same package will report this error, it must be the IDE problem, Google found that someone wrote feedback on the official website, the official website staff answer: restart try
Results!! Reboot idea is no longer an error, my god [emoticon]