Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.cisco-system-traffic-generator:trex-packet-editor:'
}
<dependency>
<groupId>com.github.cisco-system-traffic-generator</groupId>
<artifactId>trex-packet-editor</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.cisco-system-traffic-generator" % "trex-packet-editor" % ""
:dependencies [[com.github.cisco-system-traffic-generator/trex-packet-editor ""]]
Network packet editor GUI for TRex.
# Run scapy server
./scripts/run_scapy_server &
# Run all tests, including headless UI tests (optional)
./gradlew -Pheadless test intTest uiTest
# Run application
./gradlew run
make sure the Scapy server is started. see ./scripts/run_scapy_server
helper script
you can also specify external server with an environment variable export SCAPY_SERVER=localhost:4507
./gradlew intTest uiTest
# or run tests in headless mode
./gradlew -Pheadless intTest uiTest
# to see test reports:
# open ./build/reports/tests/index.html
./gradlew install
this builds standalone jar file for UI. scapy_service is not included. jar is located in ./build/libs/TRexPacketCraftingTool.jar
./gradlew jar
./gradlew createPom
see https://github.com/FibreFoX/javafx-gradle-plugin#gradle-tasks for more options
./gradlew jfxNative
PYTHON=python3 ./scripts/run_scapy_server -v --scapy-port 4507
enable logging in gradle by specifying -PpacketEditorLogger(gradle -PpacketEditorLogger <your command>
)
also you may need to create logging.properties(see sl4j, logback documentation)
cat <<ENDL > logging.properties
handlers= java.util.logging.ConsoleHandler
.level= DEBUG
ENDL
gradle -Prelease jar