scala - Local Java package management system in Python PIP style? -
i want program in java or other jvm languages scala, kotlin, or groovy. when programming on projects, want have import statements in java/scala/kotlin source files without need state packages second time in gradle/maven build script. instead want work in python, i.e. have import statements @ beginning of source files , done.
the packages should automatically included when compiling if packages installed in central local package management system or otherwise error message telling me have install missing package. should work same python , pip respectively.
is workflow possible preferably groovy or maven?
thanks in advance!
the closest can think grape:
grape jar dependency manager embedded groovy. grape lets add maven repository dependencies classpath, making scripting easier. simplest use simple adding annotation script:
@grab(group='org.springframework', module='spring-orm', version='3.2.5.release') import org.springframework.jdbc.core.jdbctemplate
like in this example:
@grab('net.sourceforge.nekohtml:nekohtml:1.9.16') def parser = new org.cyberneko.html.parsers.saxparser() def page = new xmlparser(parser).parse('https://news.google.com/nwshp?hl=zh-tw&tab=wn') page.depthfirst().div.grep{ it.'@class'=='title' }.each { println it.a.span.text() }
Comments
Post a Comment