how to add the servlet api to my pom.xml

I believe most web/app servers come bundled with a version of the servlet api, so you won’t want to bundle the api in your .war file. You will need to find out which version is included with your server, then you can use <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet-api-version}</version> <scope>provided</scope> </dependency> replacing servlet-api-version with your version. You … Read more

What is the difference between artifactId and groupId in pom.xml?

From maven.apache.org, Naming Conventions: artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it’s a third party jar you have to take the name of the jar as it’s distributed. eg. maven, commons-math groupId will … Read more

Maven and Spring Boot – non resolvable parent pom – repo.spring.io (Unknown host)

Obviously it’s a problem with your internet connection. Check, if you can reach http://repo.spring.io with your browser. If yes, check if you need to configure a proxy server. If no, you should contact your internet provider. Here is the documentation, how you configure a proxy server for Maven: https://maven.apache.org/guides/mini/guide-proxies.html

Filtering Maven files into WEB-INF

<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0.2</version> <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp/WEB-INF</directory> <filtering>true</filtering> <targetPath>WEB-INF</targetPath> <includes> <include>**/xmlgateway-context.xml</include> </includes> </resource> </webResources> </configuration> </plugin> </plugins> Add the above to your pom.xml. EDIT: Just to explain what the above conf is doing. With this added, mvn is going to filter files under src/main/webapp/WEB-INF and in particular filter the included files xmlgateway-context.xml and … Read more

Maven profile activation with multiple conditions

Maven <activation> block is a list of OR — the profile will be activated as soon as the first criteria is met. So, it is less likely that your problem has a solution at least until this bug-report gets fixed https://issues.apache.org/jira/browse/MNG-4565 Update: it’s fixed in 3.2.2 now – sfussenegger (via comment)

How do I run a specific goal with a particular configuration in a Maven plugin when I have several configurations for that goal

Execution of multiple goals from the CLI is now supported in Maven 3.3.1+ mvn exec:java@first-cli mvn exec:java@second-cli Where first-cli/second-cli are the execution ids. https://blog.soebes.de/blog/2015/03/17/apache-maven-3-dot-3-1-features/ For your example the commands would be mvn myplugin:mygoal@process-cats mvn myplugin:mygoal@process-dogs

The POM for project is missing, no dependency information available

Change: <!– ANT4X –> <dependency> <groupId>net.sourceforge</groupId> <artifactId>ant4x</artifactId> <version>${net.sourceforge.ant4x-version}</version> <scope>provided</scope> </dependency> To: <!– ANT4X –> <dependency> <groupId>net.sourceforge.ant4x</groupId> <artifactId>ant4x</artifactId> <version>${net.sourceforge.ant4x-version}</version> <scope>provided</scope> </dependency> The groupId of net.sourceforge was incorrect. The correct value is net.sourceforge.ant4x.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)