Skip to content

Commit b74fd74

Browse files
committed
New EasyKey.maven functions
1 parent b0341d6 commit b74fd74

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

EasyKey.maven/ezk-maven-functions.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
mvnCleanEclipse(){
24
mvn clean:clean
35
mvn eclipse:clean
@@ -41,3 +43,25 @@ downLoadSources() {
4143
mvn eclipse:eclipse -DdownloadSources=true
4244
}
4345

46+
toRepo() {
47+
repo=$(mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]')
48+
cd "$repo"
49+
echo "Now in: $(pwd)"
50+
exit
51+
}
52+
53+
newProject() {
54+
echo "Command expects the user to be in the new cloned repo folder. <taste drücken>"
55+
read
56+
echo "Project name?"
57+
read projektname
58+
mvn archetype:generate -DartifactId=$projektname \
59+
-DinteractiveMode=true
60+
mv $projektname/* .
61+
rm -rf $projektname/
62+
mvn compile
63+
mvn eclipse:eclipse
64+
git status > .gitignore
65+
vim .gitignore
66+
break
67+
}

EasyKey.maven/maven.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66

77
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
88
source "$script_dir/../shellmenu.sh"
9-
source "$script_dir/ezk-mavem-functions.sh"
9+
source "$script_dir/ezk-maven-functions.sh"
1010

1111
menuInit "Super MAVEN Home"
1212
submenuHead "Maven:"
1313
menuItemClm a "Clean all eclipse" "mvnCleanEclipse" b "Maven analyze dependencies" "mvn dependency:analyze"
14-
menuItemClm c "Clean install force updates" "mvn clean install -U -DskipTests" d "To maven repo" tbd
14+
menuItemClm c "Clean install force updates" "mvn clean install -U -DskipTests" d "To maven repo" toRepo
1515
menuItemClm e "Show effective settings" "mvn help:effective-settings" f "Local repo location" "mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'"
1616
menuItemClm g "Show global settings" showGlobalSettings h "Show local settings" showLocalSettings
1717
menuItemClm i "Re-resolve project dependencies" "mvn dependency:purge-local-repository" j "List repositories" "mvn dependency:list-repositories"
1818
menuItemClm k "Download sources" downLoadSources l "Build with deps" "mvn clean compile assembly:single"
19+
menuItem m "New project from archetype" newProject
1920
submenuHead "Spring-Boot:"
20-
menuItem j "Start Spring Boot App" startSpringBoot
21+
menuItem o "Start Spring Boot App" startSpringBoot
2122
startMenu

0 commit comments

Comments
 (0)