View Javadoc

1   /*
2    * #%L
3    * Native ARchive plugin for Maven
4    * %%
5    * Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6    * %%
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   * 
11   * http://www.apache.org/licenses/LICENSE-2.0
12   * 
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package com.github.maven_nar;
21  
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  import org.apache.maven.plugins.annotations.Parameter;
26  
27  public class ProcessLibraryCommand {
28  
29    /**
30     * The executable to run
31     */
32    @Parameter
33    private String executable;
34  
35    /**
36     * The library type that this command is valid for
37     */
38    @Parameter
39    private String libraryType;
40  
41    /**
42     * Any additional arguments to pass into the executable
43     */
44    @Parameter
45    private List<String> arguments;
46  
47    public List<String> getArguments() {
48      return this.arguments;
49    }
50  
51    public List<String> getCommandList() {
52      final List<String> command = new ArrayList<>();
53      command.add(this.executable);
54      if (this.arguments != null) {
55        command.addAll(this.arguments);
56      }
57      return command;
58    }
59  
60    public String getExecutable() {
61      return this.executable;
62    }
63  
64    public String getType() {
65      return this.libraryType;
66    }
67  
68    public void setArguments(final List<String> arguments) {
69      this.arguments = arguments;
70    }
71  
72    public void setExecutable(final String executable) {
73      this.executable = executable;
74    }
75  
76    public void setType(final String type) {
77      this.libraryType = type;
78    }
79  
80  }