Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
openmole
openmole
Commits
f99129cb
Commit
f99129cb
authored
Apr 05, 2013
by
Mark Hammons
Browse files
Reorganized the project to be much more modular.
parent
99d77a41
Changes
21
Hide whitespace changes
Inline
Side-by-side
project/Build.scala
View file @
f99129cb
import
sbt._
import
Keys._
import
projectRoot._
import
root.Web._
import
root.Application._
import
root.ThirdParties._
import
root.Defaults
import
root._
object
HelloBuild
extends
Libraries
with
Web
with
Application
with
Core
with
ThirdParties
{
lazy
val
root
=
Project
(
id
=
"root"
,
base
=
file
(
"."
))
aggregate
(
libraries
,
web
,
application
,
core
,
thirdParties
)
object
HelloBuild
extends
Defaults
{
implicit
val
dir
=
file
(
"."
)
lazy
val
root
=
Project
(
id
=
"root"
,
base
=
dir
)
aggregate
(
libraries
.
all
,
web
,
application
,
base
.
all
,
thirdParties
)
}
project/src/main/scala/projectRoot/Core.scala
deleted
100644 → 0
View file @
99d77a41
package
projectRoot
import
sbt._
import
core.
{
CorePlugin
,
CoreMisc
,
CoreCore
}
trait
Core
extends
CoreCore
with
CoreMisc
with
CorePlugin
{
lazy
val
core
=
Project
(
"core"
,
file
(
"core"
))
aggregate
(
coreMisc
,
coreCore
,
corePlugin
)
}
\ No newline at end of file
project/src/main/scala/projectRoot/core/CoreCore.scala
deleted
100644 → 0
View file @
99d77a41
package
projectRoot.core
import
sbt._
import
Keys._
trait
CoreCore
extends
CoreDefaults
with
CoreMisc
{
private
implicit
val
dir
=
file
(
"core/core"
)
lazy
val
coreCore
=
Project
(
"core-core"
,
dir
)
aggregate
(
coreModel
,
coreSerializer
,
coreImpl
,
coreBatch
)
lazy
val
coreModel
=
OsgiProject
(
"org.openmole.core.model"
,
openmoleScope
=
Some
(
"provided"
))
dependsOn
(
coreMiscEventDispatcher
,
coreMiscException
,
coreMiscTools
,
coreMiscUpdater
)
lazy
val
coreSerializer
=
OsgiProject
(
"org.openmole.core.serializer"
,
openmoleScope
=
Some
(
"provided"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreModel
,
coreMiscWorkspace
,
xstream
,
coreMiscPluginManager
,
coreMiscHashService
,
coreMiscFileService
,
coreMiscTools
)
lazy
val
coreImpl
=
OsgiProject
(
"org.openmole.core.implementation"
,
openmoleScope
=
Some
(
"provided"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreModel
,
coreMiscWorkspace
,
robustIt
,
coreMiscException
,
coreMiscWorkspace
,
coreMiscEventDispatcher
,
coreSerializer
,
coreMiscPluginManager
)
lazy
val
coreBatch
=
OsgiProject
(
"org.openmole.core.batch"
,
openmoleScope
=
Some
(
"provided"
),
imports
=
Seq
(
"*"
))
dependsOn
(
coreImpl
,
coreMiscWorkspace
,
coreMiscTools
,
coreMiscEventDispatcher
,
coreMiscReplication
,
db4o
,
coreMiscUpdater
,
coreSerializer
,
coreMiscFileService
,
coreMiscHashService
,
coreMiscPluginManager
,
iceTar
,
gridscale
,
guava
)
//TODO: Finish adding gridscale and guava, then add to the aggregation
}
\ No newline at end of file
project/src/main/scala/projectRoot/core/CoreDefaults.scala
deleted
100644 → 0
View file @
99d77a41
package
projectRoot.core
import
projectRoot.Defaults
import
sbt._
import
Keys._
trait
CoreDefaults
extends
Defaults
{
private
[
core
]
implicit
val
org
=
organization
:=
"org.openmole.core"
}
\ No newline at end of file
project/src/main/scala/projectRoot/core/CoreMisc.scala
deleted
100644 → 0
View file @
99d77a41
package
projectRoot.core
import
projectRoot.
{
ThirdParties
,
Libraries
}
import
sbt._
import
Keys._
trait
CoreMisc
extends
CoreDefaults
with
Libraries
with
ThirdParties
{
private
implicit
val
dir
=
file
(
"core/misc"
)
lazy
val
coreMisc
=
Project
(
"core-misc"
,
dir
)
aggregate
(
coreMiscException
,
coreMiscMacros
,
coreMiscOsgi
,
coreMiscTools
,
coreMiscEventDispatcher
,
coreMiscFileDeleter
,
coreMiscFileCache
,
coreMiscFileService
,
coreMiscPluginManager
,
coreMiscReplication
,
coreMiscUpdater
,
coreMiscWorkspace
,
coreMiscHashService
)
lazy
val
coreMiscEventDispatcher
=
OsgiProject
(
"org.openmole.misc.eventdispatcher"
)
dependsOn
(
coreMiscTools
)
lazy
val
coreMiscException
=
OsgiProject
(
"org.openmole.misc.exception"
)
lazy
val
coreMiscHashService
=
OsgiProject
(
"org.openmole.misc.hashservice"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscException
,
gnuCrypto
,
coreMiscTools
,
apacheCommonsPool
)
lazy
val
coreMiscFileCache
=
OsgiProject
(
"org.openmole.misc.filecache"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscFileDeleter
)
lazy
val
coreMiscFileDeleter
=
OsgiProject
(
"org.openmole.misc.filedeleter"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscTools
)
lazy
val
coreMiscFileService
=
OsgiProject
(
"org.openmole.misc.fileservice"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscTools
,
coreMiscHashService
,
coreMiscFileCache
,
coreMiscUpdater
,
coreMiscWorkspace
)
lazy
val
coreMiscMacros
=
OsgiProject
(
"org.openmole.misc.macros"
)
dependsOn
(
scalaLang
)
lazy
val
coreMiscOsgi
=
OsgiProject
(
"org.openmole.misc.osgi"
,
buddyPolicy
=
Some
(
"global"
),
bundleActivator
=
Some
(
"org.openmole.misc.osgi.Activator"
))
dependsOn
(
coreMiscException
,
scalaLang
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
lazy
val
coreMiscTools
=
OsgiProject
(
"org.openmole.misc.tools"
,
buddyPolicy
=
Some
(
"global"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscException
,
xstream
,
icu4j
,
xstream
,
icu4j
,
groovy
,
objenesis
,
apacheCommonsExec
,
apacheCommonsPool
,
apacheCommonsMath
,
coreMiscOsgi
,
jodaTime
,
iceTar
)
lazy
val
coreMiscPluginManager
=
OsgiProject
(
"org.openmole.misc.pluginmanager"
,
bundleActivator
=
Some
(
"org.openmole.misc.pluginmanager.internal.Activator"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscException
,
coreMiscTools
,
coreMiscOsgi
)
lazy
val
coreMiscReplication
=
OsgiProject
(
"org.openmole.misc.replication"
)
dependsOn
(
db4o
,
xstream
)
lazy
val
coreMiscUpdater
=
OsgiProject
(
"org.openmole.misc.updater"
)
dependsOn
(
coreMiscException
,
coreMiscTools
,
coreMiscWorkspace
)
lazy
val
coreMiscWorkspace
=
OsgiProject
(
"org.openmole.misc.workspace"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
coreMiscException
,
coreMiscEventDispatcher
,
coreMiscTools
,
coreMiscReplication
,
jasypt
,
xstream
,
apacheCommonsConfig
)
}
\ No newline at end of file
project/src/main/scala/projectRoot/core/CorePlugin.scala
deleted
100644 → 0
View file @
99d77a41
package
projectRoot.core
import
sbt._
trait
CorePlugin
extends
CoreDefaults
with
CoreMisc
with
CoreCore
{
private
implicit
val
dir
=
file
(
"core/plugins"
)
lazy
val
corePlugin
=
Project
(
"core-plugin"
,
dir
)
aggregate
(
corePluginExternal
,
corePluginNetLogo
,
corePluginNetLogo4
,
corePluginNetLogo5
)
lazy
val
corePluginExternal
=
OsgiProject
(
"org.openmole.plugin.task.external"
)
dependsOn
(
coreMiscException
,
coreImpl
,
coreMiscWorkspace
)
lazy
val
corePluginNetLogo
=
OsgiProject
(
"org.openmole.plugin.task.netlogo"
)
dependsOn
(
coreImpl
,
coreMiscException
,
coreMiscWorkspace
,
corePluginExternal
)
//the imports disambiguates netlogo5 from netlogo4
lazy
val
corePluginNetLogo4
=
OsgiProject
(
"org.openmole.plugin.task.netlogo4"
,
imports
=
Seq
(
"org.nlogo.*;version=\"[4,5)\""
,
"*;resolution:=optional"
))
dependsOn
(
corePluginNetLogo
,
netlogo4_noscala
)
lazy
val
corePluginNetLogo5
=
OsgiProject
(
"org.openmole.plugin.task.netlogo5"
)
dependsOn
(
corePluginNetLogo
,
netlogo5_noscala
)
}
project/src/main/scala/
projectR
oot/Application.scala
→
project/src/main/scala/
r
oot/Application.scala
View file @
f99129cb
package
projectRoot
package
root
import
Web._
import
libraries._
import
base.
{
misc
,
core
}
import
sbt._
import
Keys._
trai
t
Application
extends
Web
with
Librarie
s
{
private
[
Application
]
implicit
val
org
=
organization
:=
"org.openmole.ui"
private
implicit
val
dir
=
file
(
"application"
)
objec
t
Application
extends
Default
s
{
override
lazy
val
org
=
organization
:=
"org.openmole.ui"
implicit
val
dir
=
file
(
"application"
)
lazy
val
application
=
Project
(
"application"
,
file
(
"application"
))
aggregate
(
plugins
,
openmoleui
,
openmolePlugins
,
openmoleGuiPlugins
,
openmoleResources
,
openMoleDB
)
...
...
@@ -118,8 +122,8 @@ trait Application extends Web with Libraries {
}
lazy
val
openmoleui
=
OsgiProject
(
"org.openmole.ui"
,
singleton
=
true
)
settings
(
pluginDependencies
)
dependsOn
(
webCore
,
coreM
isc
W
orkspace
,
coreM
isc
R
eplication
,
coreM
isc
E
xception
,
coreM
isc
T
ools
,
coreM
isc
E
ventDispatcher
,
coreM
isc
P
luginManager
,
jodaTime
,
scalaLang
,
jasypt
,
apache
CommonsC
onfig
,
objenesis
,
core
I
mpl
,
robustIt
)
(
webCore
,
base
.
m
isc
.
w
orkspace
,
base
.
m
isc
.
r
eplication
,
base
.
m
isc
.
e
xception
,
base
.
m
isc
.
t
ools
,
base
.
m
isc
.
e
ventDispatcher
,
base
.
m
isc
.
p
luginManager
,
jodaTime
,
scalaLang
,
jasypt
,
apache
.
c
onfig
,
objenesis
,
base
.
core
.
i
mpl
ementation
,
robustIt
)
lazy
val
plugins
=
AssemblyProject
(
"package"
,
"assembly/plugins"
,
Map
(
"""org\.eclipse\.equinox\.launcher.*\.jar"""
.
r
->
{
s
=>
"org.eclipse.equinox.launcher.jar"
},
...
...
project/src/main/scala/root/Base.scala
0 → 100644
View file @
f99129cb
package
root
import
sbt._
package
object
base
extends
Defaults
{
lazy
val
dir
=
file
(
"core"
)
lazy
val
all
=
Project
(
"core"
,
dir
)
aggregate
(
misc
.
all
,
core
.
all
,
plugin
.
all
)
}
\ No newline at end of file
project/src/main/scala/
projectR
oot/Defaults.scala
→
project/src/main/scala/
r
oot/Defaults.scala
View file @
f99129cb
package
projectR
oot
package
r
oot
import
com.typesafe.sbt.osgi.
{
OsgiKeys
,
SbtOsgi
}
...
...
@@ -7,6 +7,7 @@ import Keys._
import
util.matching.Regex
/**
* Created with IntelliJ IDEA.
* User: luft
...
...
@@ -15,6 +16,10 @@ import util.matching.Regex
* To change this template use File | Settings | File Templates.
*/
trait
Defaults
extends
Build
{
def
dir
:
File
lazy
val
org
=
organization
:=
"org.openmole.core"
val
eclipseBuddyPolicy
=
SettingKey
[
Option
[
String
]](
"OSGi.eclipseBuddyPolicy"
,
"The eclipse buddy policy thing."
)
lazy
val
outDir
=
SettingKey
[
String
](
"outDir"
,
"A setting to control where copyDepTask outputs it's dependencies"
)
...
...
@@ -46,20 +51,6 @@ trait Defaults extends Build {
}
}
def
gcTask
=
{
System
.
gc
();
System
.
gc
();
System
.
gc
()}
def
copyDepTask
(
updateReport
:
UpdateReport
,
version
:
String
,
out
:
File
,
scalaVer
:
String
,
subDir
:
String
,
depMap
:
Map
[
Regex
,
String
=>
String
],
depFilter
:
DependencyFilter
)
=
{
//TODO use this style for other tasks
updateReport
matching
depFilter
map
{
f
=>
depMap
.
keys
.
find
(
_
.
findFirstIn
(
f
.
getName
).
isDefined
).
map
(
depMap
(
_
)).
getOrElse
{
a
:
String
=>
a
}
->
f
}
foreach
{
case
(
lambda
,
srcPath
)
=>
val
destPath
=
out
/
subDir
/
lambda
(
srcPath
.
getName
)
IO
.
copyFile
(
srcPath
,
destPath
,
preserveLastModified
=
true
)
}
}
override
def
settings
=
super
.
settings
++
Seq
(
version
:=
"0.8.0-SNAPSHOT"
,
organization
:=
"org.openmole"
,
...
...
@@ -75,6 +66,18 @@ trait Defaults extends Build {
osgiVersion
:=
"3.8.2.v20130124-134944"
)
def
gcTask
=
{
System
.
gc
();
System
.
gc
();
System
.
gc
()}
def
copyDepTask
(
updateReport
:
UpdateReport
,
version
:
String
,
out
:
File
,
scalaVer
:
String
,
subDir
:
String
,
depMap
:
Map
[
Regex
,
String
=>
String
],
depFilter
:
DependencyFilter
)
=
{
//TODO use this style for other tasks
updateReport
matching
depFilter
map
{
f
=>
depMap
.
keys
.
find
(
_
.
findFirstIn
(
f
.
getName
).
isDefined
).
map
(
depMap
(
_
)).
getOrElse
{
a
:
String
=>
a
}
->
f
}
foreach
{
case
(
lambda
,
srcPath
)
=>
val
destPath
=
out
/
subDir
/
lambda
(
srcPath
.
getName
)
IO
.
copyFile
(
srcPath
,
destPath
,
preserveLastModified
=
true
)
}
}
def
OsgiProject
(
artifactId
:
String
,
pathFromDir
:
String
=
""
,
...
...
@@ -85,9 +88,7 @@ trait Defaults extends Build {
bundleActivator
:
Option
[
String
]
=
None
,
dynamicImports
:
Seq
[
String
]
=
Seq
(),
imports
:
Seq
[
String
]
=
Seq
(
"*;resolution:=optional"
),
openmoleScope
:
Option
[
String
]
=
None
)
(
implicit
dir
:
File
,
org
:
Setting
[
String
]
=
organization
:=
"org.openmole"
)
=
{
openmoleScope
:
Option
[
String
]
=
None
)
=
{
val
base
=
dir
/
(
if
(
pathFromDir
==
""
)
artifactId
else
pathFromDir
)
val
exportedPackages
=
if
(
exports
.
isEmpty
)
Seq
(
artifactId
+
".*"
)
else
exports
...
...
@@ -119,8 +120,7 @@ trait Defaults extends Build {
def
AssemblyProject
(
base
:
String
,
outputDir
:
String
=
"lib"
,
depNameMap
:
Map
[
Regex
,
String
=>
String
]
=
Map
.
empty
[
Regex
,
String
=>
String
])
(
implicit
dir
:
File
)
=
{
depNameMap
:
Map
[
Regex
,
String
=>
String
]
=
Map
.
empty
[
Regex
,
String
=>
String
])
=
{
val
projBase
=
dir
/
base
Project
(
base
+
"-"
+
outputDir
.
replace
(
'/'
,
'_'
),
projBase
,
settings
=
Project
.
defaultSettings
++
Seq
(
assemble
<<=
copyDependencies
tag
(
Tags
.
Disk
),
...
...
project/src/main/scala/root/Gui.scala
0 → 100644
View file @
f99129cb
package
root
import
sbt._
package
object
gui
extends
GuiDefaults
{
override
def
dir
=
super
.
dir
lazy
val
all
=
Project
(
"gui"
,
dir
)
aggregate
(
gui
.
misc
.
all
)
}
\ No newline at end of file
project/src/main/scala/
projectR
oot/ThirdParties.scala
→
project/src/main/scala/
r
oot/ThirdParties.scala
View file @
f99129cb
package
projectR
oot
package
r
oot
import
sbt._
import
Keys._
trait
ThirdParties
extends
Defaults
{
private
implicit
val
dir
=
file
(
"third-parties"
)
object
ThirdParties
extends
Defaults
{
lazy
val
dir
=
file
(
"third-parties"
)
lazy
val
thirdParties
=
Project
(
"thirdParties"
,
dir
)
aggregate
(
iceTar
,
scalaSwing
,
scopt
)
...
...
project/src/main/scala/
projectR
oot/Web.scala
→
project/src/main/scala/
r
oot/Web.scala
View file @
f99129cb
package
projectR
oot
package
r
oot
import
sbt._
import
Keys._
...
...
@@ -10,14 +10,17 @@ import Keys._
* Time: 9:06 PM
* To change this template use File | Settings | File Templates.
*/
trait
Web
extends
Libraries
with
Core
with
Defaults
{
private
implicit
val
dir
=
file
(
"web"
)
private
[
Web
]
implicit
val
org
=
organization
:=
"org.openmole.web"
object
Web
extends
Defaults
{
import
base._
import
libraries._
lazy
val
dir
=
file
(
"web"
)
override
lazy
val
org
=
organization
:=
"org.openmole.web"
lazy
val
web
=
Project
(
id
=
"web"
,
base
=
file
(
"web"
))
aggregate
(
webCore
)
lazy
val
webCore
=
OsgiProject
(
"org.openmole.web.core"
,
"core"
,
exports
=
Seq
(
"org.openmole.web"
),
buddyPolicy
=
Some
(
"global"
),
imports
=
Seq
(
"org.h2.*"
,
"*;resolution:=optional"
))
dependsOn
(
h2
,
jetty
,
slick
,
logback
,
scalatra
,
bonecp
,
scalaLang
,
core
M
odel
,
core
S
erializer
)
(
h2
,
jetty
,
slick
,
logback
,
scalatra
,
bonecp
,
scalaLang
,
core
.
m
odel
,
core
.
s
erializer
)
}
\ No newline at end of file
project/src/main/scala/root/base/BaseDefaults.scala
0 → 100644
View file @
f99129cb
package
root.base
import
root.Defaults
import
sbt._
import
Keys._
trait
BaseDefaults
extends
Defaults
{
override
lazy
val
org
=
organization
:=
"org.openmole.core"
}
\ No newline at end of file
project/src/main/scala/root/base/Core.scala
0 → 100644
View file @
f99129cb
package
root.base
import
sbt._
import
Keys._
package
object
core
extends
BaseDefaults
{
import
misc._
import
root.ThirdParties._
import
root.libraries._
implicit
val
dir
=
file
(
"core/core"
)
lazy
val
all
=
Project
(
"core-core"
,
dir
)
aggregate
(
model
,
serializer
,
implementation
,
batch
)
lazy
val
model
=
OsgiProject
(
"org.openmole.core.model"
,
openmoleScope
=
Some
(
"provided"
))
dependsOn
(
eventDispatcher
,
exception
,
misc
.
tools
,
updater
)
lazy
val
serializer
=
OsgiProject
(
"org.openmole.core.serializer"
,
openmoleScope
=
Some
(
"provided"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
model
,
workspace
,
xstream
,
pluginManager
,
hashService
,
fileService
,
misc
.
tools
)
lazy
val
implementation
=
OsgiProject
(
"org.openmole.core.implementation"
,
openmoleScope
=
Some
(
"provided"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
model
,
workspace
,
robustIt
,
exception
,
workspace
,
eventDispatcher
,
serializer
,
pluginManager
)
lazy
val
batch
=
OsgiProject
(
"org.openmole.core.batch"
,
openmoleScope
=
Some
(
"provided"
),
imports
=
Seq
(
"*"
))
dependsOn
(
implementation
,
workspace
,
misc
.
tools
,
eventDispatcher
,
replication
,
db4o
,
updater
,
serializer
,
fileService
,
hashService
,
pluginManager
,
iceTar
,
gridscale
,
guava
)
//TODO: Finish adding gridscale and guava, then add to the aggregation
}
\ No newline at end of file
project/src/main/scala/root/base/Misc.scala
0 → 100644
View file @
f99129cb
package
root.base
import
sbt._
import
Keys._
package
object
misc
extends
BaseDefaults
{
import
root.libraries._
import
root.ThirdParties._
implicit
val
dir
=
file
(
"core/misc"
)
lazy
val
all
=
Project
(
"core-misc"
,
dir
)
aggregate
(
exception
,
macros
,
osgi
,
tools
,
eventDispatcher
,
fileDeleter
,
fileCache
,
fileService
,
pluginManager
,
replication
,
updater
,
workspace
,
hashService
)
lazy
val
eventDispatcher
=
OsgiProject
(
"org.openmole.misc.eventdispatcher"
)
dependsOn
(
tools
)
lazy
val
exception
=
OsgiProject
(
"org.openmole.misc.exception"
)
lazy
val
hashService
=
OsgiProject
(
"org.openmole.misc.hashservice"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
exception
,
gnuCrypto
,
tools
,
apache
.
pool
)
lazy
val
fileCache
=
OsgiProject
(
"org.openmole.misc.filecache"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
fileDeleter
)
lazy
val
fileDeleter
=
OsgiProject
(
"org.openmole.misc.filedeleter"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
tools
)
lazy
val
fileService
=
OsgiProject
(
"org.openmole.misc.fileservice"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
tools
,
hashService
,
fileCache
,
updater
,
workspace
)
lazy
val
macros
=
OsgiProject
(
"org.openmole.misc.macros"
)
dependsOn
(
scalaLang
)
lazy
val
osgi
=
OsgiProject
(
"org.openmole.misc.osgi"
,
buddyPolicy
=
Some
(
"global"
),
bundleActivator
=
Some
(
"org.openmole.misc.osgi.Activator"
))
dependsOn
(
exception
,
scalaLang
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
lazy
val
tools
=
OsgiProject
(
"org.openmole.misc.tools"
,
buddyPolicy
=
Some
(
"global"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
exception
,
xstream
,
icu4j
,
xstream
,
icu4j
,
groovy
,
objenesis
,
apache
.
exec
,
apache
.
pool
,
apache
.
math
,
osgi
,
jodaTime
,
iceTar
)
lazy
val
pluginManager
=
OsgiProject
(
"org.openmole.misc.pluginmanager"
,
bundleActivator
=
Some
(
"org.openmole.misc.pluginmanager.internal.Activator"
))
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
exception
,
tools
,
osgi
)
lazy
val
replication
=
OsgiProject
(
"org.openmole.misc.replication"
)
dependsOn
(
db4o
,
xstream
)
lazy
val
updater
=
OsgiProject
(
"org.openmole.misc.updater"
)
dependsOn
(
exception
,
tools
,
workspace
)
lazy
val
workspace
=
OsgiProject
(
"org.openmole.misc.workspace"
)
settings
(
libraryDependencies
<+=
(
osgiVersion
)
{
oV
=>
"org.eclipse.core"
%
"org.eclipse.osgi"
%
oV
})
dependsOn
(
exception
,
eventDispatcher
,
tools
,
replication
,
jasypt
,
xstream
,
apache
.
config
)
}
\ No newline at end of file
project/src/main/scala/root/base/Plugin.scala
0 → 100644
View file @
f99129cb
package
root.base
import
sbt._
package
object
plugin
extends
BaseDefaults
{
import
core._
import
misc._
import
root.libraries._
implicit
val
dir
=
file
(
"core/plugins"
)
lazy
val
all
=
Project
(
"core-plugin"
,
dir
)
aggregate
(
external
,
netLogo
,
netLogo4
,
netLogo5
)
lazy
val
external
=
OsgiProject
(
"org.openmole.plugin.task.external"
)
dependsOn
(
exception
,
implementation
,
workspace
)
lazy
val
netLogo
=
OsgiProject
(
"org.openmole.plugin.task.netlogo"
)
dependsOn
(
implementation
,
exception
,
workspace
,
external
)
//the imports disambiguates netlogo5 from netlogo4
lazy
val
netLogo4
=
OsgiProject
(
"org.openmole.plugin.task.netlogo4"
,
imports
=
Seq
(
"org.nlogo.*;version=\"[4,5)\""
,
"*;resolution:=optional"
))
dependsOn
(
netLogo
,
netlogo4_noscala
)
lazy
val
netLogo5
=
OsgiProject
(
"org.openmole.plugin.task.netlogo5"
)
dependsOn
(
netLogo
,
netlogo5_noscala
)
}
project/src/main/scala/root/gui/GuiCore.scala
0 → 100644
View file @
f99129cb
package
root.gui
import
sbt._
import
root.base
import
root.libraries._
import
root.gui
object
GuiCore
extends
GuiDefaults
{
override
val
dir
=
super
.
dir
/
"core"
lazy
val
all
=
Project
(
"gui-core"
,
dir
)
lazy
val
model
=
OsgiProject
(
"org.openmole.ide.core.model"
)
dependsOn
(
base
.
core
.
model
,
base
.
misc
.
tools
,
xstream
,
apache
.
config
,
base
.
misc
.
exception
)
}
\ No newline at end of file
project/src/main/scala/root/gui/GuiDefaults.scala
0 → 100644
View file @
f99129cb
package
root.gui
import
root.Defaults
import
sbt._
import
Keys._
trait
GuiDefaults
extends
Defaults
{
def
dir
=
file
(
"gui"
)
override
lazy
val
org
=
organization
:=
"org.openmole.core"
}
\ No newline at end of file
project/src/main/scala/root/gui/GuiMisc.scala
0 → 100644
View file @
f99129cb
package
root.gui
import
sbt._
import
root.
{
base
,
gui
}
package
object
misc
extends
GuiDefaults
{
override
val
dir
=
super
.
dir
/
"misc"
lazy
val
all
=
Project
(
"gui-misc"
,
dir
)
aggregate
(
tools
)
lazy
val
tools
=
OsgiProject
(
"org.openmole.ide.misc.tools"
)
dependsOn
(
base
.
core
.
implementation
)
}
\ No newline at end of file
project/src/main/scala/
p
ro
jectRo
ot/
L
ibraries.scala
→
project/src/main/scala/root/
l
ibraries.scala
View file @
f99129cb
package
projectR
oot
package
r
oot
import
com.typesafe.sbt.osgi.
{
OsgiKeys
,
SbtOsgi
}
import
sbt._
import
Keys._
/**
* Created with IntelliJ IDEA.
* User: luft
...
...
@@ -12,13 +12,14 @@ import Keys._
* Time: 6:50 PM
* To change this template use File | Settings | File Templates.
*/
trait
Libraries
extends
Defaults
{
lazy
val
libraries
=
Project
(
id
=
"openmole-libraries"
,
base
=
file
(
"libraries"
))
aggregate
(
jetty
,
scalatra
,
logback
,
h2
,
bonecp
,
slick
,
slf4j
,
xstream
,
icu4j
,
groovy
,
apacheCommonsExec
,
objenesis
,
scalaLang
,
apacheCommonsPool
,
apacheCommonsMath
,
jodaTime
,
gnuCrypto
,
db4o
,
apacheCommonsConfig
,
jasypt
,
robustIt
,
netlogo4
,
netlogo5
,
netlogo4_noscala
,
netlogo5_noscala
,
gridscale
,
guava
)
package
object
libraries
extends
Defaults
{
val
dir
=
file
(
"libraries"
)
private
implicit
val
dir
=
file
(
"libraries"
)
lazy
val
all
=
Project
(
id
=
"openmole-libraries"
,
base
=
file
(
"libraries"
))
aggregate
(
jetty
,
scalatra
,
logback
,
h2
,
bonecp
,
slick
,
slf4j
,
xstream
,
icu4j
,
groovy
,
objenesis
,
scalaLang
,
apache
.
all
,
jodaTime
,
gnuCrypto
,
db4o
,
jasypt
,
robustIt
,
netlogo4
,
netlogo5
,
netlogo4_noscala
,
netlogo5_noscala
,
gridscale
,
guava
)
lazy
val
jetty
=
OsgiProject
(
"org.eclipse.jetty"
,
exports
=
Seq
(
"org.eclipse.jetty.*"
,
"javax.*"
))
settings
(
libraryDependencies
++=
Seq
(
"org.eclipse.jetty"
%
"jetty-webapp"
%
"8.1.8.v20121106"
,
...
...
@@ -54,9 +55,6 @@ trait Libraries extends Defaults {
privatePackages
=
Seq
(
"!scala.*,*"
))
settings
(
libraryDependencies
++=
Seq
(
"org.codehaus.groovy"
%
"groovy-all"
%
"2.0.5"
,
"org.fusesource.jansi"
%
"jansi"
%
"1.2.1"
))
lazy
val
apacheCommonsExec
=
OsgiProject
(
"org.apache.commons.exec"
)
settings
(
libraryDependencies
+=
"org.apache.commons"
%
"commons-exec"
%
"1.1"
)
lazy
val
objenesis
=
OsgiProject
(
"org.objenesis"
)
settings
(
libraryDependencies
+=
"org.objenesis"
%
"objenesis"
%
"1.2"
)
lazy
val
scalaLang
=
OsgiProject
(
"org.scala-lang.scala-library"
,
exports
=
Seq
(
"akka.*"
,
"com.typesafe.*"
,
"scala.*"
),
...
...
@@ -73,11 +71,6 @@ trait Libraries extends Defaults {
"com.typesafe"
%
"config"
%
"1.0.0"
)
})
lazy
val
apacheCommonsPool
=
OsgiProject
(
"org.apache.commons.pool"
)
settings
(
libraryDependencies
+=
"commons-pool"
%
"commons-pool"
%
"1.5.4"
)
lazy
val
apacheCommonsMath
=
OsgiProject
(
"org.apache.commons.math"
,
exports
=
Seq
(
"org.apache.commons.math3.*"
))
settings
(
libraryDependencies
+=
"org.apache.commons"
%
"commons-math3"
%
"3.0"
)
lazy
val
jodaTime
=
OsgiProject
(
"org.joda.time"
)
settings
(
libraryDependencies
+=
"joda-time"
%
"joda-time"
%
"1.6"
)
...
...
@@ -85,8 +78,6 @@ trait Libraries extends Defaults {
lazy
val
jasypt
=
OsgiProject
(
"org.jasypt.encryption"
,
exports
=
Seq
(
"org.jasypt.*"
))
settings
(
libraryDependencies
+=
"org.jasypt"
%
"jasypt"
%
"1.8"
)
lazy
val
apacheCommonsConfig
=
OsgiProject
(
"org.apache.commons.configuration"
,
privatePackages
=
Seq
(
"org.apache.commons.*"
))
settings
(
libraryDependencies
+=
"commons-configuration"
%
"commons-configuration"
%
"1.6"
)
lazy
val
db4o
=
OsgiProject
(
"com.db4o"
,
buddyPolicy
=
Some
(
"global"
))
settings
(
libraryDependencies
+=
"com.db4o"
%
"db4o-full-java5"
%
"8.1-SNAPSHOT"
)
...
...
Prev
1
2
Next
Write
Preview