From 612add19abcbb43a421bcc9f0980950388349282 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Thu, 27 Aug 2015 07:10:40 +0000
Subject: [PATCH] OPENDJ-2252 Remove svn-property-check maven plugin
---
/dev/null | 29 -----------------------------
opendj-server-legacy/pom.xml | 19 -------------------
pom.xml | 1 -
3 files changed, 0 insertions(+), 49 deletions(-)
diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml
index 0ec345b..89be8db 100644
--- a/opendj-server-legacy/pom.xml
+++ b/opendj-server-legacy/pom.xml
@@ -1184,25 +1184,6 @@
<id>precommit</id>
<build>
<plugins>
- <!-- Check svn:eol-style property on modified files -->
- <!-- TODO: Remove once Git migration over -->
- <plugin>
- <groupId>org.forgerock.opendj</groupId>
- <artifactId>opendj-svn-property-check-maven-plugin</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <executions>
- <execution>
- <id>check-eol-property</id>
- <goals>
- <goal>check-svn-property</goal>
- </goals>
- <configuration>
- <svnPropertyName>svn:eol-style</svnPropertyName>
- <svnPropertyExpectedValue>native</svnPropertyExpectedValue>
- </configuration>
- </execution>
- </executions>
- </plugin>
<!-- Enforce Checkstyle -->
<plugin>
diff --git a/opendj-svn-property-check-maven-plugin/pom.xml b/opendj-svn-property-check-maven-plugin/pom.xml
deleted file mode 100644
index c047a04..0000000
--- a/opendj-svn-property-check-maven-plugin/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ! CDDL HEADER START
- !
- ! The contents of this file are subject to the terms of the
- ! Common Development and Distribution License, Version 1.0 only
- ! (the "License"). You may not use this file except in compliance
- ! with the License.
- !
- ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- ! or http://forgerock.org/license/CDDLv1.0.html.
- ! See the License for the specific language governing permissions
- ! and limitations under the License.
- !
- ! When distributing Covered Code, include this CDDL HEADER in each
- ! file and include the License file at legal-notices/CDDLv1_0.txt.
- ! If applicable, add the following below this CDDL HEADER, with the
- ! fields enclosed by brackets "[]" replaced with your own identifying
- ! information:
- ! Portions Copyright [yyyy] [name of copyright owner]
- !
- ! CDDL HEADER END
- !
- ! Copyright 2015 ForgeRock AS
- !
- -->
-<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>
- <parent>
- <artifactId>opendj-project</artifactId>
- <groupId>org.forgerock.opendj</groupId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>opendj-svn-property-check-maven-plugin</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <name>OpenDJ Check SVN property maven plugin</name>
- <description>
- Checks ForgeRock source file copyrights.
- </description>
- <packaging>maven-plugin</packaging>
-
- <properties>
- <mavenVersion>3.0.4</mavenVersion>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.twdata.maven</groupId>
- <artifactId>mojo-executor</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.tmatesoft.svnkit</groupId>
- <artifactId>svnkit</artifactId>
- <version>1.8.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-annotations</artifactId>
- <version>3.4</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/opendj-svn-property-check-maven-plugin/src/license/THIRD-PARTY.properties b/opendj-svn-property-check-maven-plugin/src/license/THIRD-PARTY.properties
deleted file mode 100644
index 81ce9e3..0000000
--- a/opendj-svn-property-check-maven-plugin/src/license/THIRD-PARTY.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
-#-------------------------------------------------------------------------------
-# Already used licenses in project :
-# - Apache Public License 2.0
-# - Apache Software License, Version 2.0
-# - BSD
-# - Common Development and Distribution License 1.0
-# - Common Development and Distribution License 1.1
-# - Dual licensed (CDDL and GPL)
-# - Dual licensed (CDDL and GPLv2+CE)
-# - GPL (with dual licensing option)
-# - Revised BSD
-# - Sequence Library License
-# - TMate Open Source License (with dual licensing option)
-# - The GNU Lesser General Public License, version 2.0 with Classpath Exception
-# - The GNU Lesser General Public License, version 2.1
-# - The GNU Lesser General Public License, version 3.0
-# - The MIT License
-# - Trilead Library License
-#-------------------------------------------------------------------------------
-# Please fill the missing licenses for dependencies :
-#
-#
-#Tue Apr 21 15:13:12 CEST 2015
-org.antlr--antlr-runtime--3.4=Apache Public License 2.0
diff --git a/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/CheckSVNPropertyMojo.java b/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/CheckSVNPropertyMojo.java
deleted file mode 100644
index 00509f6..0000000
--- a/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/CheckSVNPropertyMojo.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2015 ForgeRock AS
- */
-package org.forgerock.maven;
-
-import java.io.File;
-import java.util.LinkedList;
-import java.util.List;
-
-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;
-import org.tmatesoft.svn.core.SVNDepth;
-import org.tmatesoft.svn.core.SVNException;
-import org.tmatesoft.svn.core.wc.ISVNStatusHandler;
-import org.tmatesoft.svn.core.wc.SVNClientManager;
-import org.tmatesoft.svn.core.wc.SVNPropertyData;
-import org.tmatesoft.svn.core.wc.SVNRevision;
-
-/**
- * This be used to make sure that the file has the correct "svn:eol-style"
- * property value.
- */
-@Mojo(name = "check-svn-property", defaultPhase = LifecyclePhase.VALIDATE)
-public class CheckSVNPropertyMojo extends AbstractMojo implements ISVNStatusHandler {
-
- /** The Maven Project. */
- @Parameter(property = "project", required = true, readonly = true)
- private MavenProject project;
-
- /** The path to the root of the Subversion workspace to check. */
- @Parameter(required = true, defaultValue = "${basedir}")
- private String svnWorkspaceRoot;
-
- @Parameter(required = true)
- private String svnPropertyName;
-
- @Parameter(required = true)
- private String svnPropertyExpectedValue;
-
- @Parameter(property = "skipSvnPropCheck", required = true, defaultValue = "false")
- private boolean checkDisabled;
-
- /**
- * The name of the system property that may be used to prevent eol-style
- * problems from failing the build.
- */
- @Parameter(property = "ignoreSvnPropertyCheckErrors", required = true, defaultValue = "false")
- private boolean ignoreErrors;
-
- /** The overall SVN Client Manager. */
- private final SVNClientManager svnClientManager = SVNClientManager.newInstance();
-
- private final List<String> errorFilePaths = new LinkedList<>();
-
- /** {@inheritDoc} **/
- public void execute() throws MojoExecutionException, MojoFailureException {
- if (checkDisabled) {
- getLog().info("Check svn property " + svnPropertyName + " is disabled");
- return;
- }
-
- try {
- svnClientManager.getStatusClient().doStatus(new File(svnWorkspaceRoot), SVNRevision.WORKING,
- SVNDepth.INFINITY, false, false, false, false, this, null);
- } catch (Exception e) {
- throw new MojoExecutionException("Encountered an error while examining subversion status: "
- + e.getMessage() + "No further checks will be performed.", e);
- }
-
- if (!errorFilePaths.isEmpty()) {
- logWithAppropriateLevel(" Potential " + svnPropertyName + " updates needed " + "for the following files:");
- for (String fileName : errorFilePaths) {
- logWithAppropriateLevel(" " + fileName);
- }
-
- if (!ignoreErrors) {
- throw new MojoExecutionException("Fix " + svnPropertyName + " problems before proceeding, or "
- + "use '-DignoreSvnPropertyCheckErrors=true' to ignore these warnings warnings.");
- }
- }
- }
-
- private void logWithAppropriateLevel(final String message) {
- if (!ignoreErrors) {
- getLog().error(message);
- } else {
- getLog().warn(message);
- }
- }
-
- /**
- * Examines the provided status item to determine whether the associated
- * file is acceptable.
- *
- * @param status
- * The SVN status information for the file of interest.
- */
- public void handleStatus(org.tmatesoft.svn.core.wc.SVNStatus status) {
- File changedFile = status.getFile();
- if (!changedFile.exists() || !changedFile.isFile()) {
- return;
- }
-
- try {
- SVNPropertyData propertyData = SVNClientManager.newInstance().getWCClient()
- .doGetProperty(changedFile, svnPropertyName, SVNRevision.BASE, SVNRevision.WORKING);
- if (propertyData == null || !svnPropertyExpectedValue.equals(propertyData.getValue().getString())) {
- errorFilePaths.add(changedFile.getPath());
- }
- } catch (SVNException se) {
- // This could happen if the file isn't under version control.
- getLog().warn("Impossible to check svn:eol-style for the file " + changedFile.getAbsolutePath()
- + " you might need to add it to svn.");
- }
- }
-}
diff --git a/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/package-info.java b/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/package-info.java
deleted file mode 100644
index e71290c..0000000
--- a/opendj-svn-property-check-maven-plugin/src/main/java/org/forgerock/maven/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
- */
-
-/** Classes implementing the maven plugin to check svn properties on tracked source files. */
-package org.forgerock.maven;
-
diff --git a/pom.xml b/pom.xml
index d73589f..37059d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,6 @@
<modules>
<module>opendj-maven-plugin</module>
<module>opendj-copyright-maven-plugin</module>
- <module>opendj-svn-property-check-maven-plugin</module>
<module>opendj-doc-maven-plugin</module>
<module>opendj-core</module>
<module>opendj-grizzly</module>
--
Gitblit v1.10.0