View Javadoc

1   package org.apache.maven.plugin.surefire;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  import java.util.List;
24  import java.util.Map;
25  import java.util.Properties;
26  
27  import org.apache.maven.artifact.factory.ArtifactFactory;
28  import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
29  import org.apache.maven.artifact.repository.ArtifactRepository;
30  import org.apache.maven.artifact.resolver.ArtifactResolver;
31  import org.apache.maven.execution.MavenSession;
32  import org.apache.maven.project.MavenProject;
33  import org.apache.maven.toolchain.ToolchainManager;
34  
35  /**
36   * The parameters required to execute surefire.
37   *
38   * @author Stephen Connolly
39   * @noinspection UnusedDeclaration, UnusedDeclaration
40   */
41  public interface SurefireExecutionParameters
42  {
43      boolean isSkipTests();
44  
45      void setSkipTests( boolean skipTests );
46  
47      boolean isSkipExec();
48  
49      void setSkipExec( boolean skipExec );
50  
51      boolean isSkip();
52  
53      void setSkip( boolean skip );
54  
55      File getBasedir();
56  
57      void setBasedir( File basedir );
58  
59      File getTestClassesDirectory();
60  
61      void setTestClassesDirectory( File testClassesDirectory );
62  
63      File getClassesDirectory();
64  
65      void setClassesDirectory( File classesDirectory );
66  
67      MavenProject getProject();
68  
69      void setProject( MavenProject project );
70  
71      List getClasspathDependencyExcludes();
72  
73      void setClasspathDependencyExcludes( List classpathDependencyExcludes );
74  
75      String getClasspathDependencyScopeExclude();
76  
77      void setClasspathDependencyScopeExclude( String classpathDependencyScopeExclude );
78  
79      List getAdditionalClasspathElements();
80  
81      void setAdditionalClasspathElements( List additionalClasspathElements );
82  
83      File getReportsDirectory();
84  
85      void setReportsDirectory( File reportsDirectory );
86  
87      File getTestSourceDirectory();
88  
89      void setTestSourceDirectory( File testSourceDirectory );
90  
91      String getTest();
92  
93      String getTestMethod();
94  
95      void setTest( String test );
96  
97      List getIncludes();
98  
99      void setIncludes( List includes );
100 
101     List getExcludes();
102 
103     void setExcludes( List excludes );
104 
105     ArtifactRepository getLocalRepository();
106 
107     void setLocalRepository( ArtifactRepository localRepository );
108 
109     Properties getSystemProperties();
110 
111     void setSystemProperties( Properties systemProperties );
112 
113     Map getSystemPropertyVariables();
114 
115     void setSystemPropertyVariables( Map systemPropertyVariables );
116 
117     File getSystemPropertiesFile();
118 
119     void setSystemPropertiesFile( File systemPropertiesFile );
120 
121     Properties getProperties();
122 
123     void setProperties( Properties properties );
124 
125     Map getPluginArtifactMap();
126 
127     void setPluginArtifactMap( Map pluginArtifactMap );
128 
129     Map getProjectArtifactMap();
130 
131     void setProjectArtifactMap( Map projectArtifactMap );
132 
133     boolean isPrintSummary();
134 
135     void setPrintSummary( boolean printSummary );
136 
137     String getReportFormat();
138 
139     void setReportFormat( String reportFormat );
140 
141     String getReportNameSuffix();
142 
143     void setReportNameSuffix( String reportNameSuffix );
144 
145     boolean isUseFile();
146 
147     void setUseFile( boolean useFile );
148 
149     boolean isRedirectTestOutputToFile();
150 
151     void setRedirectTestOutputToFile( boolean redirectTestOutputToFile );
152 
153     String getForkMode();
154 
155     void setForkMode( String forkMode );
156 
157     String getJvm();
158 
159     void setJvm( String jvm );
160 
161     String getArgLine();
162 
163     void setArgLine( String argLine );
164 
165     String getDebugForkedProcess();
166 
167     void setDebugForkedProcess( String debugForkedProcess );
168 
169     int getForkedProcessTimeoutInSeconds();
170 
171     void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds );
172 
173     Map getEnvironmentVariables();
174 
175     void setEnvironmentVariables( Map environmentVariables );
176 
177     File getWorkingDirectory();
178 
179     void setWorkingDirectory( File workingDirectory );
180 
181     boolean isChildDelegation();
182 
183     void setChildDelegation( boolean childDelegation );
184 
185     String getGroups();
186 
187     void setGroups( String groups );
188 
189     String getExcludedGroups();
190 
191     void setExcludedGroups( String excludedGroups );
192 
193     File[] getSuiteXmlFiles();
194 
195     void setSuiteXmlFiles( File[] suiteXmlFiles );
196 
197     String getJunitArtifactName();
198 
199     void setJunitArtifactName( String junitArtifactName );
200 
201     String getTestNGArtifactName();
202 
203     void setTestNGArtifactName( String testNGArtifactName );
204 
205     int getThreadCount();
206 
207     void setThreadCount( int threadCount );
208 
209     boolean getPerCoreThreadCount();
210 
211     void setPerCoreThreadCount( boolean perCoreThreadCount );
212 
213     boolean getUseUnlimitedThreads();
214 
215     void setUseUnlimitedThreads( boolean useUnlimitedThreads );
216 
217     String getParallel();
218 
219     void setParallel( String parallel );
220 
221     boolean isTrimStackTrace();
222 
223     void setTrimStackTrace( boolean trimStackTrace );
224 
225     ArtifactResolver getArtifactResolver();
226 
227     void setArtifactResolver( ArtifactResolver artifactResolver );
228 
229     ArtifactFactory getArtifactFactory();
230 
231     void setArtifactFactory( ArtifactFactory artifactFactory );
232 
233     List getRemoteRepositories();
234 
235     void setRemoteRepositories( List remoteRepositories );
236 
237     ArtifactMetadataSource getMetadataSource();
238 
239     void setMetadataSource( ArtifactMetadataSource metadataSource );
240 
241     Properties getOriginalSystemProperties();
242 
243     void setOriginalSystemProperties( Properties originalSystemProperties );
244 
245     Properties getInternalSystemProperties();
246 
247     void setInternalSystemProperties( Properties internalSystemProperties );
248 
249     boolean isDisableXmlReport();
250 
251     void setDisableXmlReport( boolean disableXmlReport );
252 
253     boolean isUseSystemClassLoader();
254 
255     void setUseSystemClassLoader( boolean useSystemClassLoader );
256 
257     boolean isUseManifestOnlyJar();
258 
259     void setUseManifestOnlyJar( boolean useManifestOnlyJar );
260 
261     boolean isEnableAssertions();
262 
263     void setEnableAssertions( boolean enableAssertions );
264 
265     MavenSession getSession();
266 
267     void setSession( MavenSession session );
268 
269     String getObjectFactory();
270 
271     void setObjectFactory( String objectFactory );
272 
273     ToolchainManager getToolchainManager();
274 
275     void setToolchainManager( ToolchainManager toolchainManager );
276 
277     Boolean getFailIfNoTests();
278 
279     void setFailIfNoTests( Boolean failIfNoTests );
280 
281     boolean isMavenParallel();
282 
283     void setRunOrder( String runOrder );
284 
285     String getRunOrder();
286 
287 }