31 Mayıs 2023 Çarşamba

plugin Kullanımı

Plugin Configuration
Açıklaması şöyle
- Each plugin has its own configuration parameters that define how it should execute.
- The configuration is specified within the <configuration> element of the plugin.
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.1</version>
  <configuration>
    <source>1.8</source>
    <target>1.8</target>
  </configuration>
</plugin>
Plugin Execution
Açıklaması şöyle
- Plugins can be bound to specific phases of the build lifecycle using the <executions> element.
- Each execution can define one or more goals to be executed in a specific order.
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>3.0.0-M5</version>
  <executions>
    <execution>
      <id>run-tests</id>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>  
  </executions>
</plugin>
Plugin Dependency
Açıklaması şöyle
- Plugins can have their own dependencies, which are specified within the <dependencies> element.
- These dependencies are separate from project dependencies and are used to support the plugin’s functionality.
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.1</version>
  <dependencies>
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>custom-compiler</artifactId>
      <version>1.0.0</version>
    </dependency>
  </dependencies>
</plugin>
Plugin Management
Açıklaması şöyle
- Plugin management allows defining plugin versions and configurations in a central location within the <pluginManagement> section.
- This allows for consistent configuration across multiple projects.
Örnek
Şöyle yaparız
<pluginManagement>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.8.1</version>
      <configuration>
        <source>1.8</source>
        <target>1.8</target>
      </configuration>
    </plugin>
  </plugins>
</pluginManagement>



MojoFailureException Nedir? - Plugin Hatası Anlamına Gelir

Giriş
Açıklaması şöyle. Yani plugin hatası anlamına gelir
Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a failure of the build because there is something wrong with the dependencies or sources of a project, e.g. a compilation or a test failure.

The concrete meaning of the exception depends on the plugin so please have a look at its documentation. The documentation for many common Maven plugins can be reached via our plugin index.

30 Mayıs 2023 Salı

type tag

Giriş
type tag için varsayılan değer jar

Örnek
<!-- Dependency with test-jar packaging -->
<dependency>
  <groupId>com.example</groupId>
  <artifactId>my-artifact</artifactId>
  <version>1.0.0</version>
  <scope>test</scope>
  <type>test-jar</type>
</dependency>

<!-- Dependency with jar packaging -->
<dependency>
  <groupId>com.example</groupId>
  <artifactId>my-artifact</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
  <type>jar</type>
</dependency>


22 Mayıs 2023 Pazartesi

surefire plugin - forkCount Tag

Giriş
Örnek
Dışarıdan forkCount vermek için şöyle yaparız
mvn ... -DforkCount=1C -DreuseForks=true
forkCount Nedir ?
forkCount Tag için açıklama şöyle. Yani testleri çalıştırmak için en fazla kaç tane VM açılacağını belirtir. Varsayılan değer 1
Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process.

Example values: "1.5C", "4"
reuseForks Nedir?
reuseForks için açıklama şöyle. Yani eğer false ise test sınıfı bitince VM kapatılır. true ise VM yeni bir test sınıfını çalıştırırır
The parameter reuseForks is used to define whether to terminate the spawned process after one test class and to create a new process for the next test in line (reuseForks=false), or whether to reuse the processes to execute the next tests (reuseForks=true).

The default setting is forkCount=1/reuseForks=true, which means that maven-surefire-plugin creates one new JVM process to execute all tests in one Maven module.

forkCount=1/reuseForks=false executes each test class in its own JVM process, one after another. It creates the highest level of separation for the test execution, but it would probably also give you the longest execution time of all the available options. Consider it as a last resort.

Peki Neden Lazım
1. forkCount testlerin kaç tane JVM içinde koşmasını istediğimizi belirtmek için lazım. 
2. reuseForks testlerin yalıtımı için lazım. Yani testlerde singleton gibi state tutan bir nesne varsa ve testlerimiz birbirlerini etkilemesin istiyorsak, her test için yeni bir VM açılabilir.

