Skip to content

Commit

Permalink
build: add pom xml
Browse files Browse the repository at this point in the history
  • Loading branch information
damingerdai committed Feb 5, 2024
1 parent 6796c37 commit cafdfb0
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 29 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ java_library(
"@maven//:org_springframework_spring_context",
"@maven//:org_springframework_spring_web",

"@maven//:org_apache_shiro_shiro_spring_boot_starter",
# "@maven//:org_apache_shiro_shiro_spring_boot_starter",
"@maven//:org_apache_shiro_shiro_core",
"@maven//:org_apache_shiro_shiro_spring",
"@maven//:org_apache_shiro_shiro_web",
Expand Down
67 changes: 42 additions & 25 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,63 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")

# for https://github.com/apache/shiro/issues/891
shiros = [
maven.artifact(
group ="org.apache.shiro",
artifact = "shiro-spring-boot-web-starter",
version = "1.12.0",
# classifier = "jakarta",
),
maven.artifact(
group ="org.apache.shiro",
artifact = "shiro-spring-boot-starter",
version = "1.12.0",
# classifier = "jakarta",
),
# maven.artifact(
# group ="org.apache.shiro",
# artifact = "shiro-spring-boot-web-starter",
# version = "1.13.0",
# exclusions = [
# maven.exclusion(
# group = "org.apache.shiro",
# artifact = "shiro-core",
# ),
# maven.exclusion(
# group = "org.apache.shiro",
# artifact = "shiro-web",
# ),
# ],
# #classifier = "jakarta",
# ),
# maven.artifact(
# group ="org.apache.shiro",
# artifact = "shiro-spring-boot-starter",
# version = "1.13.0",
# #classifier = "jakarta",
# ),
maven.artifact(
group = "org.apache.shiro",
artifact = "shiro-spring",
version = "1.12.0",
classifier = "jakarta",
version = "1.13.0",
#classifier = "jakarta",
# exclusions = [
# maven.exclusion(
# group = "javax.servlet",
# artifact = "*",
# group = "org.apache.shiro",
# artifact = "shiro-core",
# ),
# maven.exclusion(
# group = "org.apache.shiro",
# artifact = "*",
# artifact = "shiro-web",
# ),
# ]
),
maven.artifact(
group = "org.apache.shiro",
artifact = "shiro-web",
version ="1.12.0",
classifier = "jakarta",
artifact = "shiro-core",
version = "1.13.0",
#classifier = "jakarta",
),
maven.artifact(
maven.artifact(
group = "org.apache.shiro",
artifact = "shiro-core",
version ="1.12.0",
classifier = "jakarta",
)
artifact = "shiro-web",
version = "1.13.0",
#classifier = "jakarta",
# exclusions = [
# maven.exclusion(
# group = "org.apache.shiro",
# artifact = "shiro-core",
# ),
# ]
),

]

maven_install(
Expand Down
15 changes: 12 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'org.apache.shiro:shiro-spring-boot-starter:1.12.0:jakarta'
implementation('org.apache.shiro:shiro-spring:1.12.0:jakarta') { exclude group: 'org.apache.shiro', module: 'shiro-web' }
implementation 'org.apache.shiro:shiro-web:1.12.0:jakarta'
implementation 'org.apache.shiro:shiro-spring-boot-web-starter:1.13.0'
implementation('org.apache.shiro:shiro-spring:1.13.0:jakarta') {
exclude group: 'org.apache.shiro', module: 'shiro-core'
exclude group: 'org.apache.shiro', module: 'shiro-web'
}
implementation 'org.apache.shiro:shiro-core:1.13.0:jakarta'
implementation 'org.apache.shiro:shiro-web:1.13.0:jakarta'
// implementation 'org.apache.shiro:shiro-spring-boot-starter:2.0.0-alpha-4:jakarta'
// implementation 'org.apache.shiro:shiro-spring-boot-web-starter:2.0.0-alpha-4:jakarta'
// implementation 'org.apache.shiro:shiro-spring:2.0.0-alpha-4:jakarta'
// implementation 'org.apache.shiro:shiro-web:2.0.0-alpha-4:jakarta'


implementation 'com.auth0:java-jwt:3.19.4'
implementation 'org.postgresql:postgresql'
Expand Down
125 changes: 125 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>org.daming</groupId>
<artifactId>jobs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>jobs</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>21</java.version>
<!-- <kotlin.version>1.3.70</kotlin.version> -->
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring-boot-web-starter</artifactId>
<version>1.13.0</version>
</dependency> -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<classifier>jakarta</classifier>
<version>1.13.0</version>
<!-- 排除仍使用了javax.servlet的依赖 -->
<exclusions>
<exclusion>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 引入适配jakarta的依赖包 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<classifier>jakarta</classifier>
<version>1.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<classifier>jakarta</classifier>
<version>1.13.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.19.4</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>

<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency> -->

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit cafdfb0

Please sign in to comment.