Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
Add autoconfigure module
Browse files Browse the repository at this point in the history
  • Loading branch information
ardikars committed Nov 12, 2018
2 parents 80824f8 + 036c45a commit 353fdf5
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 24 deletions.
3 changes: 2 additions & 1 deletion gradle/configure.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {

NAME = 'Jxpacket'
GROUP = 'com.ardikars.jxpacket'
VERSION = '1.1.0.RC16'
VERSION = '1.1.0.RC20'
DESCRIPTION = 'Jxpacket is a network packet crafting library for java.'

MAVEN_LOCAL_REPOSITORY = "${System.env.HOME}/.m2/repository"
Expand All @@ -28,6 +28,7 @@ ext {
NETTY_VERSION = '4.1.31.Final'
SPRING_BOOT_VERSION = '2.0.4.RELEASE'
JXNET_VERSION = '1.4.7.Final'
PCAP4J_VERSION = '1.7.3'

pom_project = {

Expand Down
13 changes: 7 additions & 6 deletions jxpacket-jxnet/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

apply plugin: 'io.spring.dependency-management'

dependencies {
implementation ('com.ardikars.jxnet:jxnet-context')
implementation ('com.ardikars.jxnet:jxnet-core')
implementation project(':jxpacket-common')
implementation project(':jxpacket-core')
compile ('com.ardikars.common:common-net')
compile ('com.ardikars.common:common-util')
compile ('com.ardikars.jxnet:jxnet-context')
compile ('com.ardikars.jxnet:jxnet-core')
compile project(':jxpacket-common')
compile project(':jxpacket-core')
}

dependencyManagement {
imports {
mavenBom "com.ardikars.jxnet:jxnet:${JXNET_VERSION}"
mavenBom "com.ardikars.common:common:${COMMON_VERSION}"
}
}
14 changes: 11 additions & 3 deletions jxpacket-pcap4j/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

dependencies {
compile group: 'org.pcap4j', name: 'pcap4j-core', version: '1.7.3'
implementation project(':jxpacket-common')
implementation project(':jxpacket-core')
compile ('com.ardikars.common:common-net')
compile ('com.ardikars.common:common-util')
implementation ("org.pcap4j:pcap4j-core:${PCAP4J_VERSION}")
compile project(':jxpacket-common')
compile project(':jxpacket-core')
}

dependencyManagement {
imports {
mavenBom "com.ardikars.common:common:${COMMON_VERSION}"
}
}
10 changes: 3 additions & 7 deletions jxpacket-spring-boot-autoconfigure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
dependencies {
implementation ("org.springframework.boot:spring-boot-configuration-processor")
implementation ("org.springframework.boot:spring-boot-autoconfigure")
implementation ("org.pcap4j:pcap4j-core:${PCAP4J_VERSION}")
implementation project(":jxpacket-jxnet")
implementation project(":jxpacket-pcap4j")
implementation project(":jxpacket-common")
implementation ("com.ardikars.common:common-net")
implementation ("com.ardikars.common:common-util")
implementation ("com.ardikars.jxnet:jxnet-context")
implementation ("com.ardikars.jxnet:jxnet-core")
}

dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${SPRING_BOOT_VERSION}")
mavenBom("com.ardikars.common:common:${COMMON_VERSION}")
mavenBom("com.ardikars.jxnet:jxnet:${JXNET_VERSION}")
mavenBom "com.ardikars.jxnet:jxnet:${JXNET_VERSION}"
mavenBom "com.ardikars.common:common:${COMMON_VERSION}"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<pmd xmlns="http://pmd.sourceforge.net/report/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/report/2.0.0 http://pmd.sourceforge.net/report_2_0_0.xsd"
version="6.5.0" timestamp="2018-11-11T20:46:48.484">
version="6.5.0" timestamp="2018-11-12T18:02:21.758">
<configerror rule="LoosePackageCoupling" msg="No packages or classes specified"/>
</pmd>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: Jxnet
Implementation-Version: 1.1.0.RC16
Implementation-Version: 1.1.0.RC19

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @author jxpacket 2018/11/10
* @author <a href="mailto:[email protected]">Langkuy</a>
*/
@Configuration
@Configuration("com.ardikars.jxpacket.JxnetAutoConfiguration")
@ConditionalOnClass({Jxnet.class, Context.class, Packet.class})
@EnableConfigurationProperties(JxpacketConfigurationProperties.class)
public class JxnetAutoConfiguration extends AbstractAutoConfiguration {
Expand Down Expand Up @@ -336,7 +336,7 @@ private List<PcapNetworkInterface.PcapAddress> findAddresses(PcapIf networkInter
@Override
public String prettyApplicationInformation() {
return new StringBuilder()
.append("Jxnet ")
.append("Jxnet")
.append(super.toString()).toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* @author jxpacket 2018/11/08
* @author <a href="mailto:[email protected]">Langkuy</a>
*/
@Configuration
@Configuration("com.ardikars.jxpacket.pcap4jAutoConfiguration")
@ConditionalOnClass(Pcaps.class)
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
@EnableConfigurationProperties(JxpacketConfigurationProperties.class)
Expand Down Expand Up @@ -195,7 +195,7 @@ private PcapNetworkInterface parsePcapNetworkInterface(org.pcap4j.core.PcapNetwo
@Override
public String prettyApplicationInformation() {
return new StringBuilder()
.append("Pcap4j ")
.append("Pcap4j")
.append(super.toString()).toString();
}

Expand Down
2 changes: 1 addition & 1 deletion jxpacket-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

dependencies {
compile project(":jxpacket-spring-boot-autoconfigure")
implementation project(":jxpacket-spring-boot-autoconfigure")
compile project(":jxpacket-common")
compile project(":jxpacket-core")
compile project(":jxpacket-common")
Expand Down

0 comments on commit 353fdf5

Please sign in to comment.