View Javadoc
1   package org.apache.maven.plugins.javadoc.stubs;
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.plugin.testing.stubs.MavenProjectStub;
23  import org.apache.maven.model.Scm;
24  import org.apache.maven.model.Build;
25  
26  import java.util.List;
27  import java.util.ArrayList;
28  import java.io.File;
29  
30  public class OptionsUmlautEncodingMavenProjectStub
31      extends MavenProjectStub
32  {
33     private Scm scm;
34  
35      public OptionsUmlautEncodingMavenProjectStub()
36      {
37          readModel( new File( getBasedir(), "optionsumlautencoding-test-plugin-config.xml" ) );
38  
39          setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
40          setArtifactId( "optionsumlautencoding-test" );
41          setVersion( "1.0-SNAPSHOT" );
42          setName( "Maven Javadoc Plugin Options Umlaut Encoding Test" );
43          setUrl( "http://maven.apache.org" );
44          setPackaging( "jar" );
45  
46          Scm scm = new Scm();
47          scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
48          setScm( scm );
49  
50          Build build = new Build();
51          build.setFinalName( "optionsumlautencoding-test" );
52          build.setDirectory( super.getBasedir() + "/target/test/unit/optionsumlautencoding-test/target" );
53          setBuild( build );
54  
55          List<String> compileSourceRoots = new ArrayList<>();
56          compileSourceRoots.add( getBasedir().getAbsolutePath() );
57          setCompileSourceRoots( compileSourceRoots );
58      }
59  
60      /** {@inheritDoc} */
61      @Override
62      public Scm getScm()
63      {
64          return scm;
65      }
66  
67      /** {@inheritDoc} */
68      @Override
69      public void setScm( Scm scm )
70      {
71          this.scm = scm;
72      }
73  
74      /** {@inheritDoc} */
75      @Override
76      public File getBasedir()
77      {
78          return new File( super.getBasedir() + "/src/test/resources/unit/optionsumlautencoding-test" );
79      }
80  }