Skip to content
This repository
Browse code

Some minor code/comment/javadoc fixes

  • Loading branch information...
commit 928d599a9e836f74747e9685d4bce9947d4878e1 1 parent cd85cf9
Libor Rysavy authored March 17, 2013
7  .gitignore
@@ -40,6 +40,7 @@ interpolated-*.xml
40 40
 #SHITTY output not in target directory
41 41
 build.log
42 42
 
43  
-/maven-scala-plugin.iml
44  
-/maven-scala-plugin.ipr
45  
-/maven-scala-plugin.iws
  43
+# IDEA conf files
  44
+*.iml
  45
+*.ipr
  46
+*.iws
1  README.md
Source Rendered
@@ -25,6 +25,7 @@ Currently, you need Maven 3.x to build the plugin, create the site, and run `int
25 25
 * `mvn package` : generate jar
26 26
 * `mvn site` : generate the plugin website
27 27
 * `mvn integration-test` : `mvn package` + run all integration test
  28
+  * note: to run _test\_scalaHome_: you have to set `scala.home` property in `src/it/test_scalaHome/pom.xml` to correspond to your environment
28 29
 * `mvn invoker:run -Dinvoker.test=test1` : run integration test 'test1' useful for tuning/debug
29 30
 * `mvn install` :  `mvn integration-test` + publish on local maven repository
30 31
 * `mvn install -Dmaven.test.skip=true` : `mvn install` without run of unit test and run of integration test
21  src/main/java/scala_maven/ScalaCompilerSupport.java
... ...
@@ -1,10 +1,5 @@
1 1
 package scala_maven;
2 2
 
3  
-import java.io.File;
4  
-import java.util.ArrayList;
5  
-import java.util.HashMap;
6  
-import java.util.Map;
7  
-import java.util.List;
8 3
 import org.apache.maven.model.Plugin;
9 4
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
10 5
 import org.apache.maven.project.MavenProject;
@@ -13,6 +8,12 @@
13 8
 import scala_maven_executions.JavaMainCaller;
14 9
 import scala_maven_executions.MainHelper;
15 10
 
  11
+import java.io.File;
  12
+import java.util.ArrayList;
  13
+import java.util.HashMap;
  14
+import java.util.List;
  15
+import java.util.Map;
  16
+
16 17
 /**
17 18
  * Abstract parent of all Scala Mojo who run compilation
18 19
  */
@@ -27,17 +28,11 @@
27 28
      */
28 29
     private boolean compileErrors;
29 30
 
30  
-
31  
-    /**
32  
-     * Pause duration between to scan to detect changed file to compile.
33  
-     * Used only if compileInLoop or testCompileInLoop is true.
34  
-     */
35  
-    protected long loopSleep = 2500;
36  
-
37 31
     /**
38 32
      * Recompile mode to use when sources were previously compiled and there is at least one change:
39 33
      * "modified-only" => only modified sources are recompiled (pre 2.13 behavior), "all" => all sources are recompiled,
40 34
      * "incremental" => incrementally recompile modified sources and other affected sources.
  35
+     *
41 36
      * @parameter expression="${recompileMode}" default-value="all"
42 37
      */
43 38
     protected String recompileMode = ALL;
@@ -45,7 +40,7 @@
45 40
     /**
46 41
      * notifyCompilation if true then print a message "path: compiling"
47 42
      * for each root directory or files that will be compiled.
48  
-     * Usefull for debug, and for integration with Editor/IDE to reset markers only for compiled files.
  43
+     * Useful for debug, and for integration with Editor/IDE to reset markers only for compiled files.
49 44
      *
50 45
      * @parameter expression="${notifyCompilation}" default-value="true"
51 46
      */
14  src/main/java/scala_maven/ScalaDocMojo.java
... ...
@@ -1,20 +1,19 @@
1 1
 package scala_maven;
2 2
 
3  
-import java.io.File;
4  
-import java.util.ArrayList;
5  
-import java.util.Calendar;
6  
-import java.util.List;
7  
-import java.util.Locale;
8  
-
9 3
 import org.apache.maven.project.MavenProject;
10 4
 import org.apache.maven.reporting.MavenReport;
11 5
 import org.apache.maven.reporting.MavenReportException;
12 6
 import org.codehaus.doxia.sink.Sink;
13 7
 import org.codehaus.plexus.util.StringUtils;
14  
-
15 8
 import scala_maven_executions.JavaMainCaller;
16 9
 import scala_maven_executions.MainHelper;
17 10
 
  11
+import java.io.File;
  12
+import java.util.ArrayList;
  13
+import java.util.Calendar;
  14
+import java.util.List;
  15
+import java.util.Locale;
  16
+
18 17
 /**
19 18
  * Produces Scala API documentation.
20 19
  *
@@ -414,7 +413,6 @@ protected void aggregate(MavenProject parent) throws Exception {
414 413
      * Method that sets the bottom text that will be displayed on the bottom of
415 414
      * the javadocs.
416 415
      *
417  
-     * @param inceptionYear the year when the project was started
418 416
      * @return a String that contains the text that will be displayed at the
419 417
      *         bottom of the javadoc
420 418
      */
25  src/main/java/scala_maven/ScalaMojoSupport.java
... ...
@@ -1,14 +1,5 @@
1 1
 package scala_maven;
2 2
 
3  
-import java.io.File;
4  
-import java.util.ArrayList;
5  
-import java.util.Arrays;
6  
-import java.util.Collections;
7  
-import java.util.HashSet;
8  
-import java.util.LinkedHashSet;
9  
-import java.util.List;
10  
-import java.util.Set;
11  
-
12 3
 import org.apache.maven.artifact.Artifact;
13 4
 import org.apache.maven.artifact.ArtifactUtils;
14 5
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -21,7 +12,6 @@
21 12
 import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
22 13
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
23 14
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
24  
-import org.apache.maven.artifact.versioning.VersionRange;
25 15
 import org.apache.maven.execution.MavenSession;
26 16
 import org.apache.maven.model.Dependency;
27 17
 import org.apache.maven.plugin.AbstractMojo;
@@ -49,6 +39,14 @@
49 39
 import scala_maven_executions.JavaMainCallerInProcess;
50 40
 import scala_maven_executions.MainHelper;
51 41
 
  42
+import java.io.File;
  43
+import java.util.ArrayList;
  44
+import java.util.Collections;
  45
+import java.util.HashSet;
  46
+import java.util.LinkedHashSet;
  47
+import java.util.List;
  48
+import java.util.Set;
  49
+
52 50
 public abstract class ScalaMojoSupport extends AbstractMojo {
53 51
 
54 52
     public static final String SCALA_GROUPID= "org.scala-lang";
@@ -197,15 +195,16 @@
197 195
      *
198 196
      * @parameter expression="${javacArgs}"
199 197
      */
200  
-    protected String[] javacArgs;@SuppressWarnings("unused") 
  198
+    protected String[] javacArgs;
201 199
 
202 200
     /**
203 201
      * Whether to instruct javac to generate debug symbols (when using incremental compiler)
204  
-     * @see {@link http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug}
  202
+     * @see <a href="http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug">://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug</a>
205 203
      *
206 204
      * @parameter expression="${javacGenerateDebugSymbols}"
207 205
      *            default-value="true"
208 206
      */
  207
+    @SuppressWarnings("unused")
209 208
     protected boolean javacGenerateDebugSymbols = true;
210 209
 
211 210
     /**
@@ -278,7 +277,7 @@
278 277
 
279 278
     /**
280 279
      * Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
281  
-     * @see https://github.com/davidB/maven-scala-plugin/issues/50
  280
+     * @see <a href="https://github.com/davidB/maven-scala-plugin/issues/50">https://github.com/davidB/maven-scala-plugin/issues/50</a>
282 281
      * @parameter expression="${maven.scala.useCanonicalPath}" default-value="true"
283 282
      */
284 283
     protected boolean useCanonicalPath = true;
10  src/main/java/scala_maven/ScalaSourceMojoSupport.java
... ...
@@ -1,5 +1,7 @@
1 1
 package scala_maven;
2 2
 
  3
+import scala_maven_executions.MainHelper;
  4
+
3 5
 import java.io.File;
4 6
 import java.util.ArrayList;
5 7
 import java.util.Collections;
@@ -7,8 +9,6 @@
7 9
 import java.util.List;
8 10
 import java.util.Set;
9 11
 
10  
-import scala_maven_executions.MainHelper;
11  
-
12 12
 /**
13 13
  * @author david.bernard
14 14
  */
@@ -48,7 +48,7 @@
48 48
     protected Set<String> excludes = new HashSet<String>();
49 49
 
50 50
     /**
51  
-     * Retreives the list of *all* root source directories.  We need to pass all .java and .scala files into the scala compiler
  51
+     * Retrieves the list of *all* root source directories.  We need to pass all .java and .scala files into the scala compiler
52 52
      */
53 53
     abstract protected List<File> getSourceDirectories() throws Exception;
54 54
 
@@ -103,8 +103,8 @@ protected void initFilters() throws Exception {
103 103
                 sourceFiles.add(tmpAbsFile);
104 104
             }
105 105
         }
106  
-        //scalac is sensible to scala file order, file system can't garanty file order => unreproductible build error across platform
107  
-        // to garanty reproductible command line we order file by path (os dependend).
  106
+        // scalac is sensitive to scala file order, file system can't guarantee file order => unreproducible build error across platforms
  107
+        // sort files by path (OS dependent) to guarantee reproducible command line.
108 108
         Collections.sort(sourceFiles);
109 109
         return sourceFiles;
110 110
     }

0 notes on commit 928d599

Please sign in to comment.
Something went wrong with that request. Please try again.