Örnek
Elimizde şöyle bir kod olsun
public class TestClass1 { @Test public void testMethod1() { MySingleton instance = MySingleton.getInstance(); System.out.println("TestClass1 - Test Method 1 " + instance.incrementCounter()); } @Test public void testMethod2() { MySingleton instance = MySingleton.getInstance(); System.out.println("TestClass1 - Test Method 2 " + instance.incrementCounter()); } } public class TestClass2 { @Test public void testMethod3() { MySingleton instance = MySingleton.getInstance(); System.out.println("TestClass2 - Test Method 3 " + instance.incrementCounter()); } @Test public void testMethod4() { MySingleton instance = MySingleton.getInstance(); System.err.println("TestClass2 - Test Method 4 " + instance.incrementCounter()); } }
Bu kod bir singleton nesneyi değiştiriyor
public class MySingleton { private int counter; private static MySingleton instance = new MySingleton(); private MySingleton() { } public static MySingleton getInstance() { return instance; } public int incrementCounter() { counter++; return counter; } }
forkCount=1 ve reuseForks= false şeklinde kullanırsak çıktı şöyle. Yani her test sınıfı için yeni VM açılır ve her test kendi singleton nesnesini kullanıyor
TestClass1 - Test Method 1 1 TestClass1 - Test Method 2 2 TestClass2 - Test Method 3 1 TestClass2 - Test Method 4 2
forkCount=1 ve reuseForks= true şeklinde kullanırsak çıktı şöyle. Yani aynı VM tüm testler için kullanılır ve her test aynı singleton nesnesini kullanıyor
TestClass1 - Test Method 1 1 TestClass1 - Test Method 2 2 TestClass2 - Test Method 3 3 TestClass2 - Test Method 4 4
forkCount=2 ve reuseForks= true şeklinde kullanırsak çıktı şöyle. Bu sefer her testi farkı bir VM çalıştırıyor her test kendi singleton nesnesini kullanıyor. Ayrıca dikkat edilirse çıktıda önce Test1 sonra Test2 yok. Yani testlerin çalışması sırayla değil. Her ikisi de aynı anda başlıyor.
TestClass1 - Test Method 1 1 TestClass2 - Test Method 3 1 TestClass1 - Test Method 2 2 TestClass2 - Test Method 4 2




17 Mayıs 2023 Çarşamba

jacoco plugin - Build Quality Enforcement

Giriş
jacoco:check diye yeni bir goal tanımlanır. check aşamasında belirtilen kapsama yüzdeleri tutmuyorsa build fail eder. chck için rule tanımlanır. Açıklaması şöyle
The rule is given in the rule tag. You have the flexibility to specify more than one rule.

Element tag: This tag specifies the element on which the rule has to be applied.
Limit tag: Tags like counter, value, minimum, etc., are used to limit the code coverage percentage. A command like mvn clean verify can be used for ensuring whether the rule is followed or not.
Counter olarak şunlar kullanılabilir
CLASS
LINE
PACKAGE
INSTRUCTION

Örnek - LINE
Şöyle yaparız %90 Line Coverage ister
<execution>
  <id>jacoco-check</id>
  <goals>
    <goal>check</goal>
  </goals>
  <configuration>
    ...
    <rules>
      <rule>
        <element>PACKAGE</element>
        <limits>
          <limit>
            <counter>LINE</counter>
            <value>COVEREDRATIO</value>
            <minimum>0.9</minimum>
          </limit>
        </limits>
      </rule>
    </rules>
  </configuration>
</execution>
Örnek - LINE
Şöyle yaparız. %50 Line Coverage ister
<plugin>
  ... 
  <executions>
    ...
    <execution>
      <id>jacoco-check</id>
      <goals>
        <goal>check</goal>
      </goals>
      <configuration>
        <rules>
          <rule>
            <element>PACKAGE</element>
            <limits>
               <limit>
                <counter>LINE</counter>
                <value>COVEREDRATIO</value>
                <minimum>0.50</minimum>
              </limit>
            </limits>
          </rule>
        </rules>
      </configuration>
    </execution>
  </executions>
