JAVA-49: Removed module maven-all, to be replaced with maven-modules
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
## Apache Maven
|
||||
|
||||
This module contains articles about Apache Maven. Please refer to its submodules.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Apache Maven Tutorial](https://www.baeldung.com/maven)
|
||||
- [Find Unused Maven Dependencies](https://www.baeldung.com/maven-unused-dependencies)
|
||||
@@ -1,3 +0,0 @@
|
||||
### Relevant Articles
|
||||
|
||||
- [Maven Compiler Plugin](https://www.baeldung.com/maven-compiler-plugin)
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>compiler-plugin-java-9</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${compiler.plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${source.version}</source>
|
||||
<target>${target.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<compiler.plugin.version>3.8.0</compiler.plugin.version>
|
||||
<source.version>9</source.version>
|
||||
<target.version>9</target.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package com.baeldung.maven.java9;
|
||||
|
||||
import static javax.xml.XMLConstants.XML_NS_PREFIX;
|
||||
|
||||
public class MavenCompilerPlugin {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("The XML namespace prefix is: " + XML_NS_PREFIX);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
module com.baeldung.maven.java9 {
|
||||
requires java.xml;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
### Relevant Articles:
|
||||
|
||||
- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin)
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>counter-maven-plugin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>counter-maven-plugin Maven Mojo</name>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<organization>
|
||||
<name>Baeldung</name>
|
||||
<url>https://www.baeldung.com/</url>
|
||||
</organization>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>${maven-plugin-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<version>${maven-plugin-annotations.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>${maven-project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>${maven-plugin-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven-plugin-api.version>3.6.2</maven-plugin-api.version>
|
||||
<maven-plugin-annotations.version>3.6.0</maven-plugin-annotations.version>
|
||||
<maven-project.version>2.2.1</maven-project.version>
|
||||
<maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
|
||||
<maven-site-plugin.version>3.8.2</maven-site-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
package com.baeldung.maven.plugin.validator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
/**
|
||||
* Counts the number of maven dependencies of a project.
|
||||
*
|
||||
* It can be filtered by scope.
|
||||
*
|
||||
*/
|
||||
@Mojo(name = "dependency-counter", defaultPhase = LifecyclePhase.COMPILE)
|
||||
public class DependencyCounterMojo extends AbstractMojo {
|
||||
|
||||
/**
|
||||
* Scope to filter the dependencies.
|
||||
*/
|
||||
@Parameter(property = "scope")
|
||||
String scope;
|
||||
|
||||
/**
|
||||
* Gives access to the Maven project information.
|
||||
*/
|
||||
@Parameter(defaultValue = "${project}", required = true, readonly = true)
|
||||
MavenProject project;
|
||||
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
List<Dependency> dependencies = project.getDependencies();
|
||||
|
||||
long numDependencies = dependencies.stream()
|
||||
.filter(d -> (scope == null || scope.isEmpty()) || scope.equals(d.getScope()))
|
||||
.count();
|
||||
|
||||
getLog().info("Number of dependencies: " + numDependencies);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>example</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons.lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>counter-maven-plugin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>dependency-counter</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<scope>test</scope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<commons.lang3.version>3.9</commons.lang3.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,47 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven-unused-dependencies</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<commons-collections.version>3.2.2</commons-collections.version>
|
||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||
<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
|
||||
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-api.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.baeldung.mavendependencyplugin;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class UnusedDependenciesExample {
|
||||
|
||||
/**
|
||||
* When the Maven dependency analyzer analyzes the code, it will see that the slf4j dependency is being used in this method.
|
||||
*
|
||||
* @return the slf4j {@link Logger}.
|
||||
*/
|
||||
public Logger getLogger() {
|
||||
return LoggerFactory.getLogger(UnusedDependenciesExample.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
## Maven WAR Plugin
|
||||
|
||||
This module contains articles about the Maven WAR Plugin.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Eclipse Error: web.xml is missing and failOnMissingWebXml is set to true](https://www.baeldung.com/eclipse-error-web-xml-missing)
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven-war-plugin</name>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<!-- Update maven war plugin to 3.1.0 or higher -->
|
||||
<version>${war.plugin.version}</version>
|
||||
<configuration>
|
||||
<!-- Set failOnMissingWebXml configuration for maven war plugin -->
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<!-- Set failOnMissingWebXml as false in properties section -->
|
||||
<properties>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<war.plugin.version>3.1.0</war.plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,2 +0,0 @@
|
||||
/output-resources
|
||||
/.idea/
|
||||
@@ -1,18 +0,0 @@
|
||||
## Apache Maven
|
||||
|
||||
This module contains articles about core Apache Maven. Articles about other Maven plugins (such as the Maven WAR Plugin)
|
||||
have their own dedicated modules.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Guide to the Core Maven Plugins](https://www.baeldung.com/core-maven-plugins)
|
||||
- [Maven Resources Plugin](https://www.baeldung.com/maven-resources-plugin)
|
||||
- [Quick Guide to the Maven Surefire Plugin](https://www.baeldung.com/maven-surefire-plugin)
|
||||
- [The Maven Failsafe Plugin](https://www.baeldung.com/maven-failsafe-plugin)
|
||||
- [The Maven Verifier Plugin](https://www.baeldung.com/maven-verifier-plugin)
|
||||
- [The Maven Clean Plugin](https://www.baeldung.com/maven-clean-plugin)
|
||||
- [Build a Jar with Maven and Ignore the Test Results](https://www.baeldung.com/maven-ignore-test-results)
|
||||
- [Maven Project with Multiple Source Directories](https://www.baeldung.com/maven-project-multiple-src-directories)
|
||||
- [Integration Testing with Maven](https://www.baeldung.com/maven-integration-test)
|
||||
- [Apache Maven Standard Directory Layout](https://www.baeldung.com/maven-directory-structure)
|
||||
- [Multi-Module Project with Maven](https://www.baeldung.com/maven-multi-module)
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>custom-rule</artifactId>
|
||||
<name>custom-rule</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- dependencies for maven plugin-->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.enforcer</groupId>
|
||||
<artifactId>enforcer-api</artifactId>
|
||||
<version>${api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
<version>${plexus-container-default.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-verifier-plugin</artifactId>
|
||||
<version>${maven.verifier.version}</version>
|
||||
<configuration>
|
||||
<verificationFile>../input-resources/verifications.xml</verificationFile>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<api.version>3.0.0-M2</api.version>
|
||||
<maven.version>2.0.9</maven.version>
|
||||
<plexus-container-default.version>1.0-alpha-9</plexus-container-default.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2019 PloyRef
|
||||
* Created by Seun Matt <[email protected]>
|
||||
* on 19 - 2 - 2019
|
||||
*/
|
||||
|
||||
package com.baeldung.enforcer;
|
||||
|
||||
import org.apache.maven.enforcer.rule.api.EnforcerRule;
|
||||
import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
|
||||
import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
|
||||
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
|
||||
|
||||
public class MyCustomRule implements EnforcerRule {
|
||||
|
||||
public void execute(EnforcerRuleHelper enforcerRuleHelper) throws EnforcerRuleException {
|
||||
|
||||
try {
|
||||
|
||||
String groupId = (String) enforcerRuleHelper.evaluate("${project.groupId}");
|
||||
|
||||
if (groupId == null || !groupId.startsWith("com.baeldung")) {
|
||||
throw new EnforcerRuleException("Project group id does not start with com.baeldung");
|
||||
}
|
||||
|
||||
}
|
||||
catch (ExpressionEvaluationException ex ) {
|
||||
throw new EnforcerRuleException( "Unable to lookup an expression " + ex.getLocalizedMessage(), ex );
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCacheable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isResultValid(EnforcerRule enforcerRule) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getCacheId() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1 +0,0 @@
|
||||
Welcome to ${resources.name}!
|
||||
@@ -1,9 +0,0 @@
|
||||
<verifications xmlns="http://maven.apache.org/verifications/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/verifications/1.0.0 http://maven.apache.org/xsd/verifications-1.0.0.xsd">
|
||||
<files>
|
||||
<file>
|
||||
<location>input-resources/baeldung.txt</location>
|
||||
<contains>Welcome</contains>
|
||||
</file>
|
||||
</files>
|
||||
</verifications>
|
||||
@@ -1,3 +0,0 @@
|
||||
### Relevant Articles
|
||||
|
||||
- [Maven Enforcer Plugin](https://www.baeldung.com/maven-enforcer-plugin)
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-enforcer</artifactId>
|
||||
<name>maven-enforcer</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0-M2</version>
|
||||
<!--<dependencies>-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.baeldung</groupId>-->
|
||||
<!--<artifactId>custom-rule</artifactId>-->
|
||||
<!--<version>1.0</version>-->
|
||||
<!--</dependency>-->
|
||||
<!--</dependencies>-->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<banDuplicatePomDependencyVersions/>
|
||||
<requireMavenVersion>
|
||||
<version>3.0</version>
|
||||
<message>Invalid Maven version. It should, at least, be 3.0</message>
|
||||
</requireMavenVersion>
|
||||
<requireJavaVersion>
|
||||
<version>1.8</version>
|
||||
</requireJavaVersion>
|
||||
<requireEnvironmentVariable>
|
||||
<variableName>ui</variableName>
|
||||
<level>WARN</level>
|
||||
</requireEnvironmentVariable>
|
||||
<requireEnvironmentVariable>
|
||||
<variableName>cook</variableName>
|
||||
<level>WARN</level>
|
||||
</requireEnvironmentVariable>
|
||||
<requireActiveProfile>
|
||||
<profiles>local,base</profiles>
|
||||
<message>Missing active profiles</message>
|
||||
<level>WARN</level>
|
||||
</requireActiveProfile>
|
||||
<!--other rules -->
|
||||
<!--<myCustomRule implementation="com.baeldung.enforcer.MyCustomRule"/>-->
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-verifier-plugin</artifactId>
|
||||
<version>${maven.verifier.version}</version>
|
||||
<configuration>
|
||||
<verificationFile>../input-resources/verifications.xml</verificationFile>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
### Relevant Articles:
|
||||
|
||||
- [Using Maven Behind a Proxy](https://www.baeldung.com/maven-behind-proxy)
|
||||
@@ -1,43 +0,0 @@
|
||||
<!-- start of settings.xml here -->
|
||||
|
||||
<!--
|
||||
Proxies section (extract of settings.xml) containing example proxy definitions:
|
||||
* BaeldungProxy_Encrypted - an example http proxy with an encrypted password - encrypted using 'mvn --encrypt-password'
|
||||
* BaeldungProxy_Authenticated - an example http proxy with a plain text password.
|
||||
* BaeldungProxy - an example minimalist unauthenticated http proxy
|
||||
All of these are 'active' - so maven will use the first one in the list.
|
||||
-->
|
||||
<proxies>
|
||||
|
||||
<proxy>
|
||||
<id>BaeldungProxy_Encrypted</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<host>proxy.baeldung.com</host>
|
||||
<port>80</port>
|
||||
<username>baeldung</username>
|
||||
<password>{U2iMf+7aJXQHRquuQq6MX+n7GOeh97zB9/4e7kkEQYs=}</password>
|
||||
<nonProxyHosts>internal.baeldung.com|localhost|127.*|[::1]</nonProxyHosts>
|
||||
</proxy>
|
||||
|
||||
<proxy>
|
||||
<id>BaeldungProxy_Authenticated</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<host>proxy.baeldung.com</host>
|
||||
<port>80</port>
|
||||
<username>baeldung</username>
|
||||
<password>changeme</password>
|
||||
<nonProxyHosts>internal.baeldung.com|localhost|127.*|[::1]</nonProxyHosts>
|
||||
</proxy>
|
||||
|
||||
<proxy>
|
||||
<id>BaeldungProxy</id>
|
||||
<host>proxy.baeldung.com</host>
|
||||
<port>80</port>
|
||||
<nonProxyHosts>internal.baeldung.com|localhost|127.*|[::1]</nonProxyHosts>
|
||||
</proxy>
|
||||
|
||||
</proxies>
|
||||
|
||||
<!-- rest of settings.xml here -->
|
||||
@@ -1,6 +0,0 @@
|
||||
<!--
|
||||
Redirect maven to settings-security.xml stored elsewhere:
|
||||
-->
|
||||
<settingsSecurity>
|
||||
<relocation>R:\config\settings-security.xml</relocation>
|
||||
</settingsSecurity>
|
||||
@@ -1,7 +0,0 @@
|
||||
<!--
|
||||
Encrypt master password with:
|
||||
mvn --encrypt-master-password
|
||||
-->
|
||||
<settingsSecurity>
|
||||
<master>{QFMlh/6WjF8H9po9UD\}0Nv18e527jqWb6mUgIB798n4=}</master>
|
||||
</settingsSecurity>
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.baeldung.maven.it;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Scanner;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class RestITCase {
|
||||
@Test
|
||||
public void whenSendingGet_thenMessageIsReturned() throws IOException {
|
||||
String url = "http://localhost:8999";
|
||||
URLConnection connection = new URL(url).openConnection();
|
||||
try (InputStream response = connection.getInputStream();
|
||||
Scanner scanner = new Scanner(response)) {
|
||||
String responseBody = scanner.nextLine();
|
||||
assertEquals("Welcome to Baeldung!", responseBody);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.baeldung.maven.plugins;
|
||||
|
||||
public class Foo {
|
||||
|
||||
public static String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.baeldung.maven.it;
|
||||
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
|
||||
public class EndpointConfig extends ResourceConfig {
|
||||
public EndpointConfig() {
|
||||
register(RestEndpoint.class);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user