This repository contains a test and exploratory usage of javaparser for the detection and contents of test methods.
Go to file
Johannes Wuensche e879f5a7e9
Detect methods which use the @Test Annotation
2020-07-06 13:52:29 +02:00
src/main Detect methods which use the @Test Annotation 2020-07-06 13:52:29 +02:00
.gitignore Upgrade dependency 2019-12-15 21:48:41 +01:00
.travis.yml switch to openjdk8 (from oraclejdk8) 2020-04-17 15:30:17 +01:00
README.md Detect methods which use the @Test Annotation 2020-07-06 13:52:29 +02:00
pom.xml Merge pull request #10 from javaparser/dependabot/maven/com.github.javaparser-javaparser-core-3.15.21 2020-04-24 12:12:44 +00:00

README.md

The goal of this example project is to find usage of test annotations in the test files and print out the names of the annotated functions.

JavaParser and Maven sample

A fully working sample Maven project that parses and generates code with JavaParser

This is targeted at people without Maven experience.

To build it, you will need to download and unpack the latest (or recent) version of Maven (https://maven.apache.org/download.cgi) and put the mvn command on your path. Then, you will need to install a Java 1.8 (or higher) JDK (not JRE!), and make sure you can run java from the command line. Now you can run mvn clean install and Maven will compile your project, an put the results it in two jar files in the target directory. If you like to run from the command line, execute java -jar target/javaparser-maven-sample-1.0-SNAPSHOT-shaded.jar.

How you run this code is up to you, but usually you would start by using an IDE like NetBeans, Intellij IDEA, or Eclipse.

The Maven dependencies may lag behind the official releases a bit.

If you notice some problems with this setup, please open an issue.