onejar

Embedding Cassandra - Security Manager issues

*爱你&永不变心* 提交于 2019-12-25 18:21:24
问题 I am attempting to upgrade an application that uses an embedded cassandra 2.1.1 (about time!), but the application in question sets it's own security manager. Cassandra 3.11 seems to not consider this possibility and just attempts to set the security manager on it's own without any consideration that there might already be one (which fails). 2017-06-26T12:05:22,736 ERROR Thread-0 org.apache.cassandra.service.CassandraDaemon Exception encountered during startup java.security

one jar with one class and main class from dependecy jar

假装没事ソ 提交于 2019-12-24 19:26:25
问题 I am having one project with two classes named as Test1 and Test2 . Both Test1 and Test2 are not main classes. Now I have one dependency named cloudexe.jar which has a main class ClassExecuter . Now my issue is that I want ClassExecuter as the main class for both test1.jar and test2.jar . test1.jar should contains only Test1 class and all its dependencies including cloudexe.jar similarly test2.jar should contains only Test2 class and all its dependencies including cloudexe.jar Now when my

How to really & fully exclude a package from a jar?

青春壹個敷衍的年華 提交于 2019-12-23 18:41:56
问题 Having this dependencies section in my pom.xml : <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.7.1</version> <type>jar</type> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.7.1</version> <type>jar<

Classpath resources inside one-jar packaged via sbt

試著忘記壹切 提交于 2019-12-20 01:10:06
问题 I have a project that is build using SBT which packages a single jar using the one-jar plugin. That project contains a bunch of json files in src/main/resources/fixture which I used to access via new java.io.File(App.getClass.getResource("/fixture").getFile Unfortunately this doesn't work any longer since no Resource is returned. I think one-jar uses a special classloading mechanism? Whats the best way to solve this? 回答1: I think one-jar uses a special classloading mechanism? Yes, this must

javax/inject/Inject.class in lib/javax.inject-1.jar is hidden by lib/javax.inject-2.5.0-b42.jar on onejar executable

老子叫甜甜 提交于 2019-12-13 02:37:00
问题 I am attempting to create an atomic executable jar (i.e. no dependencies outside of the jar). To do this I have added a com.jolira:onejar-maven-plugin in my pom.xml. This seems to do the job, but when I execute the jar I get the warnings: JarClassLoader: Warning: Null manifest from input stream associated with: lib/javax.inject-1.jar JarClassLoader: Warning: javax/inject/Inject.class in lib/javax.inject-1.jar is hidden by lib/javax.inject-2.5.0-b42.jar (with different bytecode) JarClassLoader

How to publish additional artifact with sbt (one-jar)

穿精又带淫゛_ 提交于 2019-12-12 20:55:28
问题 I am new to scala and sbt. I managed to create an executable jar with one-jar plugin. I am trying to publish this additional (one-jar) artifact to artifactory, but I am not able to do that. Does anybody know how to do that? I had a look at http://www.scala-sbt.org/0.12.3/docs/Detailed-Topics/Artifacts.html but I was not able to get it to work. (play 2.1.2, sbt 0.12.3, scala 2.10) 回答1: I added the following to build.sbt and it worked fine. com.github.retronym.SbtOneJar.oneJarSettings artifact

Onejar and resource loading

自古美人都是妖i 提交于 2019-12-12 04:17:42
问题 I have a maven project which I would like to package in an executable jar. It's using quite a few dependencies, like spring and so on. It was suggested in a few posts to use OneJar, to avoid a lot of headaches. This is what I have currently in my pom.xml: <plugin> <groupId>org.dstovall</groupId> <artifactId>onejar-maven-plugin</artifactId> <version>1.4.4</version> <executions> <execution> <configuration> <mainClass>com.cool.project.Application</mainClass> <onejarVersion>0.97</onejarVersion>

OneJar includes Dr Tuffs classes

老子叫甜甜 提交于 2019-12-11 14:53:37
问题 I expect this is trivial, but I'm on a deadline, so I apologise if this is a stupid question. I'm using Dr Tuffs OneJar for Maven to build a fat jar including all my dependencies etc. However, when I use jar tf xxx.one-jar.jar it lists the things I'd expect, like my normal jar, but also all of Dr Tuffs code. The below is just an excerpt from the command: com/ com/simontuffs/ com/simontuffs/onejar/ .version OneJar.class com/simontuffs/onejar/Boot$1.class com/simontuffs/onejar/Boot$2.class com

How to get an URL for a resource directory when using OneJar?

淺唱寂寞╮ 提交于 2019-12-11 09:13:51
问题 I need to pass the root "something" to a piece of code working with resources. I know that this "something" can't be a file, since this doesn't work in a JAR. So I'm passing an URL. Before I started with OneJar I transformed an URL like file:/some/path!/foo/bar/MyUrlSupplier.class into file:/some/path!/foo/images/ and used this as the root URL. With OneJar I'm getting onejar:foo.bar.MyUrlSupplier.class and transforming it into onejar:foo.images but whatever I do with this URL, nothing works.

Using one-jar to build one jar file

风格不统一 提交于 2019-12-08 06:45:00
问题 I'm trying to use one-jar to generate one jar file that contains clojure jar file and java class file: Creating one jar file that for execution from Java/Clojure Following the instruction, I could generate directories using one-jar-appgen-0.97.jar . As instructed, I replaced the java source, and added the ThingOne-1.0.0-SNAPSHOT-standalone.jar Running ant , it builds jar file without an error, but I got error messages when I try to execute the jar file. java -jar build/test-one-jar.jar test