Skip to content

Commit 3cb7803

Browse files
authored
Merge pull request #3 from djvelimir/feature/add-maven-dependency-plugin
Add Maven dependency plugin
2 parents 9909717 + 4b564bd commit 3cb7803

File tree

4 files changed

+106
-32
lines changed

4 files changed

+106
-32
lines changed

.github/workflows/release.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
tag_name: ${{ github.ref }}
2323
release_name: Release ${{ github.ref }}
2424
body: |
25-
**Release Notes: demo-java-swing Password Generator Application**
26-
27-
We are excited to announce the initial release of the demo-java-swing Password Generator application! This user-friendly tool allows you to generate strong, secure passwords up to 16 characters, utilizing Java Swing for a seamless graphical interface. The application supports various character types, including uppercase letters, lowercase letters, digits, and special symbols, ensuring high-quality randomness and security. With an intuitive design, users can easily customize their password requirements, making it perfect for anyone looking to enhance their online security. Dive in and secure your digital presence with ease!
25+
**Release Notes:**
26+
- Added the Maven Dependency Plugin to automatically create a target/lib folder containing all project dependencies. This enhancement streamlines the packaging process, making it easier to manage and include external libraries required for project execution.
2827
draft: false
2928
prerelease: false

README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22

33
## Password Generator Application
44

5-
Welcome to the Password Generator Application! This tool is designed to help users effortlessly create secure passwords that are 16 characters long. It will create a unique combination of uppercase letters, lowercase letters, numbers, and special symbols to ensure strong security, making it suitable for protecting sensitive accounts and personal information. The generated password will comply with best practices for complexity and randomness, eliminating the need for users to create their own passwords while enhancing their online safety. Whether you're setting up a new account, enhancing your cybersecurity, or simply in need of a reliable password, this solution has got you covered. No additional options or complex settings are necessary; just generate and use your password with confidence! The code is open-source, inviting contributions and modifications from the community to enhance functionality while keeping safety at the forefront. Start protecting your digital life today with our Password Generator Application!
5+
Welcome to the Password Generator Application! This tool is designed to help users effortlessly create secure passwords
6+
that are 16 characters long. It will create a unique combination of uppercase letters, lowercase letters, numbers, and
7+
special symbols to ensure strong security, making it suitable for protecting sensitive accounts and personal
8+
information. The generated password will comply with best practices for complexity and randomness, eliminating the need
9+
for users to create their own passwords while enhancing their online safety. Whether you're setting up a new account,
10+
enhancing your cybersecurity, or simply in need of a reliable password, this solution has got you covered. No additional
11+
options or complex settings are necessary; just generate and use your password with confidence! The code is open-source,
12+
inviting contributions and modifications from the community to enhance functionality while keeping safety at the
13+
forefront. Start protecting your digital life today with our Password Generator Application!
614

715
## Use Case Diagram
816

9-
A use case diagram for a password generator application illustrates the interactions between users and the system. In this diagram, two primary use cases are highlighted: "Generate Password" and "Copy Password." The "Generate Password" use case allows users to create secure, random passwords. Meanwhile, the "Copy Password" use case enables users to easily transfer generated passwords to their clipboard for seamless pasting into login fields. Together, these use cases enhance user experience by providing straightforward tools for password management and security.
17+
A use case diagram for a password generator application illustrates the interactions between users and the system. In
18+
this diagram, two primary use cases are highlighted: "Generate Password" and "Copy Password." The "Generate Password"
19+
use case allows users to create secure, random passwords. Meanwhile, the "Copy Password" use case enables users to
20+
easily transfer generated passwords to their clipboard for seamless pasting into login fields. Together, these use cases
21+
enhance user experience by providing straightforward tools for password management and security.
1022

1123
<picture>
1224
<source media="(prefers-color-scheme: dark)" srcset="http://www.plantuml.com/plantuml/proxy?cache=no&fmt=svg&src=https://raw.githubusercontent.com/djvelimir/demo-java-swing/main/diagrams/UseCase_dark.puml">

pom.xml

+82-20
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.example</groupId>
88
<artifactId>demo-java-swing</artifactId>
9-
<version>1.0-SNAPSHOT</version>
9+
<version>1.0.1</version>
1010

1111
<name>demo-java-swing</name>
1212
<url>https://djvelimir.github.io</url>
@@ -19,9 +19,33 @@
1919