</plugin>
Örnek - INSTRUCTION, CLASS, LINE, BRANCH, METHOD
Şöyle yaparız
<execution>
  <id>check</id>
  <goals>
    <goal>check</goal>
  </goals>
  <configuration>
    <rules>
      <rule>
        <element>BUNDLE</element>
        <limits>
          <limit>
            <counter>INSTRUCTION</counter>
            <value>COVEREDRATIO</value>
            <minimum>${coverage.instruction.threshold}</minimum>
          </limit>
          <limit>
            <counter>CLASS</counter>
            <value>COVEREDRATIO</value>
            <minimum>${coverage.class.threshold}</minimum>
          </limit>
          <limit>
            <counter>LINE</counter>
            <value>COVEREDRATIO</value>
            <minimum>${coverage.line.threshold}</minimum>
          </limit>
          <limit>
...

jacoco Rapor Çıktısı

Sınıf Çıktısı
Sınıfın raporu şeklen şöyle. Burada hem Missed Instructions var.
Bir başkası şöyle. Burada Missed Instructions yok, ama Missed Branches var.


Sütunların açıklaması şöyle
Missed Instructions and Cov. — This gives a graphical and percentage measurement of the number of Java bytecode instructions that have been covered in tests. Red means uncovered, green means covered.

Missed Branches and Cov. — This gives a graphical and percentage measurement of the number of _branches_ that have been covered in tests. A branch is a decision point in your code and you need to provide (at least) a test for each possible way a decision could go in order to get complete coverage.

Missed and Cxty — Here’s where we find the cyclomatic complexity score for your source code. At the package level, this is the sum of the scores for all the methods in all of the classes in the package. At the class level, it’s the sum of scores for all of the methods in the class, and at the method level, it’s the score for the method.

Missed and Lines — This is the number of lines of code and how many lines don’t have complete coverage.

Missed and Methods — This is the number of methods and the number of methods that don’t have complete coverage.

Missed and Classes — This is the number of classes, including inner classes, and the number of classes that don’t have at least some code coverage.
Metod Çıktısı
Her bir metodun üzerine tıklarsak kodu ve kapsamayı gösterir. Kod satırlarına bakarsak kırmızı, sarı ve yeşil renkler görürüz. Açıklaması şöyle
The code is colored red, yellow, or green to indicate whether there is no, partial, or complete code coverage for each line. The class name is highlighted in green to show that the default constructor has been invoked ...
Şeklen şöyle. Burada key == null koşulu test edilmediği için satır sarı renkte.





jacoco plugin En Basit Kullanım

Giriş
Bu kullanımda goal olarak sadece prepare-agent ve report belirtilir.
- prepare-agent ile code instrumentation yapılır ve coverage verisi toplanır
- report ile de rapor üretilir.
- Üretilen rapor target/site/jacoco dizinindedir

Testleri koşturup rapor üretmek için şöyle yaparız
mvn clean test
Eğer testleri tekrar koşmadan sadece raporu tekrar üretmek istersek şöyle yaparız
mvn clean jacoco:report
Örnek
test safhasında report için şöyle yaparız
<plugin>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.8.5</version>
  <executions>
    <execution>
      <goals>
        <goal>prepare-agent</goal>
      </goals>
    </execution>
    <execution>
      <id>report</id>
      <phase>test</phase>
      <goals>
        <goal>report</goal>
      </goals>
     </execution>
  </executions>
</plugin>

9 Mayıs 2023 Salı

dependency-track plugin

