Maven Build Scripts Found - IntelliJ - What are the build scripts, where are they cached? - maven

So basically, as the title of the post states, I'm wondering what IntelliJ is referring to when it says that Maven build scripts were found? Are these scripts that Maven keeps cached or are they IntelliJ specific? If they are generated by Maven, where are they stored/ how can I view them if that is possible?
Thanks!

This notification is to inform you that you are working with IntelliJ IDEA project that is not linked to the external build system (Maven or Gradle).
When you open a project in IntelliJ IDEA that was not initially imported from Maven/Gradle and IDE detects pom.xml or build.gradle files in the project, it will display a notification so that you can properly import the project from the build script.
Build script in your specific case is a pom.xml file stored inside a project directory. It's recommended that you open Maven projects by importing the root pom.xml file.
When a project is not imported from the external build system, your source roots configuration may be incomplete and you may be missing the dependencies.

Related

Maven doesn't recognize dependencies added in IntelliJ project structure

I need to use external dependencies for tomcat. I add them to project structures and project build fine. Compiler doesn't show any errors
project structure
The project works fine when i run it on IDE.
The problem starts when I try to build WAR file using Maven package :
package org.apache.catalina does not exist
package org.apache.catalina.connector does not exist
package org.apache.coyote does not exist
I've try with all different scope settings but jars aren't found

Maven Project in Eclipse `org.springframework cannot be resolved to a type` from target path

I've rolled onto a maven project that when I run mvn clean install from command line builds and runs fine. I had this project displaying in Eclipse without errors earlier in the week before I hosed my system. This makes me think I have a configuration wrong and hoping someone can give me a sanity check.
Inside of Eclipse, I'm seeing reported errors related to org.springframework cannot be resolved to a type in files in paths like <project_path>/target/<project>-<version>/WEB-INF/... What is catching my eye is that path of target which is a derived folder.
Maven Dependencies Showing:
Facets Enabled:
Project Explorer View:
From the above screenshots, you can see that the related jar files are pulled properly from the maven dependencies. Any ideas on what I have misconfigured and why I'm seeing the errors from the target path?
The build and WebContent folders indicate that you haven't properly imported Maven project into the Eclipse, hence errors.
One of the way to fix this:
Delete project from the Eclipse.
Go to project folder and delete all not needed folders. (Leave src).
Go to Eclipse click File -> Import..., select Existing Maven Projects, select your project folder, Finish.

How to deploy custom JavaScript rules in Sonarqube?

I recently happened to work on Sonarqube version 5.3. I installed it and the Sonar server is running fine, I even analysed some code and installed some plugins, but now I want to define some custom rules in JavaScript. I downloaded the sample code from Sonarqube website for custom rule in JS.
The downloaded folder has one pom.xml and src folder. I don't know how to deploy this custom rule, somewhere I read that I need to create .jar file and place it in "extension/plugins" folder. I am stuck here: I don't know how to generate .jar file.
You've downloaded the source code, which is a Maven Project, now you should build the plugin with Maven (mvn).
See SonarQube documentation on Building Plugins.
When you download the "javascript custom rule" project from https://github.com/SonarSource/sonar-examples/tree/master/plugins/javascript-custom-rules
You can see that it's a Maven project as it has pom.xml
Now you have 2 option to create .jar out of this project.
Option#1: Open this project in Eclipse and do "Run==> maven Clean" and then "Run==> maven install"
It will generate a .jar for you which you can see in Eclipse console.
Option#2: Open Linux terminal or windows cmd, ensure that you have maven installed. Go to the project path where pom.xml is there and invoke command: "mvn clean install"
It will generate a .jar for you which you can see in console.
Thanks !

Gradle project dependency not working

Can some one please help me in below:
I am using RTC and checkout Gradle project, but at the end when I am checking the properties and looking for source folder for my build, I am getting nothing.
Also I am not send the repository specific Gradle jars. What i am doing wrong?
I tried including external jars but no luck as their are too many jars.
Error: project is not at all building.
right click on your project then configure and convert it to gradle project.
Refresh and you will see all dependencies.

IntelliJ IDEA does not create artifacts from pom.xml

I use the IntelliJ IDEA 12.1.4 under Windows and Linux (Ubuntu). The Maven plugin is installed.
I have a big maven project with many poms. Under Windows the IDEA creates artifacts automatically when I do reimport from maven. But under my Linux system the list of artifacts is empty always.
Is it a bug? How to generate artifacts in the Linux case?
Go to the Maven-Projects-View and click "package" for your aggregator project. IntelliJ will then run Maven which creates all artifacts in the target folder. If you run "install", these artifacts will be copied to the local repository. Maybe you didn't do that under Linux yet, so your repository is empty - under Windows, I suppose that IntelliJ was smart enough to refer to those artifacts while importing the project. I personally do not know of any feature in IntelliJ that would automatically package/install all projects on reimport - I'd consider this rather annyoing.

Resources