| import aspectj.AspectJPlugin |
| import virgobuild.Config |
| import virgobuild.VirgoToolsPlugin |
| |
| buildscript { |
| repositories { |
| mavenCentral() |
| } |
| dependencies { |
| classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0" |
| } |
| } |
| |
| plugins { |
| id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false |
| id "biz.aQute.bnd.builder" version "4.2.0" apply false |
| id "com.github.spotbugs" version "1.7.1" apply false |
| } |
| |
| apply plugin: VirgoToolsPlugin |
| |
| ext { |
| javaProjects = [ |
| project(':nano:org.eclipse.virgo.nano.authentication'), |
| project(':nano:org.eclipse.virgo.nano.shutdown'), |
| |
| project(':test:org.eclipse.virgo.test.stubs'), |
| project(':test:org.eclipse.virgo.test.launcher'), |
| project(':test:org.eclipse.virgo.test.framework'), |
| project(':test:org.eclipse.virgo.test.tools'), |
| project(':test:org.eclipse.virgo.test.test'), |
| |
| project(':kernel:org.eclipse.virgo.kernel.stubs'), |
| |
| project(':medic:org.eclipse.virgo.medic.test'), |
| project(':kernel:org.eclipse.virgo.kernel.deployer.test'), |
| project(':kernel:org.eclipse.virgo.kernel.test'), |
| |
| project(':web:org.eclipse.virgo.web.test'), |
| |
| project(':util:org.eclipse.virgo.util.integrationtest'), |
| // project(':medic:org.eclipse.virgo.medic.integrationtest'), |
| |
| project(':packaging:nano:org.eclipse.virgo.nano.smoketest'), |
| project(':packaging:kernel:org.eclipse.virgo.kernel.smoketest'), |
| project(':packaging:tomcat-server:org.eclipse.virgo.tomcat.smoketest'), |
| ] |
| |
| osgiProjects = [ |
| project(':kernel:org.eclipse.virgo.kernel.equinox.extensions'), |
| |
| project(':util:org.eclipse.virgo.util.common'), |
| project(':util:org.eclipse.virgo.util.env'), |
| project(':util:org.eclipse.virgo.util.io'), |
| project(':util:org.eclipse.virgo.util.jmx'), |
| project(':util:org.eclipse.virgo.util.math'), |
| project(':util:org.eclipse.virgo.util.osgi'), |
| project(':util:org.eclipse.virgo.util.osgi.manifest'), |
| project(':util:org.eclipse.virgo.util.parser.launcher'), |
| project(':util:org.eclipse.virgo.util.parser.manifest'), |
| |
| project(':test:org.eclipse.virgo.test.launcher'), |
| |
| project(':medic:org.eclipse.virgo.medic'), |
| project(':medic:org.eclipse.virgo.medic.core'), |
| project(':medic:org.eclipse.virgo.medic.logbackclassicfragment'), |
| project(':medic:org.eclipse.virgo.medic.logbackcorefragment'), |
| |
| project(':nano:org.eclipse.virgo.nano.core'), |
| project(':nano:org.eclipse.virgo.nano.deployer'), |
| project(':nano:org.eclipse.virgo.nano.deployer.api'), |
| project(':nano:org.eclipse.virgo.nano.deployer.hot'), |
| project(':nano:org.eclipse.virgo.nano.management'), |
| project(':nano:org.eclipse.virgo.nano.management.controller'), |
| project(':nano:org.eclipse.virgo.nano.services.concurrent'), |
| project(':nano:org.eclipse.virgo.nano.services.ds'), |
| |
| project(':repository:org.eclipse.virgo.repository'), |
| |
| // Gemini Blueprint tracker/extensions |
| project(':kernel:org.eclipse.virgo.kernel.agent.dm'), |
| project(':kernel:org.eclipse.virgo.kernel.dmfragment'), |
| project(':kernel:org.eclipse.virgo.kernel.kerneldmfragment'), |
| |
| project(':kernel:org.eclipse.virgo.kernel.artifact'), |
| project(':kernel:org.eclipse.virgo.kernel.deployer'), |
| |
| // a test bundle running inside an OSGi container |
| project(':kernel:org.eclipse.virgo.kernel.deployer.test'), |
| |
| // FIXME Equinox migration - rename to deployer.blueprint |
| project(':kernel:org.eclipse.virgo.kernel.deployer.dm'), |
| project(':kernel:org.eclipse.virgo.kernel.osgi'), |
| project(':kernel:org.eclipse.virgo.kernel.services'), |
| project(':kernel:org.eclipse.virgo.kernel.model'), |
| |
| project(':kernel:org.eclipse.virgo.kernel.userregionfactory'), |
| project(':kernel:org.eclipse.virgo.shell.command'), |
| |
| project(':kernel:org.eclipse.virgo.kernel.userregion'), |
| |
| project(':web:org.eclipse.virgo.web.core'), |
| project(':web:org.eclipse.virgo.web.dm'), |
| project(':web:org.eclipse.virgo.web.tomcat.support'), |
| |
| // web.virgo.enterprise - virgo-reloaded, only? |
| project(':web:org.eclipse.virgo.web.enterprise.appdeployer'), |
| project(':web:org.eclipse.virgo.web.enterprise.applistener'), |
| project(':web:org.eclipse.virgo.web.enterprise.catalina.fragment.webbeans'), |
| project(':web:org.eclipse.virgo.web.enterprise.javax.persistence.extension'), |
| project(':web:org.eclipse.virgo.web.enterprise.javax.persistence.provider.initializer'), |
| project(':web:org.eclipse.virgo.web.enterprise.jsf.support'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.fragment.bval'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.fragment.jotm'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.fragment.jpa'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.fragment.webbeans'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.initialiser'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.jpa.integration'), |
| project(':web:org.eclipse.virgo.web.enterprise.openejb.tomcat.factory'), |
| project(':web:org.eclipse.virgo.web.enterprise.openwebbeans.initialiser'), |
| project(':web:org.eclipse.virgo.web.enterprise.persistence.openejb.classloading.hook'), |
| project(':web:org.eclipse.virgo.web.enterprise.security'), |
| project(':web:org.eclipse.virgo.web.enterprise.security.openejb.classloading.hook'), |
| project(':web:org.eclipse.virgo.web.enterprise.security.valve'), |
| project(':web:org.eclipse.virgo.web.enterprise.services.accessor'), |
| project(':web:org.eclipse.virgo.web.servlet.adapter'), |
| project(':web:org.eclipse.virgo.web.spring.integration'), |
| project(':web:org.eclipse.virgo.web.war.deployer'), |
| |
| project(':web:org.eclipse.virgo.web.jaspic.integration'), |
| |
| project(':apps:org.eclipse.virgo.apps.splash'), |
| project(':kernel:org.eclipse.virgo.management.console'), |
| project(':kernel:org.eclipse.virgo.management.fragment'), |
| |
| project(':apps:org.eclipse.virgo.apps.repository.core'), |
| project(':apps:org.eclipse.virgo.apps.repository.web'), |
| |
| // test-apps |
| project(':web:test-apps:osgi-webapp'), |
| project(':web:test-apps:spring-capability-tests'), ] |
| |
| aspectjProjects = [ |
| // these projects contain aspects |
| project(':util:org.eclipse.virgo.util.jmx'), |
| |
| project(':nano:org.eclipse.virgo.nano.core'), |
| |
| project(':test:org.eclipse.virgo.test.stubs'), |
| project(':medic:org.eclipse.virgo.medic'), |
| |
| // these projects are woven |
| project(':nano:org.eclipse.virgo.nano.deployer.api'), |
| project(':nano:org.eclipse.virgo.nano.deployer.hot'), |
| |
| project(':repository:org.eclipse.virgo.repository'), // seems currently no pointcut matches :( |
| |
| project(':kernel:org.eclipse.virgo.kernel.dmfragment'), |
| |
| project(':kernel:org.eclipse.virgo.kernel.deployer'), |
| project(':kernel:org.eclipse.virgo.kernel.deployer.dm'), |
| project(':kernel:org.eclipse.virgo.kernel.osgi'), |
| project(':kernel:org.eclipse.virgo.kernel.model'), |
| project(':kernel:org.eclipse.virgo.kernel.services'), |
| |
| project(':kernel:org.eclipse.virgo.shell.command'), |
| |
| project(':apps:org.eclipse.virgo.apps.repository.core'), |
| |
| project(':web:org.eclipse.virgo.web.core'), |
| project(':web:org.eclipse.virgo.web.dm'), |
| project(':web:org.eclipse.virgo.web.tomcat.support'), |
| ] |
| } |
| |
| defaultTasks 'clean', 'jar', 'build', 'distZip' |
| |
| def Properties versions = new Properties() |
| versions.load(new FileInputStream(project.rootProject.file('gradle.properties'))) |
| project.ext.props = versions |
| |
| ext.packagingProjects = [ |
| project(':packaging:nano'), |
| project(':packaging:kernel'), |
| project(':packaging:tomcat-server'), |
| ] |
| |
| ext { |
| // used when copying features and products |
| tokenMap = [ |
| 'VIRGO.VERSION' : version, |
| // used in plan files |
| 'VIRGO.VERSION.LOWER_BOUND' : "3.8", |
| 'VIRGO.VERSION.UPPER_BOUND' : "4", |
| |
| 'OSGI.SERVICES.VERSION' : osgiServicesVersion, // used in oev.kernel.userregion.properties |
| 'OSGI.ENTERPRISE.VERSION' : osgiEnterpriseVersion, |
| |
| 'EQUINOX.HTTP.JETTY.VERSION' : equinoxHttpJettyVersion, |
| 'EQUINOX.APP.VERSION' : equinoxAppVersion, |
| 'EQUINOX.COMMON.VERSION' : equinoxCommonVersion, |
| 'EQUINOX.CONFIGADMIN.VERSION' : equinoxCmVersion, |
| 'EQUINOX.DS.VERSION' : equinoxDsVersion, |
| 'EQUINOX.SC.VERSION' : equinoxSimpleConfiguratorVersion, |
| 'EQUINOX.SC.M.VERSION' : equinoxSimpleConfiguratorManipulatorVersion, |
| 'EQUINOX.CONSOLE.VERSION' : equinoxConsoleVersion, |
| 'EQUINOX.CONSOLE.SSH.VERSION' : equinoxConsoleSshVersion, |
| 'EQUINOX.EVENT' : equinoxEventVersion, |
| 'EQUINOX.FRKA.E.VERSION' : equinoxFrameworkadminEquinoxVersion, |
| 'EQUINOX.FRKA.VERSION' : equinoxFrameworkadminVersion, |
| 'EQUINOX.PFRCS.VERSION' : equinoxPreferencesVersion, |
| 'REGION.VERSION' : equinoxRegionVersion, |
| 'EQUINOX.REGISTRY.VERSION' : equinoxRegistryVersion, |
| 'EQUINOX.SECURITY.VERSION' : equinoxSecurityVersion, |
| |
| 'CONTENTTYPE.VERSION' : eclipseCoreContenttypeVersion, |
| 'JOBS.VERSION' : eclipseCoreJobsVersion, |
| 'CORE.NET.VERSION' : eclipseCoreNetVersion, |
| 'CORE.VERSION' : eclipseCoreRuntimeVersion, |
| |
| 'ECF.FT.VERSION' : eclipseEcfFiletransferVersion, |
| 'ECF.I.VERSION' : eclipseEcfIdentityVersion, |
| 'ECF.P.FT.VERSION' : eclipseEcfProviderFiletransferVersion, |
| 'ECF.SSL.VERSION' : eclipseEcfSslVersion, |
| 'ECF.VERSION' : eclipseEcfVersion, |
| |
| 'MINA.CORE.VERSION' : minaCoreVersion, |
| 'SSHD.CORE.VERSION' : apacheSshdCoreVersion, |
| 'FELIX.GOGO.COMMAND.VERSION' : gogoCommandVersion, // used in oev.kernel.userregion.properties and oev.shell.feature/feature.xml |
| 'FELIX.GOGO.RUNTIME.VERSION' : gogoRuntimeVersion, // used in oev.kernel.userregion.properties and oev.shell.feature/feature.xml |
| 'FELIX.GOGO.SHELL.VERSION' : gogoShellVersion, // used in oev.kernel.userregion.properties and oev.shell.feature/feature.xml |
| |
| 'JOLOKIA.VERSION' : jolokiaVersion, |
| |
| 'SPRING.VERSION' : springframeworkVersion, |
| |
| 'GEMINI.MANAGEMENT.VERSION' : geminiManagementVersion, |
| // TODO rename to 'GENIMI.BLUEPRINT.VERSION' |
| 'SPRING.DM.VERSION' : geminiBlueprintVersion, |
| 'GEMINI.WEB.VERSION' : geminiWebVersion, |
| |
| 'CATALINA.VERSION' : apacheCatalinaVersion, |
| |
| 'ASPECTJ' : aspectjVersion, |
| |
| 'C.FILEUPLOAD.VERSION' : commonsFileuploadVersion, |
| 'C.IO.VERSION' : commonsIoVersion, |
| |
| 'SCANNOTATION' : scannotationVersion, |
| 'JAVASSIST' : javassistVersion, |
| 'JOTM' : jotmVersion, |
| 'OBJECTWEB.ASM' : objectwebAsmVersion, |
| |
| 'JAVAX.ACTIVATION' : javaxActivationVersion, |
| 'JAVAX.EJB' : javaxEjbVersion, |
| 'JAVAX.INJECT' : javaxInjectVersion, |
| 'JAVAX.MAIL' : javaxMailVersion, |
| 'JAVAX.PERSISTENCE' : javaxPersistenceVersion, |
| 'JAVAX.RESOURCE' : javaxResourceVersion, |
| 'JAVAX.SECURITY.JACC' : javaxSecurityJaccVersion, |
| 'JAVAX.SERVLET.VERSION' : javaxServletVersion, |
| 'JAVAX.SERVLET.JSTL.VERSION' : javaxServletJspJstlVersion, |
| 'JSTL.IMPL' : javaxServletJspJstlImplOsgiVersion, |
| 'JAVAX.VALIDATION' : javaxValidationVersion, |
| 'JAVAX.WSDL' : javaxWsdlVersion, |
| 'JAVAX.WS.RS' : javaxWsRsVersion, |
| |
| 'JETTY.VERSION' : jettyVersion, |
| |
| 'P2.A.R.VERSION' : p2ArtifactRepositoryVersion, |
| 'P2.CONSOLE.VERSION' : p2ConsoleVersion, |
| 'P2.CORE.VERSION' : p2CoreVersion, |
| 'P2.DIRECTOR.VERSION' : p2DirectorVersion, |
| 'P2.ENGINE.VERSION' : p2EngineVersion, |
| 'P2.GC.VERSION' : p2GarbageCollectorVersion, |
| 'P2.JP.VERSION' : p2JarProcessorVersion, |
| 'P2.METADATA.VERSION' : p2MetadataVersion, |
| 'P2.M.R.VERSION' : p2MetadataRepositoryVersion, |
| 'P2.PUBLISHER.VERSION' : p2PublisherVersion, |
| 'P2.P.E.VERSION' : p2PublisherEclipseVersion, |
| 'P2.REPOSITORY.VERSION' : p2RepositoryVersion, |
| 'P2.T.E.VERSION' : p2TouchpointEclipseVersion, |
| 'P2.T.N.VERSION' : p2TouchpointNativesVersion, |
| 'P2.T.ECF.VERSION' : p2TransportEcfVersion, |
| |
| 'QUARTZ' : quartzVersion, |
| 'WB.COMMON' : apacheOpenwebbeansVersion, |
| 'WB.EE' : apacheOpenwebbeansEEVersion, |
| 'WB.EJB' : apacheOpenwebbeansEEVersion, |
| 'WB.IMPL' : apacheOpenwebbeansVersion, |
| 'WB.SPI' : apacheOpenwebbeansVersion, |
| 'WB.WEB' : apacheOpenwebbeansVersion, |
| 'WB.JSF' : apacheOpenwebbeansVersion, |
| 'WB.TOMCAT7' : apacheOpenwebbeansTomcat7Version, |
| |
| 'COMMOMS.BEANUTILS' : commonsBeanutilsVersion, |
| 'COMMONS.CLI' : commonsCliVersion, |
| 'COMMONS.COLLECTIONS' : commonsCollectionsVersion, |
| 'COMMONS.DBCP' : commonsDbcpVersion, |
| 'COMMONS.LANG' : commonsLangVersion, |
| 'COMMONS.POOL' : commonsPoolVersion, |
| |
| 'BVAL' : apacheBvalVersion, |
| 'G.MANAGEMENT' : geronimoSpecsJ2eeManagementVersion, |
| 'G.OSGI.LOCATOR' : geronimoSpecsOsgiLocatorVersion, |
| 'G.OSGI.REGISTRY' : geronimoSpecsOsgiRegistryVersion, |
| |
| 'CDI.API' : cdiApiVersion, |
| |
| 'XB.ASM' : apacheXBeanAsmVersion, |
| 'XB.BUNDLEUTILS' : apacheXBeanBundleutilsVersion, |
| 'XB.FINDER' : apacheXBeanFinderVersion, |
| 'XB.NAMING' : apacheXBeanNamingVersion, |
| 'XB.REFLECT' : apacheXBeanReflectVersion, |
| 'EL.ANTLR' : eclipsePersistenceAntlrVersion, |
| 'EL.ASM' : eclipsePersistenceAsmVersion, |
| 'EL.CORE' : eclipsePersistenceCoreVersion, |
| 'EL.JPA' : eclipsePersistenceJpaVersion, |
| 'EL.JPQL' : eclipsePersistenceJpaJpqlVersion, |
| 'FACES.API' : glassfishJavaxFacesVersion, |
| 'FACES.IMPL' : glassfishComSunFacesVersion, |
| |
| 'DERBY' : apacheDerbyVersion, |
| |
| // used in documentation |
| 'project.name' : 'Virgo', |
| 'runtime.category' : 'EclipseRT', |
| 'umbrella.product.name' : 'Virgo Runtime Environment', |
| 'umbrella.product.name.short' : 'Virgo Runtime', |
| 'tomcat.product.name' : 'Virgo Server for Apache Tomcat', |
| 'tomcat.product.name.short' : 'VTS', |
| 'jetty.product.name' : 'Virgo Jetty Server', |
| 'jetty.product.name.short' : 'VJS', |
| 'kernel.product.name' : 'Virgo Kernel', |
| 'kernel.product.name.short' : 'VK', |
| 'nano.product.name' : 'Virgo Nano', |
| 'nano.product.name.short' : 'VN', |
| 'nanoweb.product.name' : 'Virgo Nano Web', |
| 'snaps.product.name' : 'Virgo Snaps', |
| 'snaps.product.name.short' : 'VS', |
| 'ebr' : 'SpringSource Enterprise Bundle Repository', |
| 'p2repo' : "http://download.eclipse.org/virgo/updatesite/${version}".toString(), |
| 'bundle.version' : "${version}".toString(), |
| ] |
| } |
| |
| configure(javaProjects + osgiProjects) { |
| |
| apply plugin: 'java' |
| apply plugin: 'eclipse' |
| |
| sourceCompatibility = '1.8' |
| targetCompatibility = '1.8' |
| |
| compileJava { |
| options.encoding = 'utf-8' |
| options.fork = true |
| doFirst { |
| options.forkOptions.with { |
| executable = 'java' |
| jvmArgs = [ |
| '-cp', |
| configurations.ecj.asPath, |
| 'org.eclipse.jdt.internal.compiler.batch.Main', |
| '-warn:-unused' |
| ] |
| } |
| } |
| } |
| compileTestJava { |
| options.encoding = 'utf-8' |
| options.fork = true |
| doFirst { |
| options.forkOptions.with { |
| executable = 'java' |
| jvmArgs = [ |
| '-cp', |
| configurations.ecj.asPath, |
| 'org.eclipse.jdt.internal.compiler.batch.Main', |
| '-warn:-unused' |
| ] |
| } |
| } |
| } |
| |
| test { |
| if (System.properties['ci.build'] == 'true') { |
| ignoreFailures = true |
| } |
| } |
| |
| configurations { ecj {} } |
| |
| dependencies { |
| ecj group: "org.eclipse.jdt.core.compiler", name: "ecj", version: ecjVersion |
| |
| implementation 'org.slf4j:slf4j-api' |
| |
| testImplementation 'junit:junit' |
| testImplementation 'org.hamcrest:hamcrest-core' |
| testImplementation 'org.easymock:easymock' |
| } |
| |
| eclipse { |
| jdt { |
| sourceCompatibility = 1.8 |
| targetCompatibility = 1.8 |
| } |
| } |
| } |
| |
| configure(javaProjects + osgiProjects) { |
| assemble.doLast { |
| println '|--> Assembled Jar File: ' + jar.archivePath |
| if (System.properties['ci.build.signjars'] == 'true') { |
| println '|--> Normalize Jar File: ' + jar.archivePath |
| project.javaexec { |
| main = 'org.eclipse.equinox.internal.p2.jarprocessor.Main' |
| classpath Config.on(project).jarProcessorJar |
| args = [ |
| '-repack', |
| jar.archivePath |
| ] |
| } |
| println '|--> Signing Jar File: ' + jar.archivePath |
| exec { |
| workingDir jar.destinationDir |
| commandLine 'curl', |
| '-o', |
| jar.archivePath, |
| '-F', |
| "file=@${jar.archivePath}", |
| '--show-error', |
| 'http://build.eclipse.org:31338/sign' |
| } |
| println '|--> Compress Jar File: ' + jar.archivePath |
| project.javaexec { |
| main = 'org.eclipse.equinox.internal.p2.jarprocessor.Main' |
| classpath Config.on(project).jarProcessorJar |
| args = [ |
| '-pack', |
| jar.archivePath |
| ] |
| } |
| } else { |
| println '|--> Skipping normalize/signing/compression of Jar File: ' + jar.archivePath |
| } |
| } |
| } |
| |
| // FIXME Equinox migration - Investigate how to create Java + OSGi source bundles |
| println "FIXME Equinox migration - how to create Java + OSGi source bundles" |
| //configure(javaProjects + osgiProjects) { |
| // task sourcesJar(type: Jar, dependsOn: classes) { |
| // classifier = 'sources' |
| // from sourceSets.main.allSource |
| // } |
| // |
| // artifacts { |
| // archives sourcesJar |
| // } |
| //} |
| |
| // FIXME Equinox migration - Investigate how to publish Java + OSGi bundles |
| println "FIXME Equinox migration - how to publish Java + OSGi bundles" |
| //configure(javaProjects + osgiProjects) { |
| // apply plugin: 'maven-publish' |
| // publishing { |
| // repositories { |
| // maven { |
| // name = "BuildEclipseOrg" |
| // url "/opt/public/rt/virgo/gradle/bundles" |
| // } |
| // } |
| // publications { |
| // virgo(MavenPublication) { |
| // groupId 'org.eclipse.virgo' |
| // from components.java |
| // artifact sourcesJar { |
| // classifier "sources" |
| // } |
| // } |
| // } |
| // } |
| //} |
| |
| configure(javaProjects + osgiProjects + packagingProjects + project(":org.eclipse.virgo.site") + project("3rd-party")) { |
| apply plugin: "io.spring.dependency-management" |
| |
| repositories { |
| mavenCentral() |
| // Gemini Web and Tomcat dependencies aren't at Maven Central |
| ivy { |
| url "https://build.eclipse.org/rt/virgo/ivy/bundles/release/" |
| patternLayout { artifact "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" } |
| } |
| } |
| |
| dependencyManagement { |
| dependencies { |
| // Equinox OSGi runtime |
| dependency "org.eclipse.platform:org.eclipse.osgi:3.11.2" |
| |
| dependency "org.apache.felix:org.apache.felix.gogo.command:${gogoCommandVersion}" |
| dependency "org.apache.felix:org.apache.felix.gogo.runtime:${gogoRuntimeVersion}" |
| dependency "org.apache.felix:org.apache.felix.gogo.shell:${gogoShellVersion}" |
| |
| // 3rd party dependencies |
| dependency "org.glassfish.hk2.external:javax.inject:${glassfishJavaxInjectVersion}" |
| dependencySet(group:'org.slf4j', version: slf4jVersion) { |
| entry 'jcl-over-slf4j' |
| entry 'log4j-over-slf4j' |
| entry 'jul-to-slf4j' |
| entry 'slf4j-api' |
| entry 'slf4j-nop' |
| } |
| dependencySet(group:'ch.qos.logback', version: logbackVersion) { |
| entry 'logback-core' |
| entry 'logback-classic' |
| } |
| |
| dependency "commons-codec:commons-codec:${commonsCodecVersion}" |
| dependency "commons-cli:commons-cli:${commonsCliVersion}" |
| |
| dependency "org.apache.httpcomponents:httpcore:${httpcoreVersion}" |
| dependency "org.apache.httpcomponents:httpclient:${httpclientVersion}" |
| |
| dependency "org.hibernate:hibernate-core:${hibernateCoreVersion}" |
| |
| // Spring dependencies |
| dependency "aopalliance:aopalliance:${aopallianceVersionMaven}" |
| dependency "org.aspectj:aspectjweaver:${aspectjVersion}" |
| |
| dependency "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}" |
| dependency "javax.ejb:javax.ejb-api:${javaxEjbVersion}" |
| dependency "javax.el:javax.el-api:${javaxElVersion}" |
| dependency "javax.enterprise:cdi-api:${cdiApiVersion}" |
| dependency "javax.jms:javax.jms-api:${javaxJmsVersion}" |
| dependency "javax.resource:javax.resource-api:${javaxResourceVersion}" |
| dependency "javax.security.auth.message:javax.security.auth.message-api:${javaxSecurityAuthMessageVersion}" |
| dependency "javax.servlet:javax.servlet-api:${javaxServletVersion}" |
| dependency "javax.servlet.jsp:javax.servlet.jsp-api:${javaxServletJspVersion}" |
| dependency "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:${javaxServletJspJstlVersion}" |
| dependency "javax.transaction:javax.transaction-api:${javaxTransactionVersion}" |
| dependency "javax.websocket:javax.websocket-api:${javaxWebsocketVersion}" |
| dependency "javax.xml.rpc:javax.xml.rpc-api:${javaxXmlRpcVersion}" |
| |
| dependency "org.aspectj:aspectjrt:${aspectjVersion}" // used by AspectJ compiler |
| dependency "org.aspectj:aspectjtools:${aspectjVersion}" // used by AspectJ compiler -> configuration ajtools |
| |
| dependencySet(group:'org.springframework', version: springframeworkVersion) { |
| entry 'spring-aspects' |
| entry 'spring-aop' |
| entry 'spring-beans' |
| entry 'spring-context' |
| entry 'spring-context-support' |
| entry 'spring-core' |
| entry 'spring-expression' |
| entry 'spring-jdbc' |
| entry 'spring-messaging' |
| entry 'spring-jms' |
| entry 'spring-orm' |
| entry 'spring-oxm' |
| entry 'spring-tx' |
| entry 'spring-web' |
| entry 'spring-webflux' |
| entry 'spring-webmvc' |
| entry 'spring-websocket' |
| |
| entry 'spring-test' |
| } |
| |
| dependency "com.squareup.okio:okio:${okioVersion}" |
| dependency "com.squareup.okhttp3:okhttp:${okhttp3Version}" |
| |
| // Virgo Nano Full |
| dependencySet(group:'org.apache.geronimo.components', version: geronimoComponentsVersion) { |
| entry 'geronimo-transaction' |
| entry 'geronimo-connector' |
| } |
| |
| // testing |
| dependency "junit:junit:${junitVersion}" |
| dependency "org.hamcrest:hamcrest-core:${hamcrestCoreVersion}" |
| dependency "org.easymock:easymock:${easymockVersion}" |
| |
| dependency "org.ops4j.pax.exam:pax-exam-junit4:${paxExamJunit4Version}" |
| dependency "org.ops4j.pax.exam:pax-exam-container-native:${paxExamContainerNativeVersion}" |
| dependency "org.ops4j.pax.exam:pax-exam-link-mvn:${paxExamLinkMvnVersion}" |
| dependency "org.ops4j.pax.url:pax-url-aether:${paxUrlAetherVersion}" |
| } |
| } |
| } |
| |
| configure(javaProjects + osgiProjects) { |
| if (System.properties['ci.build'] == 'true' || System.properties['include.spotbugs'] == 'true') { |
| apply plugin: "com.github.spotbugs" |
| |
| spotbugs { |
| toolVersion = '3.1.12' |
| ignoreFailures = true |
| effort = 'max' |
| showProgress = true |
| reportLevel = "high" |
| excludeFilter = file("$rootProject.projectDir/config/findbugs/excludeFilter.xml") |
| } |
| // only run 'spotbugsMain' |
| tasks['spotbugsTest'].enabled = false |
| } |
| } |
| |
| configure(javaProjects + osgiProjects) { |
| if (System.properties['ci.build'] == 'true' || System.properties['include.jacoco'] == 'true') { |
| apply plugin: "jacoco" |
| |
| jacoco { |
| toolVersion = "0.8.5" |
| } |
| |
| test { |
| jacoco { |
| excludes = [ 'aspectj.*' ] |
| } |
| } |
| } |
| } |
| |
| configure(packagingProjects) { |
| configurations { |
| aspects { // visibility="private" |
| description = "Aspects to be woven" |
| } |
| |
| nanoLib { |
| description = "Dependencies to be packaged in lib" |
| transitive = true |
| exclude module: "org.eclipse.osgi" |
| } |
| nanoLibEndorsed { description = "Dependencies to be packaged in endorsed" } |
| nanoLibPersistence { |
| transitive = false |
| description = "Dependencies to be packaged in lib/persistence" |
| } |
| nanoPickup { |
| transitive = false |
| description = "Dependencies to be packaged in pickup" |
| } |
| kernelPluginsExtras { |
| transitive = false |
| description = "Dependencies to be published without p2 into Kernel plugin directory" |
| } |
| repositoryExt { |
| transitive = false |
| description = "Dependencies to be packaged in repository/ext" |
| } |
| } |
| } |
| |
| configure(osgiProjects) { |
| apply plugin: 'biz.aQute.bnd.builder' |
| |
| jar.bndfile = "bundle.bnd" |
| jar.manifest.attributes( |
| '-classpath': sourceSets.main.output.classesDirs.asPath, |
| 'Bundle-Vendor': 'Eclipse Virgo', |
| 'Bundle-SymbolicName': project.name, |
| '-removeheaders': 'Bnd-LastModified,Created-By', |
| ) |
| } |
| |
| configure(aspectjProjects) { |
| configurations { |
| ajtools { |
| transitive = false |
| description = "AspectJ tools runtime" |
| } |
| } |
| |
| apply plugin: AspectJPlugin |
| |
| configurations.compile.dependencies.each { Dependency dep -> |
| println dep.class |
| if (dep.hasProperty("dependencyProject")) { |
| println "Has property dependencyProject" + dep.class |
| println "dependent project: ${dep}" |
| iajcClasspath += ":" + dep.dependencyProject.buildDir + "/bundles/release/classes.jar" |
| } else { |
| println "other dependency: ${dep}" |
| } |
| } |
| |
| configurations { |
| ajtools { |
| transitive = false |
| description = "AspectJ tools runtime" |
| } |
| |
| aspectpath { |
| transitive = false |
| description = "Aspects are applied to types present in the project" |
| } |
| |
| testAspectpath { |
| transitive = false |
| description = "Aspects are applied to tests present in the project" |
| } |
| } |
| |
| dependencies { |
| implementation 'org.aspectj:aspectjrt' |
| |
| ajtools 'org.aspectj:aspectjtools' |
| } |
| |
| // Add nature and buildCommand |
| eclipse.project { |
| natures 'org.eclipse.ajdt.ui.ajnature' |
| buildCommand 'org.eclipse.ajdt.core.ajbuilder' |
| } |
| |
| eclipse { |
| classpath { |
| file { |
| withXml { xmlProvider -> |
| def classpath = xmlProvider.asNode() |
| def xmlparser = new XmlParser() |
| configurations.aspectpath.dependencies.each { dep -> |
| if (dep.hasProperty("dependencyProject")) { |
| println "Name of project containing aspects to weave: " + dep.dependencyProject.name |
| classpath.children().findAll { it['@path'] == '/' + dep.dependencyProject.name }.each { |
| println "Adding ${it['@path']} to Aspect Path" |
| def attrs = xmlparser.createNode(it, 'attributes', [:]) |
| xmlparser.createNode(attrs, 'attribute', [name: 'org.eclipse.ajdt.aspectpath', value: 'org.eclipse.ajdt.aspectpath']); |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| |
| configure([ |
| project(':util:org.eclipse.virgo.util.integrationtest'), |
| // project(':medic:org.eclipse.virgo.medic.integrationtest'), |
| ]) { |
| dependencies { |
| // OSGi runtime |
| testRuntime group: "org.eclipse.virgo.mirrored", name: "org.eclipse.osgi", version: equinoxVersion, configuration: "compile", ext: "jar" |
| |
| testImplementation 'org.glassfish.hk2.external:javax.inject' |
| |
| // PaxExam |
| testCompile group: "org.ops4j.pax.exam", name: "pax-exam-junit4", version: paxExamJunit4Version |
| testRuntime group: "org.ops4j.pax.exam", name: "pax-exam-container-native", version: paxExamContainerNativeVersion |
| testRuntime group: "org.ops4j.pax.exam", name: "pax-exam-link-mvn", version: paxExamLinkMvnVersion |
| testRuntime group: "org.ops4j.pax.url", name: "pax-url-aether", version: paxUrlAetherVersion |
| testRuntime group: "org.ops4j.pax.url", name: "pax-url-aether", version: paxUrlAetherVersion |
| testRuntime group: "org.ops4j.pax.url", name: "pax-url-wrap", version: paxUrlWrapVersion |
| } |
| } |