Giriş
Açıklaması şöyle
Dependency-Track is an open-source platform by OWASP that allows you to track and manage your software dependencies and their associated risks. Integrating Dependency-Track with your Maven build can provide a comprehensive view of your project’s vulnerabilities. 
Açıklaması şöyle
Now, whenever you build your project, the plugin will automatically upload your project’s dependencies and their metadata to your Dependency-Track instance. You can then monitor and manage the vulnerabilities in your project from the Dependency-Track dashboard.
Örnek
Şöyle yaparız
<plugin>
  <groupId>io.github.dependencytrack</groupId>
  <artifactId>dependency-track-maven-plugin</artifactId>
  <version>4.3.1</version>
  <configuration>
    <apiKey>${dependencyTrackApiKey}</apiKey>
    <url>${dependencyTrackUrl}</url>
    <project>${project.artifactId}</project>
    <version>${project.version}</version>
  </configuration>
</plugin>

dependency-check plugin - Vulnerabilities In Project’s dependencies

Giriş
Açıklaması şöyle
The Dependency-Check Maven plugin is an excellent tool for identifying and reporting any known vulnerabilities in your project’s dependencies. 
Eklenti CVE yani Common Vulnerabilities and Exposures veya daha uzun ismiyle National Vulnerability Database Common Vulnerability Enumeration dosyalarını indirir.

goals
check
aggregate

check goal
Çalıştırmak için şöyle yaparız
mvn clean install
Eklentiyi direkt çalıştırmak için şöyle yaparız
mvn dependency-check:check
aggregate goal
Açıklaması şöyle
We have a multi-module maven application, so we need to run aggregate command to get a report for all modules
Şöyle yaparız
mvn dependency-check:aggregate -P owasp-dependency-check
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.owasp</groupId>
  <artifactId>dependency-check-maven</artifactId>
  <version>8.2.1</version>
  <executions>
    <execution>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>
failBuildOnCVSS  Alanı
Açıklaması şöyle
failBuildOnCVSS — a threshold after with maven command ends with failure.
suppressionFile — path to a file with suppression rules.
dataDirectory — path to a directory with vulnerabilities database.
Şöyle yaparız
<profiles>
  <profile>
    <id>owasp-dependency-check</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.owasp</groupId>
          <artifactId>dependency-check-maven</artifactId>
          <version>${dependency-check-maven.version}</version>
          <inherited>false</inherited>
          <configuration>
            <format>ALL</format>
            <failBuildOnCVSS>7.0</failBuildOnCVSS>
            <suppressionFile>suppressions.xml</suppressionFile>
            <dataDirectory>${cve.database.dir}</dataDirectory>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>aggregate</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>
Supressions Dosyası
Şöyle yaparız
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
    <suppress>
        <notes><![CDATA[
        False positive. https://github.com/jeremylong/DependencyCheck/issues/5233
        ]]></notes>
        <packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
        <cpe>cpe:/a:yaml_project:yaml</cpe>
    </suppress>
</suppressions>
veya şöyle yaparız
<vulnerabilityName>CVE-2021–4235</vulnerabilityName>

8 Mayıs 2023 Pazartesi

compiler plugin

source ve target Tagleri
Açıklaması şöyle
Sometimes when you may need to compile a certain project to a different version than what you are currently using. The javac can accept such command using -source and -target. The Compiler Plugin can also be configured to provide these options during compilation.
Yani java derleyicisine geçilecek -source ve -target parametrelerini 2 şekilde tanımlayabiliyoruz.
1. Global Properties olarak
2. Plugin konfigürasyon parametreleri olarak

Global Properties
Örnek
Java 9 ile şöyle yaparız
<properties>
  <maven.compiler.release>11</maven.compiler.release>
</properties>
SpringBoot ile istersek, şöyle yaparız
<properties>
  <java.version>21</java.version>
</properties>
Açıklaması şöyle
<java.version> is not referenced in the Maven documentation. It is a Spring Boot specificity.
Bu eski yöntem. Şöyle yaparız
<properties>
  <maven.compiler.source>1.8</maven.compiler.source>
  <maven.compiler.target>1.8</maven.compiler.target>
</properties>
Plugin Configuration
Örnek - release tag
Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.1</version>
    <configuration>
      <release>12</release>
    </configuration>
