Index: src/main/java/org/codehaus/mojo/rpm/Source.java
===================================================================
--- src/main/java/org/codehaus/mojo/rpm/Source.java (revision 8531)
+++ src/main/java/org/codehaus/mojo/rpm/Source.java (working copy)
@@ -26,131 +26,130 @@
* A description of a location where files to be packaged can be found.
* @version $Id$
*/
-public class Source
-{
-
+public class Source {
+
// // // Properties
-
+
/** The source location. */
private File location;
-
+
/** The list of inclusions. */
private List includes;
-
+
/** The list of exclusions. */
private List excludes;
-
+
/** true to omit the default exclusions. */
private boolean noDefaultExcludes;
-
+
+ /** target architecture for filtering */
+ private String targetArch;
+
// // // Bean methods
-
+
/**
* Retrieve the location holding the file(s) to install.
* @return The location holding the file(s) to install.
*/
- public File getLocation()
- {
+ public File getLocation() {
return location;
}
-
+
/**
* Set the location holding the file(s) to install.
* @param loc The new location holding the file(s) to install.
*/
- public void setLocation( File loc )
- {
+ public void setLocation(File loc) {
location = loc;
}
-
+
/**
* Retrieve the list of files to include in the package.
* @return The list of files to include in the package.
*/
- public List getIncludes()
- {
+ public List getIncludes() {
return includes;
}
-
+
/**
* Set the list of files to include in the package.
* @param incl The new list of files to include in the package.
*/
- public void setIncludes( List incl )
- {
+ public void setIncludes(List incl) {
includes = incl;
}
-
+
/**
* Retrieve the list of files to exclude from the package.
* @return The list of files to exclude from the package.
*/
- public List getExcludes()
- {
+ public List getExcludes() {
return excludes;
}
-
+
/**
* Set the list of files to exclude from the package.
* @param excl The new list of files to exclude from the package.
*/
- public void setExcludes( List excl )
- {
+ public void setExcludes(List excl) {
excludes = excl;
}
-
+
/**
* Retrieve the default exclude status.
* @return true if the default excludes should be omitted.
*/
- public boolean getNoDefaultExcludes()
- {
+ public boolean getNoDefaultExcludes() {
return noDefaultExcludes;
}
-
+
/**
* Set the default exclude status.
* @param noDefExcl true if the default excludes
* should be omitted.
*/
- public void setNoDefaultExcludes( boolean noDefExcl )
- {
+ public void setNoDefaultExcludes(boolean noDefExcl) {
noDefaultExcludes = noDefExcl;
}
-
+
+ public String getTargetArch() {
+ return targetArch;
+ }
+
+ public void setTargetArch(String targetArch) {
+ this.targetArch = targetArch;
+ }
+
// // // Public methods
-
+
/** {@inheritDoc} */
- public String toString()
- {
+ public String toString() {
StringBuffer sb = new StringBuffer();
- sb.append( "{" );
-
- if ( location == null )
- {
- sb.append( "nowhere" );
+ sb.append("{");
+
+ if (location == null) {
+ sb.append("nowhere");
+ } else {
+ sb.append("\"" + location + "\"");
}
- else
- {
- sb.append( "\"" + location + "\"" );
+
+ if (includes != null) {
+ sb.append(" incl:" + includes);
}
-
- if ( includes != null )
- {
- sb.append( " incl:" + includes );
+
+ if (excludes != null) {
+ sb.append(" excl:" + excludes);
}
-
- if ( excludes != null )
- {
- sb.append( " excl:" + excludes );
+
+ if (noDefaultExcludes) {
+ sb.append(" [no default excludes]");
}
-
- if ( noDefaultExcludes )
- {
- sb.append( " [no default excludes]" );
+
+ if (targetArch != null) {
+ sb.append(" target arch filter: " + targetArch);
}
-
- sb.append( "}" );
+
+ sb.append("}");
return sb.toString();
}
}