jqassistant - scan repository regularly and offer its content as server

147 Views Asked by At

I know that I can use something like

jqassistant.cmd scan -u maven:repository::http://ik-repo1:8084/nexus/content/repositories/releases

to incrementally scan a Maven repository and that

jqassistant.cmd server -serverAddress 123.321.0.0 -serverPort 8088

allows me to access the attached neo4j database through a server.

Now I would like to scan the repository regularly (say: once a day) and run the server all day (so that everybody can look up and query software structures).

I could not find an option to run the server as a (Windows) service. Furthermore, it seems to be impossible to run "scan" and "server" at the same time.

My best idea so far is to write a little service in java which runs the following loop:

  1. Start server and wait until midnight.
  2. Stop server.
  3. Do an incremental scan.

Any better ideas?

2

There are 2 best solutions below

0
Dirk Mahler On BEST ANSWER

The current jQAssistant runtime model is designed around invoking it as a task or plugin within a build process but not for the described "24/7 server" use case. So your described approach is currently the only solution.

Nevertheless there are user requests to support this scenario and we have some ideas in our heads how this could look like, e.g. jQAssistant as a Neo4j server extension providing REST interfaces to trigger scans and analysis tasks - discussion about this including potential use cases would be highly appreciated!

Best regards,

Dirk

0
Gerald Glennon On

We use a similar system that's been running for perhaps 2 years now. We use Jenkins to update nightly, which calls a perl script to download from nexus certain jar files using maven. This is done on a virtual machine. Then I use jqassistant to scan. I don't use internal NEO4j from jqassistant but use the next external neo4j version 2.3.10, with configured neo4j.

I use external neo4j so I can start and stop when updating etc. This is how we do it.

Each run all data is deleted and then new db is created each time. I should point that out.