</plugin>
Örnek - source + target tag
Bu eski yöntem. Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.11.0</version>
  <configuration>
    <source>1.8</source>
    <target>1.8</target>
  </configuration>
</plugin>
annotationProcessorPaths Tag
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.0</version>
  <configuration>
    <source>19</source>
    <target>19</target>
    <encoding>UTF-8</encoding>
    <compilerArgs>
      <!-- Configure manifold plugin-->
      <arg>-Xplugin:Manifold</arg>
    </compilerArgs>

    <!-- Add the processor path for the plugin -->
    <annotationProcessorPaths>
      <path>
        <groupId>systems.manifold</groupId>
        <artifactId>manifold-json</artifactId>
        <version>${manifold.version}</version>
      </path>
    </annotationProcessorPaths>
  </configuration>
</plugin>

4 Mayıs 2023 Perşembe

license plugin - THIRD-PARTY.txt Dosyasını Üretir

add-third-party goal
Açıklaması şöyle
Generates a file containing a list of all dependencies and their licenses for a single project build.
prepare-package safhasında çalışır. Çıktıyı dosyasını thirdPartyFilename ve outputDirectory taglerini kullanarak değiştirebiliriz
Örnek
Şöyle yaparız
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <version>2.0.0</version>
  <executions>
    <execution>
      <id>generate-third-party-report</id>
      <phase>prepare-package</phase>
      <goals>
        <goal>add-third-party</goal>
      </goals>
      <configuration>
        <outputDirectory>${project.build.directory}</outputDirectory>
        <thirdPartyFilename>THIRD-PARTY.txt</thirdPartyFilename>
      </configuration>
    </execution>
  </executions>
