public class EclipseSourceDir extends Object implements Comparable
source directories should always have a null output value.
Constructor and Description |
---|
EclipseSourceDir(String path,
String output,
boolean isResource,
boolean test,
List include,
List exclude,
boolean filtering) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object obj) |
boolean |
equals(Object obj) |
List |
getExclude()
Getter for
exclude . |
String |
getExcludeAsString() |
List |
getInclude()
Getter for
include . |
String |
getIncludeAsString() |
String |
getOutput()
Getter for
output . |
String |
getPath()
Getter for
path . |
int |
hashCode() |
boolean |
isFiltering()
Wheter this resource should be copied with filtering.
|
boolean |
isResource()
Getter for
isResource . |
boolean |
isTest()
Getter for
test . |
boolean |
merge(EclipseSourceDir mergeWith)
Merge with the provided directory.
|
void |
setExclude(List exclude)
Setter for
exclude . |
void |
setFiltering(boolean filtering)
Wheter this resource should be copied with filtering.
|
void |
setInclude(List include)
Setter for
include . |
void |
setOutput(String output)
Setter for
output . |
void |
setPath(String path)
Setter for
path . |
void |
setTest(boolean test)
Setter for
test . |
String |
toString() |
public EclipseSourceDir(String path, String output, boolean isResource, boolean test, List include, List exclude, boolean filtering)
path
- the eclipse source directoryoutput
- path output directoryisResource
- true if the directory only contains resources, false if a compilation directorytest
- true if is a test directory, false otherwiseinclude
- a string in the eclipse pattern format for the include filterexclude
- a string in the eclipse pattern format for the exclude filterfiltering
- true if filtering should be applied, false otherwise. Note: Filtering will only be applied if
this become a "special directory" by being nested within the default output directory.public List getExclude()
exclude
.public void setExclude(List exclude)
exclude
.exclude
- The exclude to set.public List getInclude()
include
.public void setInclude(List include)
include
.include
- The include to set.public String getExcludeAsString()
public String getIncludeAsString()
public String getOutput()
output
.
source directories should always have a null output value.
public void setOutput(String output)
output
.output
- The output to set.public String getPath()
path
.public void setPath(String path)
path
. Converts \\ to / in path.path
- The path to set.public boolean isTest()
test
.public void setTest(boolean test)
test
.test
- The test to set.public boolean isResource()
isResource
.public boolean isFiltering()
public void setFiltering(boolean filtering)
filtering
- filter resourcespublic boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int compareTo(Object obj)
compareTo
in interface Comparable
Comparable.compareTo(java.lang.Object)
public boolean merge(EclipseSourceDir mergeWith) throws MojoExecutionException
If one directory is a source and the other is a resource directory then the result will be a source directory and any includes or excludes will be removed since Eclipse has no "main", "test" or "resource" concepts. The output directory will be the source directories value.
If the two directories are the same resources type (i.e isResource is equal) then the result will be the same resource type with the includes from each merged together (duplicates will be removed), similarly for the excludes. No effort is made to ensure that the includes and excludes are disjointed sets. Please fix your pom instead.
No support for cases where the test, or filtering values are not identical.
mergeWith
- the directory to merge withMojoExecutionException
- test or filtering values are not identical, or isResource true and output are not
identicalCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.