Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample project with a basic Maven + JavaParser setup

NotificationsYou must be signed in to change notification settings

javaparser/javaparser-maven-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This fully working sample Maven project parses and generates code withJavaParser.

This sample is targeted at people withoutMaven 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 themvn command on your path.

Then, you will need to install a Java 1.8 (or higher) JDK (not JRE!), and make sure you can runjava from the command line.

If required, install git. If you haven't already done so, clone this sample repository withgit clone https://github.com/javaparser/javaparser-maven-sample.git.

Change to the folder of where this sample project was installed (where the pom.xml file is located).Now runmvn clean install and Maven will compile your project,and put the results into two jar files in thetarget directory.

You can now run the sample from the command line withjava -jar target/javaparser-maven-sample-1.0-SNAPSHOT-shaded.jar.This runs the sample program, LogicPositivizer, which reads, parses, and modifies the code in resources/Blabla.java and then writes the modified file with the same name to the output folder.

To better understand this sample, you can readJavaParser: Visited. In this book, key contributors to the JavaParser library teach you how you can use JavaParser to programmatically analyse, transform and generate your java code base.

How you run this code is up to you, but usually you would start by using an IDE likeNetBeans,Intellij IDEA, orEclipse.

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

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

About

Sample project with a basic Maven + JavaParser setup

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp