Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Some minor code/comment/javadoc fixes #127

Merged
merged 1 commit into from

3 participants

@liry17

No description provided.

@davidB davidB merged commit 4ca551a into davidB:master
@davidB
Owner

Thanks

@liry17

No problem ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 17, 2013
  1. @liry
This page is out of date. Refresh to see the latest.
View
7 .gitignore
@@ -40,6 +40,7 @@ interpolated-*.xml
#SHITTY output not in target directory
build.log
-/maven-scala-plugin.iml
-/maven-scala-plugin.ipr
-/maven-scala-plugin.iws
+# IDEA conf files
+*.iml
+*.ipr
+*.iws
View
1  README.md
@@ -25,6 +25,7 @@ Currently, you need Maven 3.x to build the plugin, create the site, and run `int
* `mvn package` : generate jar
* `mvn site` : generate the plugin website
* `mvn integration-test` : `mvn package` + run all integration test
+ * note: to run _test\_scalaHome_: you have to set `scala.home` property in `src/it/test_scalaHome/pom.xml` to correspond to your environment
* `mvn invoker:run -Dinvoker.test=test1` : run integration test 'test1' useful for tuning/debug
* `mvn install` : `mvn integration-test` + publish on local maven repository
* `mvn install -Dmaven.test.skip=true` : `mvn install` without run of unit test and run of integration test
View
21 src/main/java/scala_maven/ScalaCompilerSupport.java
@@ -1,10 +1,5 @@
package scala_maven;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.List;
import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
@@ -13,6 +8,12 @@
import scala_maven_executions.JavaMainCaller;
import scala_maven_executions.MainHelper;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
/**
* Abstract parent of all Scala Mojo who run compilation
*/
@@ -27,17 +28,11 @@
*/
private boolean compileErrors;
-
- /**
- * Pause duration between to scan to detect changed file to compile.
- * Used only if compileInLoop or testCompileInLoop is true.
- */
- protected long loopSleep = 2500;
-
/**
* Recompile mode to use when sources were previously compiled and there is at least one change:
* "modified-only" => only modified sources are recompiled (pre 2.13 behavior), "all" => all sources are recompiled,
* "incremental" => incrementally recompile modified sources and other affected sources.
+ *
* @parameter expression="${recompileMode}" default-value="all"
*/
protected String recompileMode = ALL;
@@ -45,7 +40,7 @@
/**
* notifyCompilation if true then print a message "path: compiling"
* for each root directory or files that will be compiled.
- * Usefull for debug, and for integration with Editor/IDE to reset markers only for compiled files.
+ * Useful for debug, and for integration with Editor/IDE to reset markers only for compiled files.
*
* @parameter expression="${notifyCompilation}" default-value="true"
*/
View
14 src/main/java/scala_maven/ScalaDocMojo.java
@@ -1,20 +1,19 @@
package scala_maven;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-import java.util.Locale;
-
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.doxia.sink.Sink;
import org.codehaus.plexus.util.StringUtils;
-
import scala_maven_executions.JavaMainCaller;
import scala_maven_executions.MainHelper;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+import java.util.Locale;
+
/**
* Produces Scala API documentation.
*
@@ -414,7 +413,6 @@ protected void aggregate(MavenProject parent) throws Exception {
* Method that sets the bottom text that will be displayed on the bottom of
* the javadocs.
*
- * @param inceptionYear the year when the project was started
* @return a String that contains the text that will be displayed at the
* bottom of the javadoc
*/
View
25 src/main/java/scala_maven/ScalaMojoSupport.java
@@ -1,14 +1,5 @@
package scala_maven;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.ArtifactUtils;
import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -21,7 +12,6 @@
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.AbstractMojo;
@@ -49,6 +39,14 @@
import scala_maven_executions.JavaMainCallerInProcess;
import scala_maven_executions.MainHelper;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
public abstract class ScalaMojoSupport extends AbstractMojo {
public static final String SCALA_GROUPID= "org.scala-lang";
@@ -197,15 +195,16 @@
*
* @parameter expression="${javacArgs}"
*/
- protected String[] javacArgs;@SuppressWarnings("unused")
+ protected String[] javacArgs;
/**
* Whether to instruct javac to generate debug symbols (when using incremental compiler)
- * @see {@link http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug}
+ * @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>
*
* @parameter expression="${javacGenerateDebugSymbols}"
* default-value="true"
*/
+ @SuppressWarnings("unused")
protected boolean javacGenerateDebugSymbols = true;
/**
@@ -278,7 +277,7 @@
/**
* Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
- * @see https://github.com/davidB/maven-scala-plugin/issues/50
+ * @see <a href="https://github.com/davidB/maven-scala-plugin/issues/50">https://github.com/davidB/maven-scala-plugin/issues/50</a>
* @parameter expression="${maven.scala.useCanonicalPath}" default-value="true"
*/
protected boolean useCanonicalPath = true;
View
10 src/main/java/scala_maven/ScalaSourceMojoSupport.java
@@ -1,5 +1,7 @@
package scala_maven;
+import scala_maven_executions.MainHelper;
+
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@@ -7,8 +9,6 @@
import java.util.List;
import java.util.Set;
-import scala_maven_executions.MainHelper;
-
/**
* @author david.bernard
*/
@@ -48,7 +48,7 @@
protected Set<String> excludes = new HashSet<String>();
/**
- * Retreives the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler
+ * Retrieves the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler
*/
abstract protected List<File> getSourceDirectories() throws Exception;
@@ -103,8 +103,8 @@ protected void initFilters() throws Exception {
sourceFiles.add(tmpAbsFile);
}
}
- //scalac is sensible to scala file order, file system can't garanty file order => unreproductible build error across platform
- // to garanty reproductible command line we order file by path (os dependend).
+ // scalac is sensitive to scala file order, file system can't guarantee file order => unreproducible build error across platforms
+ // sort files by path (OS dependent) to guarantee reproducible command line.
Collections.sort(sourceFiles);
return sourceFiles;
}
Something went wrong with that request. Please try again.