0
我有一個針對3個版本的依賴關係構建的項目。最古老的版本有很多不兼容的變化,這促使我排除使用它們唯一的包:Maven編譯插件包排除不起作用
<profiles>
<profile>
<id>spark-1.3.1</id>
<properties>
<spark.version>1.3.1</spark.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/tribbloids/spookystuff/pipeline/**</exclude>
</excludes>
<testExcludes>
<testExclude>**/tribbloids/spookystuff/pipeline/**</testExclude>
</testExcludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
然而,當我執行任何的Maven命令-Pspark-1.3.1編譯參數後,我仍然收到錯誤在排除包中的所有文件階信息:
[INFO] Compiling 54 Scala sources and 9 Java sources to /home/peng/git/spookystuff/core/target/scala/classes...
[ERROR] /home/peng/git/spookystuff/core/src/main/scala/com/tribbloids/spookystuff/pipeline/GoogleSearchTransformer.scala:28: not found: value setDefault
[ERROR] setDefault(Pages -> 0, PageCol -> null, IndexCol -> null)
[ERROR] ^
[ERROR] /home/peng/git/spookystuff/core/src/main/scala/com/tribbloids/spookystuff/pipeline/GoogleSearchTransformer.scala:37: not found: value getOrDefault
[ERROR] .wgetExplore(S"div#foot a:contains(Next)", maxDepth = getOrDefault(Pages), depthKey = $(PageCol), optimizer = Narrow)
[ERROR] ^
[ERROR] /home/peng/git/spookystuff/core/src/main/scala/com/tribbloids/spookystuff/pipeline/TransformerLike.scala:19: value defaultCopy is not a member of com.tribbloids.spookystuff.pipeline.TransformerLike
[ERROR] def copy(extra: ParamMap): TransformerLike = this.defaultCopy(extra)
[ERROR] ^
[ERROR] /home/peng/git/spookystuff/core/src/main/scala/com/tribbloids/spookystuff/pipeline/TransformerLike.scala:26: value defaultCopy is not a member of com.tribbloids.spookystuff.pipeline.SpookyTransformer
[ERROR] override def copy(extra: ParamMap): SpookyTransformer = this.defaultCopy(extra)
[ERROR] ^
[ERROR] /home/peng/git/spookystuff/core/src/main/scala/com/tribbloids/spookystuff/pipeline/TransformerLike.scala:31: not found: value getOrDefault
[ERROR] val colName = Option(getOrDefault(col))
這是什麼問題的原因以及如何解決它?
可能相關:http://stackoverflow.com/q/25323258/1743880 – Tunaki
我檢查了他們的帖子,它似乎不適用於我的情況:我排除的軟件包不用於任何其他地方,如果我註釋掉所有文件中的程序仍然可以編譯 – tribbloid