2020
<dependencies>
2121
<dependency>
22-
<groupId>junit</groupId>
23-
<artifactId>junit</artifactId>
24-
<version>4.13.2</version>
22+
<groupId>org.junit.jupiter</groupId>
23+
<artifactId>junit-jupiter-api</artifactId>
24+
<version>5.11.4</version>
25+
<scope>test</scope>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.junit.jupiter</groupId>
29+
<artifactId>junit-jupiter-engine</artifactId>
30+
<version>5.11.4</version>
31+
<scope>test</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.mockito</groupId>
35+
<artifactId>mockito-junit-jupiter</artifactId>
36+
<version>5.14.2</version>
37+
<scope>test</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.mockito</groupId>
41+
<artifactId>mockito-core</artifactId>
42+
<version>5.14.2</version>
43+
<scope>test</scope>
44+
</dependency>
45+
<dependency>
46+
<groupId>net.bytebuddy</groupId>
47+
<artifactId>byte-buddy-agent</artifactId>
48+
<version>1.15.4</version>
2549
<scope>test</scope>
2650
</dependency>
2751
<dependency>
@@ -37,50 +61,88 @@
3761
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
3862
<plugin>
3963
<artifactId>maven-clean-plugin</artifactId>
40-
<version>3.1.0</version>
64+
<version>3.4.0</version>
4165
</plugin>
4266
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
4367
<plugin>
4468
<artifactId>maven-resources-plugin</artifactId>
45-
<version>3.0.2</version>
69+
<version>3.3.1</version>
4670
</plugin>
4771
<plugin>
4872
<artifactId>maven-compiler-plugin</artifactId>
49-
<version>3.8.0</version>
73+
<version>3.13.0</version>
5074
</plugin>
5175
<plugin>
5276
<artifactId>maven-surefire-plugin</artifactId>
53-
<version>2.22.1</version>
77+
<version>3.5.1</version>
5478
</plugin>
5579
<plugin>
5680
<artifactId>maven-jar-plugin</artifactId>
57-
<version>3.0.2</version>
58-
<configuration>
59-
<archive>
60-
<manifest>
61-
<mainClass>org.example.AppImpl</mainClass>
62-
</manifest>
63-
</archive>
64-
</configuration>
81+
<version>3.4.2</version>
82+
</plugin>
83+
<plugin>
84+
<artifactId>maven-dependency-plugin</artifactId>
85+
<version>3.7.0</version>
6586
</plugin>
6687
<plugin>
6788
<artifactId>maven-install-plugin</artifactId>
68-
<version>2.5.2</version>
89+
<version>3.1.2</version>
6990
</plugin>
7091
<plugin>
7192
<artifactId>maven-deploy-plugin</artifactId>
72-
<version>2.8.2</version>
93+
<version>3.1.2</version>
7394
</plugin>
7495
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
7596
<plugin>
7697
<artifactId>maven-site-plugin</artifactId>
77-
<version>3.7.1</version>
98+
<version>3.20.0</version>
7899
</plugin>
79100
<plugin>
80101
<artifactId>maven-project-info-reports-plugin</artifactId>
81-
<version>3.0.0</version>
102+
<version>3.6.2</version>
82103
</plugin>
83104
</plugins>
84105
</pluginManagement>
106+
<plugins>
107+
<plugin>
108+
<groupId>org.apache.maven.plugins</groupId>
109+
<artifactId>maven-surefire-plugin</artifactId>
110+
<configuration>
111+
<argLine>-javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/1.15.4/byte-buddy-agent-1.15.4.jar</argLine>
112+
</configuration>
113+
</plugin>
114+
<plugin>
115+
<groupId>org.apache.maven.plugins</groupId>
116+
<artifactId>maven-jar-plugin</artifactId>
117+
<configuration>
118+
<archive>
119+
<manifest>
120+
<addClasspath>true</addClasspath>
121+
<classpathPrefix>lib/</classpathPrefix>
122+
<mainClass>org.example.AppImpl</mainClass>
123+
</manifest>
124+
</archive>
125+
</configuration>
126+
</plugin>
127+
<plugin>
128+
<groupId>org.apache.maven.plugins</groupId>
129+
<artifactId>maven-dependency-plugin</artifactId>
130+
<executions>
131+
<execution>
132+
<id>copy-libs</id>
133+
<phase>package</phase>
134+
<goals>
135+
<goal>copy-dependencies</goal>
136+
</goals>
137+
<configuration>
138+
<includeScope>runtime</includeScope>
139+
<overWriteReleases>false</overWriteReleases>
140+
<overWriteSnapshots>true</overWriteSnapshots>
141+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
142+
</configuration>
143+
</execution>
144+
</executions>
145+
</plugin>
146+
</plugins>
85147
</build>
86148
</project>
+8-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
package org.example;
22

3-
import static org.junit.Assert.assertTrue;
3+
import org.junit.jupiter.api.Test;
4+
import org.junit.jupiter.api.extension.ExtendWith;
5+
import org.mockito.junit.jupiter.MockitoExtension;
46

5-
import org.junit.Test;
7+
import static org.junit.jupiter.api.Assertions.assertTrue;
68

79
/**
810
* Unit test for simple App.
911
*/
10-
public class AppImplTest
11-
{
12+
@ExtendWith(MockitoExtension.class)
13+
class AppImplTest {
1214
/**
1315
* Rigorous Test :-)
1416
*/
1517
@Test
16-
public void shouldAnswerWithTrue()
17-
{
18-
assertTrue( true );
18+
void shouldAnswerWithTrue() {
19+
assertTrue(true);
1920
}
2021
}

0 commit comments

Comments
 (0)