-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o Fixing available(), it always return false. This prevented many tes…
…ts from running and has probably been a problem for a while. o Implementing filtering for deb packaging. o Setting file mode on all files in git to 644. o Setting version back to the proper snapshot after merging.
- Loading branch information
Showing
126 changed files
with
1,199 additions
and
1,102 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
unix-common/src/main/java/org/codehaus/mojo/unix/FileCollector.java
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
unix-common/src/main/java/org/codehaus/mojo/unix/UnixFsObject.java
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
* | ||
* @author <a href="mailto:[email protected]">Trygve Laugstøl</a> | ||
*/ | ||
public abstract class UnixPackage | ||
public abstract class UnixPackage<UP extends UnixPackage<UP>> | ||
implements FileCollector | ||
{ | ||
private final String packageFileExtension; | ||
|
@@ -53,32 +53,41 @@ public UnixPackage( String packageFileExtension ) | |
this.packageFileExtension = packageFileExtension; | ||
} | ||
|
||
public abstract UnixPackage parameters( PackageParameters parameters ); | ||
public abstract UP parameters( PackageParameters parameters ); | ||
|
||
// ----------------------------------------------------------------------- | ||
// | ||
// ----------------------------------------------------------------------- | ||
|
||
public final UnixPackage workingDirectory( LocalFs workingDirectory ) | ||
@SuppressWarnings( "unchecked" ) | ||
public UP workingDirectory( LocalFs workingDirectory ) | ||
{ | ||
this.workingDirectory = workingDirectory; | ||
return this; | ||
return (UP)this; | ||
} | ||
|
||
public UnixPackage basedir( File basedir ) | ||
@SuppressWarnings( "unchecked" ) | ||
public UP basedir( File basedir ) | ||
{ | ||
this.basedir = basedir; | ||
return this; | ||
return (UP)this; | ||
} | ||
|
||
public File getScripts() | ||
{ | ||
return new File( basedir, "src/main/unix/scripts" ); | ||
} | ||
|
||
public UnixPackage debug( boolean debug ) | ||
@SuppressWarnings( "unchecked" ) | ||
public UP debug( boolean debug ) | ||
{ | ||
return this; | ||
return (UP)this; | ||
} | ||
@SuppressWarnings( "unchecked" ) | ||
public UP setVersion( PackageVersion version ) | ||
{ | ||
this.version = version; | ||
return (UP)this; | ||
} | ||
|
||
public abstract void beforeAssembly( FileAttributes defaultDirectoryAttributes, LocalDateTime timestamp ) | ||
|
@@ -87,12 +96,6 @@ public abstract void beforeAssembly( FileAttributes defaultDirectoryAttributes, | |
public abstract void packageToFile( File packageFile, ScriptUtil.Strategy strategy ) | ||
throws Exception; | ||
|
||
public UnixPackage setVersion( PackageVersion version ) | ||
{ | ||
this.version = version; | ||
return this; | ||
} | ||
|
||
public final PackageVersion getVersion() | ||
{ | ||
return version; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
unix-common/src/main/java/org/codehaus/mojo/unix/io/IoEffect.java
100644 → 100755
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 57 additions & 51 deletions
108
unix-common/src/main/java/org/codehaus/mojo/unix/io/fs/Fs.java
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,57 @@ | ||
package org.codehaus.mojo.unix.io.fs; | ||
|
||
import org.codehaus.mojo.unix.io.*; | ||
import org.codehaus.mojo.unix.util.*; | ||
import org.joda.time.*; | ||
|
||
import java.io.*; | ||
|
||
public interface Fs<F extends Fs> | ||
extends Closeable | ||
{ | ||
boolean exists(); | ||
|
||
boolean isFile(); | ||
|
||
boolean isDirectory(); | ||
|
||
LocalDateTime lastModified(); | ||
|
||
long size(); | ||
|
||
F resolve( RelativePath relativePath ); | ||
|
||
/** | ||
* The logical root of this file system. For local file system, it is the File it was created from, for archive | ||
* file system types it's the archive's File path. | ||
*/ | ||
File basedir(); | ||
|
||
/** | ||
* The path inside the file system. | ||
*/ | ||
RelativePath relativePath(); | ||
|
||
/** | ||
* For local files, File.getAbsolutePath. For archive files it's the archives path + "!" + relativePath | ||
*/ | ||
String absolutePath(); | ||
|
||
InputStream inputStream() | ||
throws IOException; | ||
|
||
Iterable<F> find( IncludeExcludeFilter filter ) | ||
throws IOException; | ||
|
||
void mkdir() | ||
throws IOException; | ||
|
||
void copyFrom( Fs<?> from ) | ||
throws IOException; | ||
} | ||
package org.codehaus.mojo.unix.io.fs; | ||
|
||
import org.codehaus.mojo.unix.io.*; | ||
import org.codehaus.mojo.unix.util.*; | ||
import org.joda.time.*; | ||
|
||
import java.io.*; | ||
|
||
/** | ||
* Move the write methods into WrFs<F extends Fs> extends Fs<F> | ||
*/ | ||
public interface Fs<F extends Fs> | ||
extends Closeable | ||
{ | ||
boolean exists(); | ||
|
||
boolean isFile(); | ||
|
||
boolean isDirectory(); | ||
|
||
LocalDateTime lastModified(); | ||
|
||
long size(); | ||
|
||
F resolve( RelativePath relativePath ); | ||
|
||
/** | ||
* The logical root of this file system. For local file system, it is the File it was created from, for archive | ||
* file system types it's the archive's File path. | ||
*/ | ||
File basedir(); | ||
|
||
/** | ||
* The path inside the file system. | ||
*/ | ||
RelativePath relativePath(); | ||
|
||
/** | ||
* For local files, File.getAbsolutePath. For archive files it's the archives path + "!" + relativePath | ||
*/ | ||
String absolutePath(); | ||
|
||
InputStream inputStream() | ||
throws IOException; | ||
|
||
Iterable<F> find( IncludeExcludeFilter filter ) | ||
throws IOException; | ||
|
||
void mkdir() | ||
throws IOException; | ||
|
||
void copyFrom( Fs<?> from ) | ||
throws IOException; | ||
|
||
void copyFrom( Fs from, InputStream is ) | ||
throws IOException; | ||
} |
Empty file modified
0
unix-common/src/main/java/org/codehaus/mojo/unix/io/fs/FsUtil.java
100755 → 100644
Empty file.
Oops, something went wrong.