Skip to content

Commit

Permalink
Move file-visitor code into candy-generate, remove dependency
Browse files Browse the repository at this point in the history
This is code can trivially be integrated as an implementation detail
into candy generator.

Eventually, it can be replaced by standard Java API code, but now is not
the time.
  • Loading branch information
kohlschuetter committed Oct 14, 2023
1 parent c205d8d commit d47acc0
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 105 deletions.
5 changes: 0 additions & 5 deletions candy-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.cincheo</groupId>
<artifactId>file-visitor</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.martiansoftware</groupId>
<artifactId>jsap</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cincheo.filevisitor;
package org.jsweet.filevisitor;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.cincheo.filevisitor;
package org.jsweet.filevisitor;

import java.io.BufferedReader;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* <h1>file-visitor</h1>
* <p>
* This utility written in Java allows for visiting a set of files within a directory an apply bulk
* action written in so-called file visitors. It can be specialized to perform any job on the
* visited files.
* <h2>How to use</h2>
* <ul>
* <li>Implement the ``FileVisitor`` interface.</li>
* <li>Invoke the ``FileVisitor.scan(root, fileVisitors)`` method, where ``root`` is the root file
* to be scanned, and ``fileVisitors`` are you ``FileVisitor`` implementations.</li>
* </ul>
*/
package org.jsweet.filevisitor;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.publisher.visitor.UpdateVersion;

// THIS IS WIP. One day we will have a really automatized publisher for the JSweet Candies Github organization...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;

public class GitCommitPush implements FileVisitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;

public class GitPull implements FileVisitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;
import org.jsweet.publisher.Main;

public class MvnClean implements FileVisitor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;
import org.jsweet.publisher.Main;

public class MvnDeploy implements FileVisitor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.File;

import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;
import org.jsweet.publisher.Main;

public class MvnJavadoc implements FileVisitor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.regex.Pattern;

import org.apache.commons.io.FileUtils;
import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;

public class PomFixer implements FileVisitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.io.File;

import org.apache.commons.io.FileUtils;
import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;

public class RemoveExt implements FileVisitor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.regex.Pattern;

import org.apache.commons.io.FileUtils;
import org.cincheo.filevisitor.FileVisitor;
import org.cincheo.filevisitor.ProcessUtil;
import org.jsweet.filevisitor.FileVisitor;
import org.jsweet.filevisitor.ProcessUtil;

public class UpdateVersion implements FileVisitor {

Expand Down
1 change: 0 additions & 1 deletion file-visitor/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions file-visitor/README.md

This file was deleted.

67 changes: 0 additions & 67 deletions file-visitor/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
</build>

<modules>
<module>file-visitor</module>
<module>typescript.java-ts.core</module>
<module>core-lib/es5</module>
<module>core-lib/es6</module>
Expand Down

0 comments on commit d47acc0

Please sign in to comment.