Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
5783236a
Commit
5783236a
authored
12 years ago
by
Reynold Xin
Browse files
Options
Downloads
Patches
Plain Diff
Added a new command "pl" in sbt to publish to both Maven and Ivy.
parent
2314132d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
project/SparkBuild.scala
+17
-4
17 additions, 4 deletions
project/SparkBuild.scala
with
17 additions
and
4 deletions
project/SparkBuild.scala
+
17
−
4
View file @
5783236a
import
sbt._
import
sbt.Classpaths.publishTask
import
Keys._
import
sbtassembly.Plugin._
import
AssemblyKeys._
...
...
@@ -19,6 +20,10 @@ object SparkBuild extends Build {
lazy
val
bagel
=
Project
(
"bagel"
,
file
(
"bagel"
),
settings
=
bagelSettings
)
dependsOn
(
core
)
// A configuration to set an alternative publishLocalConfiguration
lazy
val
MavenCompile
=
config
(
"m2r"
)
extend
(
Compile
)
lazy
val
publishLocalBoth
=
TaskKey
[
Unit
](
"pl"
,
"publish local for m2 and ivy"
)
def
sharedSettings
=
Defaults
.
defaultSettings
++
Seq
(
organization
:=
"org.spark-project"
,
version
:=
"0.6.0-SNAPSHOT"
,
...
...
@@ -38,7 +43,15 @@ object SparkBuild extends Build {
parallelExecution
:=
false
,
/* Workaround for issue #206 (fixed after SBT 0.11.0) */
watchTransitiveSources
<<=
Defaults
.
inDependencies
[
Task
[
Seq
[
File
]]](
watchSources
.
task
,
const
(
std
.
TaskExtra
.
constant
(
Nil
)),
aggregate
=
true
,
includeRoot
=
true
)
apply
{
_
.
join
.
map
(
_
.
flatten
)
}
const
(
std
.
TaskExtra
.
constant
(
Nil
)),
aggregate
=
true
,
includeRoot
=
true
)
apply
{
_
.
join
.
map
(
_
.
flatten
)
},
otherResolvers
:=
Seq
(
Resolver
.
file
(
"dotM2"
,
file
(
Path
.
userHome
+
"/.m2/repository"
))),
publishLocalConfiguration
in
MavenCompile
<<=
(
packagedArtifacts
,
deliverLocal
,
ivyLoggingLevel
)
map
{
(
arts
,
_
,
level
)
=>
new
PublishConfiguration
(
None
,
"dotM2"
,
arts
,
Seq
(),
level
)
},
publishMavenStyle
in
MavenCompile
:=
true
,
publishLocal
in
MavenCompile
<<=
publishTask
(
publishLocalConfiguration
in
MavenCompile
,
deliverLocal
),
publishLocalBoth
<<=
Seq
(
publishLocal
in
MavenCompile
,
publishLocal
).
dependOn
)
val
slf4jVersion
=
"1.6.1"
...
...
@@ -83,11 +96,11 @@ object SparkBuild extends Build {
def
bagelSettings
=
sharedSettings
++
Seq
(
name
:=
"spark-bagel"
)
def
extraAssemblySettings
()
=
Seq
(
test
in
assembly
:=
{})
++
Seq
(
mergeStrategy
in
assembly
:=
{
case
m
if
m
.
toLowerCase
.
endsWith
(
"manifest.mf"
)
=>
MergeStrategy
.
discard
mergeStrategy
in
assembly
:=
{
case
m
if
m
.
toLowerCase
.
endsWith
(
"manifest.mf"
)
=>
MergeStrategy
.
discard
case
"reference.conf"
=>
MergeStrategy
.
concat
case
_
=>
MergeStrategy
.
first
}
)
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment