Hi im new in the jenkins/ant/groovy world and google couldnt help me to solve my problem.
My task is to get rid of ant scripts in the build process (with jenkins) and include them into the jenkins job (Execute system Groovy script).
The bold sections of my script are the reason for the failure, but i dont know how to solve this.
I hope someone can help me with that problem.
This is my "Execute system Groovy script":
antbuild = new AntBuilder()
projectHome = '...Homedirectory'
projectDomainModel = projectHome + '/CSSDomainModel'
projectPresentationBase = projectHome + '/CSSPresentationBase'
projectServices = projectHome + '/CSSServices'
projectResource = projectHome + '/src/main/resources'
Sources = projectHome + '/Presentation/JavaSource'
projectLibraries = 'lib/bin'
projectWebContent = projectHome + '/Presentation/WebContent'
projectWebInf = projectWebContent + '/WEB-INF'
deployHome = projectHome + '/target/servicekundenportal'
deployBuild = deployHome + '/build/classes'
deployWebInf = deployHome + '/WEB-INF'
foreignSources = 'src'
deployWARFile = deployHome + '/serviceportal.war'
j2eeLibraries = 'D:/Programme_x64/tomcat/8.0.21/Instanz_02/lib'
compileTarget = '1.8'
<b>compilerSourceFiles = antbuild.path{
pathelement(path:Sources)
pathelement(path:projectDomainModel + '/' + foreignSources)
pathelement(path:projectPresentationBase + '/' + foreignSources)
pathelement(path:projectServices + '/' + foreignSources)
}
compilerLibraryFiles = antbuild.path{
fileset(dir:projectDomainModel + '/' + projectLibraries) {include name:'**/*.jar'}
fileset(dir:projectPresentationBase + '/' + projectLibraries) {include name:'**/*.jar'}
fileset(dir:projectServices + '/' + projectLibraries) {include name:'**/*.jar'}
fileset(dir:j2eeLibraries) {include name:'**/*.jar'}
}</b>
antbuild.delete(dir:deployHome)
antbuild.delete(file:deployWARFile)
antbuild.mkdir(dir:deployBuild)
build() {
antbuild.javac(
destdir:deployBuild,
target:compileTarget,
debug:true,
fork:true,
executable:'D:/Programme_x64/Java/jdk1.8.0_45/bin/javac')<b>{
src(path:compilerSourceFiles)
classpath(path:compilerLibraryFiles)
}</b>
}
build()
The part of the Ant script that i am not able to convert:
<!-- Compiler Source File Definition -->
<path id="compilerSourceFiles">
<pathelement path="${Sources}" />
<pathelement path="${projectDomainModel}/${foreignSources}" />
<pathelement path="${projectPresentationBase}/${foreignSources}" />
<pathelement path="${projectServices}/${foreignSources}" />
</path>
<!-- Compiler Library Definition -->
<path id="compilerLibraryFiles">
<fileset id="librariesDomainModel" dir="${projectDomainModel}/${projectLibraries}">
<include name="**/*.jar" />
</fileset>
<fileset id="librariesPresentationBase" dir="${projectPresentationBase}/${projectLibraries}">
<include name="**/*.jar" />
</fileset>
<fileset id="librariesServices" dir="${projectServices}/${projectLibraries}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${j2eeLibraries}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="executeCompiler" depends="preCompile">
<javac destdir="${deployBuild}" target="${compileTarget}"
debug="true" debuglevel="lines,vars" encoding="ISO8859-1">
<src refid="compilerSourceFiles" />
<classpath refid="compilerLibraryFiles" />
</javac>
</target>
You example has a few too many dependencies on local directory structures etc to replicate in full, but using something like the below as a pattern should get you moving in the right direction:
def ant = new AntBuilder()
def projectHome = '...Homedirectory'
ant.path(id: 'compilerSourceFiles') {
pathelement(path: "$projectHome/Presentation/JavaSource")
pathelement(path: "$projectHome/CSSDomainModel/src")
pathelement(path: "$projectHome/CSSPresentationBase/src")
pathelement(path: "$projectHome/CSSServices/src")
}
ant.path(id: "compilerSourceFiles") {
fileset(id: "librariesDomainModel", dir: "$projectHome/CSSDomainModel/lib/bin") {
include(name: "**/*.jar")
}
fileset(id: "librariesPresentationBase", dir: "....") {
include(name: "**/*.jar")
}
//...
}
ant.target(name: 'executeCompiler', depends: 'preCompile') {
javac(destDir: "...", target: "...", debug: true, debugLevel: "lines,vars", encoding: "...") {
src(refid: "compilerSourceFiles")
classpath(refid: "compilerLibraryFiles")
}
}
In other words, each ant xml snippet:
<outerelement outerattribute="outervalue">
<innerelement innerattribute="innervalue" />
</outerelement>
gets converted to:
ant.outerelement(outerattribute: "outervalue") {
innerelement(innerattribute: "innervalue")
}
when using AntBuilder.
Related
Background: I'm working on OOB Pairing (via USB) between iOS device and embedded Linux board. Currently, on Linux side, I'm receiving bluetooth linkkey (needed for future connections) and mac address.
ps: if you are familiar with the subject - please, look at this question as well.
My current implementation, uses mac address as device's name (for details - see link to the question above), which is being resolved after second bluetoothd service restart.
Question: is there a way to get bluetooth name of the device having it's mac only with a help of BlueZ? I will use this in the C code with an access to BlueZ's DBus interface.
AFAIK, there is no straight forward DBus API or method to find the name from MAC address. But this can done using the method "GetManagedObjects" in "org.freedesktop.DBus.Properties" interface of the device.
Below is the pseudo code which will should work if proper error handling and variables are added. DBus XML is added at the top of the source just for reference.
#if 0
dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/hci0/dev_44_D8_84_02_A3_17 org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.1 -> dest=:1.7 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml" type="s" direction="out"/>
</method>
</interface>
<interface name="org.bluez.Device1">
<method name="Disconnect"></method>
<method name="Connect"></method>
<method name="ConnectProfile">
<arg name="UUID" type="s" direction="in"/>
</method>
<method name="DisconnectProfile">
<arg name="UUID" type="s" direction="in"/>
</method>
<method name="Pair"></method>
<method name="CancelPairing"></method>
<property name="Address" type="s" access="read"></property>
<property name="Name" type="s" access="read"></property>
<property name="Alias" type="s" access="readwrite"></property>
<property name="Class" type="u" access="read"></property>
<property name="Appearance" type="q" access="read"></property>
<property name="Icon" type="s" access="read"></property>
<property name="Paired" type="b" access="read"></property>
<property name="Trusted" type="b" access="readwrite"></property>
<property name="Blocked" type="b" access="readwrite"></property>
<property name="LegacyPairing" type="b" access="read"></property>
<property name="RSSI" type="n" access="read"></property>
<property name="Connected" type="b" access="read"></property>
<property name="UUIDs" type="as" access="read"></property>
<property name="Modalias" type="s" access="read"></property>
<property name="Adapter" type="o" access="read"></property>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="properties" type="a{sv}" direction="out"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<node name="player0"/></node>"
#endif
#define BT_BLUEZ_NAME "org.bluez"
#define BT_MANAGER_PATH "/"
#define BT_ADAPTER_INTERFACE "org.bluez.Adapter1"
#define BT_DEVICE_IFACE "org.bluez.Device1"
#define BT_MANAGER_INTERFACE "org.freedesktop.DBus.ObjectManager"
#define BT_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
int main(void)
{
char *known_address = "2C:F0:A2:26:D7:F5"; /*This is your address to search */
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE, NULL, BT_BLUEZ_NAME, BT_MANAGER_PATH, BT_MANAGER_INTERFACE, NULL, &err);
result = g_dbus_proxy_call_sync(proxy, "GetManagedObjects", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &err);
g_variant_get(result, "(a{oa{sa{sv}}})", &iter);
char *device_path = NULL;
char device_address[18] = { 0 };
/* Parse the signature: oa{sa{sv}}} */
while (g_variant_iter_loop(iter, "{&oa{sa{sv}}}", &device_path, NULL)) {
{
char address[BT_ADDRESS_STRING_SIZE] = { 0 };
char *dev_addr;
dev_addr = strstr(device_path, "dev_");
if (dev_addr != NULL) {
char *pos = NULL;
dev_addr += 4;
g_strlcpy(address, dev_addr, sizeof(address));
while ((pos = strchr(address, '_')) != NULL) {
*pos = ':';
}
g_strlcpy(device_address, address, BT_ADDRESS_STRING_SIZE);
}
}
if (g_strcmp0(known_address, device_address) == 0) {
/* Find the name of the device */
device_property_proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE, NULL, BT_BLUEZ_NAME, &device_path, BT_PROPERTIES_INTERFACE, NULL, NULL);
result = g_dbus_proxy_call_sync(proxy, "Get", g_variant_new("(ss)", BT_DEVICE_IFACE, "Alias"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
const char *local = NULL;
g_variant_get(result, "(v)", &temp);
local = g_variant_get_string(temp, NULL);
printf("Your desired name : %s\n", local);
}
}
}
I do crawling with nutch 2.2 and the data that i retrieve is the metatag,how to extract the value of specefic div in html with crawling in apache nutch
You will have to write a plugin that will extend HtmlParseFilter to achieve your goal.
You can use some html parser like Jsoup for this and extract URLs that you want and add them as outlinks.
Sample HtmlParseFilter implementation:-
public ParseResult filter(Content content, ParseResult parseResult,
HTMLMetaTags metaTags, DocumentFragment doc) {
// get html content
String htmlContent = new String(content.getContent(), StandardCharsets.UTF_8);
// parse html using jsoup or any other library.
Document document = Jsoup.parse(content.toString(),content.getUrl());
Elements elements = document.select(<your_css_selector_query);
// modify/select only required outlinks
if (elements != null) {
Outlink outlink;
List<String> newLinks=new ArrayList<String>();
List<Outlink> outLinks=new ArrayList<Outlink>();
String absoluteUrl;
Outlink outLink;
for (Element element : elements){
absoluteUrl=element.absUrl("href");
if(includeLinks(absoluteUrl,value)) {
if(!newLinks.contains(absoluteUrl)){
newLinks.add(absoluteUrl);
outLink=new Outlink(absoluteUrl,element.text());
outLinks.add(outLink);
}
}
}
Parse parse = parseResult.get(content.getUrl());
ParseStatus status = parse.getData().getStatus();
Title title = document.title();
Outlink[] newOutLinks = (Outlink[])outLinks.toArray(new Outlink[outLinks.size()]);
ParseData parseData = new ParseData(status, title, newOutLinks, parse.getData().getContentMeta(), parse.getData().getParseMeta());
parseResult.put(content.getUrl(), new ParseText(elements.text()), parseData);
}
//return parseResult with modified outlinks
return parseResult;
}
Build new plugin using ant and add plugin in nutch-site.xml.
<property>
<name>plugin.includes</name>
<value>protocol-httpclient|<custom_plugin>|urlfilter-regex|parse-(tika|html|js|css)|index-(basic|anchor)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
</property>
And in parser-plugins.xml you can use your custom plugin instead of default plugin used by tika by something like this :-
<!--
<mimeType name="text/html">
<plugin id="parse-html" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="parse-html" />
</mimeType>
-->
<mimeType name="text/xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<mimeType name="text/html">
<plugin id="<custom_plugin>" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="<custom_plugin>" />
</mimeType>
You need to override the parsefilter and use Jsoup selector to select particular div.
I have a working ant-task that runs me a batch of junit-tests, in the following fashion:
<junit printsummary="yes" showoutput="yes" haltonfailure="no">
<formatter type="plain" />
<classpath>
<path refid="app.compile.classpath" />
<path id="classes" location="${app.classes.home}" />
<path id="test-classes" location="${app.build.home}/test-classes" />
</classpath>
<batchtest fork="no" todir="${app.tests.reports}">
<fileset dir="${app.tests.home}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
Now this works fine right now, except for the names of the Test-reports that are generated. These names are overly long and follow the pattern:
TEST-com.company.package.Class.txt
Is there a way for specify a file-naming pattern for the report files for batchtest, preferrably for ant 1.6.5?
I know that for a single test, you can specify a filename by using the outfile attribute. In the junit-task reference, it's just stated that:
It then generates a test class name for each resource that ends in .java or .class.
No, it's not possible.
According to the source code
protected void execute(JUnitTest arg, int thread) throws BuildException {
validateTestName(arg.getName());
JUnitTest test = (JUnitTest) arg.clone();
test.setThread(thread);
// set the default values if not specified
//#todo should be moved to the test class instead.
if (test.getTodir() == null) {
test.setTodir(getProject().resolveFile("."));
}
if (test.getOutfile() == null) {
test.setOutfile("TEST-" + test.getName());
}
// execute the test and get the return code
TestResultHolder result = null;
if (!test.getFork()) {
result = executeInVM(test);
} else {
ExecuteWatchdog watchdog = createWatchdog();
result = executeAsForked(test, watchdog, null);
// null watchdog means no timeout, you'd better not check with null
}
actOnTestResult(result, test, "Test " + test.getName());
}
it will create the out file as "TEST-" + test.getName() if you don't specify it explicitly in the test element. It's not possible to specify it in batchtest element.
I am trying to develope an Ant macrodef which gets the values separated by commas of the Require-Bundle property in a Manifest file passed as parameter. What I want to obtain is something like this:
Require-Bundle=org.eclipse.ui,org.eclipse.ui.ide,org.eclipse.ui.views...
The problem I am facing in my code is that it doesn't take into account if the property has multiple values in multiple lines, here is my code:
<macrodef name="getDependencies">
<attribute name="file" />
<attribute name="prefix" default="ant-mf." />
<sequential>
<loadproperties>
<file file="#{file}" />
<filterchain>
<linecontains>
<contains value="Require-Bundle" />
</linecontains>
<prefixlines prefix="#{prefix}" />
</filterchain>
</loadproperties>
</sequential>
</macrodef>
But this is what I get:
[echoproperties] ant-mf.Require-Bundle=org.eclipse.ui,
Any help will be appreciated.
Most likely, your Manifest file looks like this:
Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide,
org.eclipse.ui.views,
...
Unfortunately, Java Manifest files aren't quite Java Properties files. Manifest files can have attributes that span multiple lines whereas Property files can't have multi-line values. The <loadproperties> task can't handle multi-line attributes.
Instead, you'll need an Ant task that knows about Manifest files. In another question, Richard Steele provides Ant script that loads a Manifest file from a Jar file. You can adapt the example to get just the Require-Bundle attribute.
Thanks to Chad Nouis I have changed the macrodef approach to scriptdef. I have debugged and adapted the Richard Steele script to fit my needs:
<!--
Loads entries from a manifest file.
#manifest A manifest file to read
#entry The name of the manifest entry to load (optional)
#prefix A prefix to prepend (optional)
-->
<scriptdef name="getDependencies" language="javascript" description="Gets all entries or a specified one of a manifest file">
<attribute name="manifest" />
<attribute name="entry" />
<attribute name="prefix" />
<![CDATA[
var filename = attributes.get("manifest");
var entry = attributes.get("entry");
if (entry == null) {
entry = "";
}
var prefix = attributes.get("prefix");
if (prefix == null) {
prefix = "";
}
var manifest;
if (filename != null) {
manifest = new java.util.jar.Manifest(new java.io.FileInputStream(new java.io.File(filename)));
} else {
self.fail("File is required");
}
if (manifest == null) {
self.log("Problem loading the Manifest");
} else {
var attributes = manifest.getMainAttributes();
if (attributes != null) {
if (entry != "") {
project.setProperty(prefix + entry, attributes.getValue(entry));
} else {
var it = attributes.keySet().iterator();
while (it.hasNext()) {
var key = it.next();
project.setProperty(prefix + key, attributes.getValue(key));
}
}
}
}
]]>
</scriptdef>
im working on my scaffold and i can't seem to get Neo embedded to initialize. I am using Neo 2, so I am running spring data 3.0.0.m1. I can't get it to light up. Here is my context
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<context:annotation-config/>
<context:spring-configured />
<context:component-scan base-package="com.onuspride.wisdom" />
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
<import resource="spring-data-Neo4j.xml" />
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager">
<bean id="jotm" class="org.springframework.data.neo4j.transaction.JotmFactoryBean"/>
</property>
</bean>
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase" destroy-method="shutdown">
<constructor-arg value="target/test-db"/>
<constructor-arg>
<map>
<entry key="tx_manager_impl" value="spring-jta"/>
</map>
</constructor-arg>
</bean>
</beans>
But i get this exception
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphDatabaseService' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [java.lang.Iterable]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1075)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:979)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
I can't find anything anywhere saying there are more constructor parameters.
here's my dependencies
akka = '2.2.3'
akkaSeries = '_2.10'
apacheLog4jVersion = '2.0-beta9'
aspectjVersion = '1.7.2'
cglibVersion = '2.2.2'
commonsCodecVersion = '1.5'
commonsDigesterVersion = '2.1'
commonsFileuploadVersion = '1.3'
commonsLang3Version = '3.1'
elApiVersion = '1.0'
fasterxmlJacksonVersion = '2.3.0'
flexJsonVersion = '2.1'
ginVersion = '2.0.0'
googleAPIClient = '1.17.0-rc'
googleAPIDrive = 'v2-rev110-1.17.0-rc'
googleAPIOauth2 = 'v2-rev59-1.17.0-rc'
googleJackson = '1.15.0-rc'
guavaVersion = '14.0.1'
guiceVersion = '3.0'
gwtpVersion = '1.0.3'
gwtqueryVersion = '1.3.2'
gwtsecurityVersion = '1.2.3'
gwtVersion = '2.5.1'
hamcrestDateVersion = '0.9.5'
hibernateValidator = '5.0.2.Final'
ioSpray = '1.2.0'
javaxServletVersion = '3.0.1'
jedisVersion = '2.1.0'
jettyVersion = '9.1.0.v20131115'
jodaTimeVersion = '1.6'
json4sVersion = '3.2.6'
jspApiVersion = '2.1'
jstlApiVersion = '1.2'
jukitoVersion = '1.1'
junitVersion = '4.11'
lmaxDistruptorVersion = '3.2.0'
neo4jVersion = '2.0.0'
persistenceApiVersion = '1.0'
scalaLangVersion = '2.10.2'
slf4jVersion = '1.7.5'
socialSigninTwitterVersion = '1.1.0-SNAPSHOT'
//springDataNeo4jVersion = '2.3.3.RELEASE'
springDataNeo4jVersion = '3.0.0.M1'
springDataRedis = '1.1.0.RELEASE'
springJsResourcesVerison = '2.3.2.RELEASE'
springJsVersion = '2.3.2.RELEASE'
springScalaVersion = '1.0.0.RC1'
springSecurityVersion = '3.2.0.RELEASE'
springSocialGoogleVersion = '1.0.0.M3'
springSocialVersion = '1.1.0.M4'
springVersion = '3.2.6.RELEASE'
tilesJspVersion = '2.2.2'
compile "com.lmax:disruptor:$lmaxDistruptorVersion"
compile "com.typesafe.akka:akka-actor$akkaSeries:$akka"
compile "com.typesafe.akka:akka-slf4j$akkaSeries:$akka"
compile "io.spray:spray-can:$ioSpray"
compile "io.spray:spray-routing:$ioSpray"
compile "joda-time:joda-time:$jodaTimeVersion"
compile "org.apache.logging.log4j:log4j-api:$apacheLog4jVersion"
compile "org.apache.logging.log4j:log4j-core:$apacheLog4jVersion"
compile "org.apache.logging.log4j:log4j-slf4j-impl:$apacheLog4jVersion"
compile "org.hibernate:hibernate-validator:$hibernateValidator"
compile "org.json4s:json4s-native_2.10:$json4sVersion"
compile "org.scala-lang:scala-library:$scalaLangVersion"
compile "org.springframework.data:spring-data-neo4j-aspects:$springDataNeo4jVersion"
compile "org.springframework.data:spring-data-neo4j-tx:$springDataNeo4jVersion"
compile "org.springframework.data:spring-data-neo4j:$springDataNeo4jVersion"
compile "org.springframework.scala:spring-scala_2.10:$springScalaVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-aspects:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile group: 'org.neo4j', name: 'neo4j', version: "$neo4jVersion"
compile group: 'org.neo4j.app', name: 'neo4j-server', version: "$neo4jVersion", classifier: 'static-web'
testCompile "junit:junit:$junitVersion"
testCompile "org.mockito:mockito-all:1.9.5"
testCompile "org.springframework:spring-test:$springVersion"
Spring Data Neo4j 3.0.M1 only works with Neo4j 2.0.0-M06
The next milestone is almost ready, which then will work with Neo4j 2.0.0
I had the same problem. Changing spring-data.xml to the following helped resolve the issue...
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
<bean class="org.springframework.data.neo4j.config.Neo4jConfiguration"/>
<bean class="org.springframework.context.annotation.ConfigurationClassPostProcessor"/>
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
destroy-method="shutdown" scope="singleton">
</bean>
<bean id="serverWrapper" class="org.neo4j.server.WrappingNeoServerBootstrapper" init-method="start" destroy-method="stop">
<constructor-arg index="0" ref="graphDatabaseService"/>
</bean>
<neo4j:config storeDirectory="target/db/data"/>
<neo4j:repositories base-package="org.example.repository"/>