</plugin>
target/generated-sources/license/THIRD-PARTY.txt yolundaki dosya şöyle
Lists of 5 third-party dependencies.
     (BSD) (The Apache Software License, Version 2.0) ArchUnit (com.tngtech.archunit:archunit:1.0.1 - https://github.com/TNG/ArchUnit)
     (Eclipse Public License 1.0) JUnit (junit:junit:4.13.2 - http://junit.org)
     (New BSD License) Hamcrest Core (org.hamcrest:hamcrest-core:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-core)
     (New BSD License) Hamcrest library (org.hamcrest:hamcrest-library:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-library)
     (MIT License) SLF4J API Module (org.slf4j:slf4j-api:1.7.36 - http://www.slf4j.org)
Örnek
Bir ara şöyle bir hata aldım
[INFO] Included licenses (whitelist): [CC0, Apache License, Version 2.0, MIT License, Public Domain, EPL 2.0, Eclipse Distribution License - v 1.0, BSD 3-Clause License, BSD 2-Clause License, The JSON License, Elastic License 2.0]
[WARNING] There are 1 forbidden licenses used:
[WARNING] License: 'Eclipse Public License 1.0' used by 1 dependencies:
 -JUnit (junit:junit:4.13.2 - http://junit.org)
Yeni lisansı eklemek için şöyle yaparız
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>add-third-party</id>
      <configuration>
        <includedLicenses combine.children="append">
          <includedLicense>Eclipse Public License 1.0</includedLicense>
        </includedLicenses>
      </configuration>
    </execution>
  </executions>
</plugin>
Daha sonra proje ilerledi ve bu sefer yeni bir lisans hatası aldım. Yeni lisansı eklemek için şöyle yaparız
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>add-third-party</id>
      <configuration>
        <includedLicenses combine.children="append">
          <includedLicense>Eclipse Public License 1.0</includedLicense>
          <includedLicense>Eclipse Public License v2.0</includedLicense>
        </includedLicenses>
      </configuration>
    </execution>
  </executions>
</plugin>
license-list goal
Örnek
Çıktısı şöyle
[INFO] --- license:2.2.0:license-list (default-cli) @ hazelcast-jet-s3 ---
[INFO] Adding a license repository jar:file:/D:/Users/user/.m2/repository/org/codehaus/mojo/license-maven-plugin/2.2.0/license-maven-plugin-2.2.0.jar!/META-INF/licenses
[INFO] register GNU Free Documentation License (FDL) version 1.3
[INFO] register GNU General Lesser Public License (LGPL) version 3.0
[INFO] register GNU Affero General Public License (AGPL) version 3.0
[INFO] register GNU General Public License (GPL) version 3.0
[INFO] register GNU General Public License (GPL) version 2.0
[INFO] register GNU General Public License (GPL) version 1.0
[INFO] register Apache License version 2.0
[INFO] register Eclipse Public License - v 2.0 with Secondary License
[INFO] register Eclipse Public License - v 2.0
[INFO] register Eclipse Public License - v 1.0
[INFO] register Eclipse Public + Distribution License - v 1.0
[INFO] register COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
[INFO] register GNU General Lesser Public License (LGPL) version 2.1
[INFO] register MIT-License
[INFO] register BSD 2-Clause License
[INFO] register BSD 3-Clause License
[INFO] register European Union Public License v1.1
[INFO] Available licenses :

 * agpl_v3     : GNU Affero General Public License (AGPL) version 3.0
 * apache_v2   : Apache License version 2.0
 * bsd_2       : BSD 2-Clause License
 * bsd_3       : BSD 3-Clause License
 * cddl_v1     : COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
 * epl_only_v1 : Eclipse Public License - v 1.0
 * epl_only_v2 : Eclipse Public License - v 2.0
 * epl_v1      : Eclipse Public + Distribution License - v 1.0
 * epl_v2      : Eclipse Public License - v 2.0 with Secondary License
 * eupl_v1_1   : European Union Public License v1.1
 * fdl_v1_3    : GNU Free Documentation License (FDL) version 1.3
 * gpl_v1      : GNU General Public License (GPL) version 1.0
 * gpl_v2      : GNU General Public License (GPL) version 2.0
 * gpl_v3      : GNU General Public License (GPL) version 3.0
 * lgpl_v2_1   : GNU General Lesser Public License (LGPL) version 2.1
 * lgpl_v3     : GNU General Lesser Public License (LGPL) version 3.0
 * mit         : MIT-License
excludedGroups Tag
Şöyle yaparız
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <version>2.0.0</version>
  <executions>
    <execution>
      <id>add-third-party</id>
        <!-- We hook this plugin to the compile phase, you can change the phase -->
        <phase>compile</phase>
        <goals>
          <goal>add-third-party</goal>
        </goals>
        <configuration>
	  <!-- Do not check our internal libraries -->
          <excludedGroups>com.globalsport.*</excludedGroups>
	  <!-- Fail the build if the license is not Apache 2.0 or MIT. -->
          <failOnBlacklist>true</failOnBlacklist>
          <licenseMerges>
	    <!-- Aggreagate 'The Apache Software License, Version 2.0'. -->
            <licenseMerge>The Apache Software License, Version 2.0|Apache2|
          Apache-2.0|Apache 2|APL2|Apache 2.0|Apache License, Version 2.0|
          The Apache License, Version 2.0|Apache Software License - Version 2.0|
          the Apache License, ASL Version 2.0|ASL 2.0|Apache License 2.0|ASL, version 2
            </licenseMerge>
	  <!-- Aggreagate 'The MIT License'. -->
          <licenseMerge>The MIT License|
            MIT license|The MIT License (MIT)|MIT License|MIT|MIT-style
          </licenseMerge>
        </licenseMerges>
	<!-- This is our allowed list-->
	<!-- If one of our library license is not one of those the build will fail -->
        <includedLicenses>
          <includedLicense>The Apache Software License, Version 2.0</includedLicense>
          <includedLicense>The MIT License</includedLicense>
        </includedLicenses>
      </configuration>
    </execution>
  </executions>
</plugin>





Local Snapshot Kullanmak

Örnek Şöyle yaparız <repository> <id>snapshot-repository</id> <name>Maven2 Snapshot Repository</name> &l...