Questions tagged [jcabi]

jcabi.com is a collection of small open source Java libraries

There is over 20 small Java libraries in the jcabi.com collection and it keeps growing. Most interesting of them are the following:

47 questions
7
votes
4 answers

JCabi aspects @RetryOnFailure how to throw exception

I want to manually call for a retry on a method by using JCabi. Aspect oriented programming should make this easy but I can't figure it out. import com.jcabi.aspects.RetryOnFailure; public class Example { public int j; …
dendini
  • 3,842
  • 9
  • 37
  • 74
6
votes
1 answer

Logging using @Loggable jcabi annotations trims the logs

I am annotating my function @Loggable jcabi annotation. The statement it logs is not complete, it trims the line and just prints .. for the truncated data. I want the entire line to be printed. Can this be done with this…
Nandish A
  • 1,645
  • 5
  • 26
  • 41
5
votes
2 answers

aspects.jcabi: @Loggable doesn't add logs to the output

I am bored of adding manual logs for debugging each and every method that I write. I came to know about @Loggable annotation of jcabi but am not successful in implementing that and your help is highly appreciated. Below is the code that I have…
santhosh kumar
  • 1,981
  • 1
  • 9
  • 28
5
votes
0 answers

jcabi.aspects.Cacheable not caching method calls

I'm trying to cache the results of a slow network call which is contained in a method interface by following the guide at http://www.yegor256.com/2014/08/03/cacheable-java-annotation.html I'm using netflix feign client to make the network calls and…
Anoop
  • 5,540
  • 7
  • 35
  • 52
4
votes
0 answers

Java - Interacting with SSH session

I am currently building an application in order to learn Java. I am trying to connect to my server via SSH, execute some stuff and retrieve what the system gives me. I am using jcabi-ssh for my SSH management. Currently I am able to SSH into the…
Inialk
  • 73
  • 1
  • 3
4
votes
1 answer

Resolving custom dependencies in maven plugin programmatically

I have a custom maven plugin. In order to retrieve project's dependencies I use jcabi-aether library. It works fine for getting the project-scope dependencies. But what I need is to resolve plugin-scope dependencies so the call will look…
nKognito
  • 6,297
  • 17
  • 77
  • 138
4
votes
1 answer

jcabi is not logging in a file

I am trying to log using jcabi-log as described in link at http://www.yegor256.com/2014/05/23/avoid-java-static-logger.html. I have a method runThisAdvise() which is getting called from main method. The text in Logger.info "I am here" is not…
somename
  • 978
  • 11
  • 30
4
votes
3 answers

Aether, get artifact from local repo

there are many questions related to com.jcabi jcabi-aether 0.9 It works perfectly when I need to get an artifact from remote repo. Unfotunately,…
Capacytron
  • 3,425
  • 6
  • 47
  • 80
4
votes
1 answer

java api to get a file content for enterprise github

I tried so hard for a simple line of code that read a file content from enterprise github with oauth token, but could not find a example of such. I tried https://github.com/jcabi/jcabi-github, but it does not support enterprise github?(maybe I am…
user648922
  • 361
  • 5
  • 16
3
votes
1 answer

How to flush a particular data from cache while using @Cacheable annotation of com.jcabi.aspects?

I am using @Cacheable annotation of com.jcabi.aspects for caching mechanism in my project and I have a scenario in which I need to flush a particular data from the cache instead of flushing the whole cache. How is it possible? For example, import…
3
votes
1 answer

How can I connect to my company's git hub portal using java?

I have tried using jcabi-github following is my code Github github = new RtGithub(""); Iterable repo = github.repos().iterate(""); for (Repo repo2 : repo) { System.out.println(repo2); } But this is giving…
Pratik
  • 952
  • 2
  • 16
  • 31
3
votes
1 answer

loading Maven's settings.xml for Jcabi-Aether to use

I am trying to get/resolve some artifacts using Maven and Jcabi-Aether. I think I have most of the code ready but I have hard time figuring out how to load user's settings.xml so that I can load the Maven repositories into the remotes variable for…
wilx
  • 17,697
  • 6
  • 59
  • 114
3
votes
0 answers

How to programmatically pass input to Java keytool?

I'm trying to fix a problem in the open-source project jcabi-ssl-maven-plugin. The problem occurs in the method com.jcabi.ssl.maven.plugin.Keytool#genkey: @Loggable(Loggable.DEBUG) public void genkey() throws IOException { final Process proc =…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
3
votes
1 answer

How do I set up AspectJ to log method calls in Android Studio?

I'm making my first steps in Android development and to understand things like the lifecycle of a Fragment I'm using methods which have calls to a logger as the first line, such as @Override public void onCreate(Bundle savedInstanceState) { …
squirrel
  • 5,114
  • 4
  • 31
  • 43
2
votes
1 answer

Reading UTF-16 XML files with JCabi Java

I have found this JCabi snippet code that works well with UTF-8 xml encoded files, it basically reads the xml file and then prints it as a string. XML xml; try { xml = new XMLDocument(new File("test8.xml")); …
1
2 3 4