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 org.apache.maven.artifact.factory.ArtifactFactory;
23  import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
24  import org.apache.maven.artifact.repository.ArtifactRepository;
25  import org.apache.maven.artifact.resolver.ArtifactResolver;
26  import org.apache.maven.execution.MavenSession;
27  import org.apache.maven.project.MavenProject;
28  import org.apache.maven.toolchain.ToolchainManager;
29  
30  import java.io.File;
31  import java.util.List;
32  import java.util.Map;
33  import java.util.Properties;
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     Properties getProperties();
118 
119     void setProperties( Properties properties );
120 
121     Map getPluginArtifactMap();
122 
123     void setPluginArtifactMap( Map pluginArtifactMap );
124 
125     Map getProjectArtifactMap();
126 
127     void setProjectArtifactMap( Map projectArtifactMap );
128 
129     boolean isPrintSummary();
130 
131     void setPrintSummary( boolean printSummary );
132 
133     String getReportFormat();
134 
135     void setReportFormat( String reportFormat );
136 
137     boolean isUseFile();
138 
139     void setUseFile( boolean useFile );
140 
141     boolean isRedirectTestOutputToFile();
142 
143     void setRedirectTestOutputToFile( boolean redirectTestOutputToFile );
144 
145     String getForkMode();
146 
147     void setForkMode( String forkMode );
148 
149     String getJvm();
150 
151     void setJvm( String jvm );
152 
153     String getArgLine();
154 
155     void setArgLine( String argLine );
156 
157     String getDebugForkedProcess();
158 
159     void setDebugForkedProcess( String debugForkedProcess );
160 
161     int getForkedProcessTimeoutInSeconds();
162 
163     void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds );
164 
165     Map getEnvironmentVariables();
166 
167     void setEnvironmentVariables( Map environmentVariables );
168 
169     File getWorkingDirectory();
170 
171     void setWorkingDirectory( File workingDirectory );
172 
173     boolean isChildDelegation();
174 
175     void setChildDelegation( boolean childDelegation );
176 
177     String getGroups();
178 
179     void setGroups( String groups );
180 
181     String getExcludedGroups();
182 
183     void setExcludedGroups( String excludedGroups );
184 
185     File[] getSuiteXmlFiles();
186 
187     void setSuiteXmlFiles( File[] suiteXmlFiles );
188 
189     String getJunitArtifactName();
190 
191     void setJunitArtifactName( String junitArtifactName );
192 
193     String getTestNGArtifactName();
194 
195     void setTestNGArtifactName( String testNGArtifactName );
196 
197     int getThreadCount();
198 
199     void setThreadCount( int threadCount );
200 
201     boolean getPerCoreThreadCount();
202 
203     void setPerCoreThreadCount( boolean perCoreThreadCount );
204 
205     boolean getUseUnlimitedThreads();
206 
207     void setUseUnlimitedThreads( boolean useUnlimitedThreads );
208 
209     String getParallel();
210 
211     void setParallel( String parallel );
212 
213     boolean isTrimStackTrace();
214 
215     void setTrimStackTrace( boolean trimStackTrace );
216 
217     ArtifactResolver getArtifactResolver();
218 
219     void setArtifactResolver( ArtifactResolver artifactResolver );
220 
221     ArtifactFactory getArtifactFactory();
222 
223     void setArtifactFactory( ArtifactFactory artifactFactory );
224 
225     List getRemoteRepositories();
226 
227     void setRemoteRepositories( List remoteRepositories );
228 
229     ArtifactMetadataSource getMetadataSource();
230 
231     void setMetadataSource( ArtifactMetadataSource metadataSource );
232 
233     Properties getOriginalSystemProperties();
234 
235     void setOriginalSystemProperties( Properties originalSystemProperties );
236 
237     Properties getInternalSystemProperties();
238 
239     void setInternalSystemProperties( Properties internalSystemProperties );
240 
241     boolean isDisableXmlReport();
242 
243     void setDisableXmlReport( boolean disableXmlReport );
244 
245     boolean isUseSystemClassLoader();
246 
247     void setUseSystemClassLoader( boolean useSystemClassLoader );
248 
249     boolean isUseManifestOnlyJar();
250 
251     void setUseManifestOnlyJar( boolean useManifestOnlyJar );
252 
253     boolean isEnableAssertions();
254 
255     void setEnableAssertions( boolean enableAssertions );
256 
257     MavenSession getSession();
258 
259     void setSession( MavenSession session );
260 
261     String getObjectFactory();
262 
263     void setObjectFactory( String objectFactory );
264 
265     ToolchainManager getToolchainManager();
266 
267     void setToolchainManager( ToolchainManager toolchainManager );
268 
269     Boolean getFailIfNoTests();
270 
271     void setFailIfNoTests( Boolean failIfNoTests );
272 
273     boolean isMavenParallel();
274 
275     void setRunOrder( String runOrder );
276 
277     String getRunOrder();
278 
279 }