Comments (4)
I don't know gradle well, but I think you should call
mvn compile web3j:generate-sources
from web3j-maven-plugin.
$ mvn compile web3j:generate-sources
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.108 s
[INFO] Finished at: 2018-02-07T09:44:18+03:00
[INFO] Final Memory: 8M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/k06a/Projects/base-node). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
from web3j-maven-plugin.
Trying to call this maven goal from gradle:
// https://github.com/web3j/web3j-maven-plugin
// https://github.com/dkorotych/gradle-maven-exec-plugin
task compileSolidity(type: MavenExec) {
System.out.println("test")
goals 'web3j:generate-sources'
options {
define = [
'packageName' : 'com.bitclave.node.solidity',
'sourceDestination' : 'src/main/java/generated',
'nativeJavaType' : 'true',
'soliditySourceFiles' : [
'directory' : 'src/main/resources',
'includes' : [ '**/*.sol' ]
]
]
}
}
compileJava.doFirst {
tasks.compileSolidity.execute()
}
from web3j-maven-plugin.
Found working solution:
buildscript {
ext {
kotlinVersion = '1.2.21'
springBootVersion = '1.5.9.RELEASE'
}
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/ethereum/maven/' }
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("gradle.plugin.com.github.dkorotych.gradle.maven.exec:gradle-maven-exec-plugin:1.2.1")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'maven'
apply plugin: 'com.github.dkorotych.gradle-maven-exec'
// https://github.com/web3j/web3j-maven-plugin
// https://github.com/dkorotych/gradle-maven-exec-plugin
task compileSolidity(type: MavenExec) {
mavenexec {
workingDir projectDir
goals 'org.web3j:web3j-maven-plugin:generate-sources'
options {
file = file('pom-for-generation.xml')
define = [
'packageName' : 'com.bitclave.node.solidity',
'sourceDestination' : 'src/main/java/generated',
'nativeJavaType' : 'true'
]
}
}
}
compileJava.doFirst {
tasks.compileSolidity.execute()
}
from web3j-maven-plugin.
Related Issues (20)
- Problem integrating web3j into maven clean install HOT 1
- Generate meta-data files as well (optional as with bin, abi)
- Why does this plugin keep using solc version 0.4.25?
- Path for ABI & BIN is wrong HOT 1
- Two-dimensional array problem???
- Execution default-cli of goal org.web3j:web3j-maven-plugin:4.10.0:generate-sources failed: ClassLoader.getSystemResource("releases.json") must not be null
- java.net.UnknownHostException: github.com when being offline
- Define solc version
- Error when running "mvn web3j:generate-sources"
- ClassLoader.getSystemResource("releases.json") must not be null HOT 1
- Please add a configuration option for SolidityFunctionWrapperGenerator :: .B, --generateBoth generate both call and send functions.
- Issues generating proxies from external Truffle proj HOT 1
- Can't generateContractWrappers for solidity 0.8.x due result json change format HOT 6
- Generation of code fails when using solidity 0.8.0 HOT 1
- Build Error HOT 4
- add support through solc 0.8.12
- org.json.simple.JSONArray cannot be cast to java.lang.String HOT 1
- web3j plugin solidity source file compile failed with assign solidity version over 0.7.1 HOT 1
- release web3j-maven-plugin for web3j 5.0.0
- Execution generate-sources-web3j of goal org.web3j:web3j-maven-plugin:4.9.4:generate-sources failed: part 'struct OfferItem' is keyword
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3j-maven-plugin.