@@ -67,7 +67,11 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
6767 <archive >
6868 <manifest >
6969 <mainClass >org.owasp.dependencycheck.App</mainClass >
70+ <addClasspath >true</addClasspath >
7071 </manifest >
72+ <manifestEntries >
73+ <Premain-Class >org.owasp.dependencycheck.PluginLoader</Premain-Class >
74+ </manifestEntries >
7175 </archive >
7276 </configuration >
7377 </plugin >
@@ -79,6 +83,11 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
7983 <program >
8084 <mainClass >org.owasp.dependencycheck.App</mainClass >
8185 <id >dependency-check</id >
86+ <commandLineArguments >
87+ <commandLineArgument >-javaagent:@REPO@/${project.artifactId} -${project.version} .jar=@BASEDIR@/plugins</commandLineArgument >
88+ <commandLineArgument >-jar</commandLineArgument >
89+ <commandLineArgument >@REPO@/${project.artifactId} -${project.version} .jar</commandLineArgument >
90+ </commandLineArguments >
8291 </program >
8392 </programs >
8493 <assembleDirectory >${project.build.directory} /release</assembleDirectory >
@@ -88,10 +97,8 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
8897 </binFileExtensions >
8998 <repositoryLayout >flat</repositoryLayout >
9099 <repositoryName >lib</repositoryName >
91- <useWildcardClassPath >true</useWildcardClassPath >
92- <configurationDirectory >plugins/*</configurationDirectory >
93- <includeConfigurationDirectoryInClasspath >true</includeConfigurationDirectoryInClasspath >
94- <unixScriptTemplate >${project.basedir} /src/main/conf/unixBinTemplate</unixScriptTemplate >
100+ <unixScriptTemplate >${project.basedir} /src/main/conf/unixBinTemplate.sh</unixScriptTemplate >
101+ <windowsScriptTemplate >${project.basedir} /src/main/conf/windowsBinTemplate.bat</windowsScriptTemplate >
95102 <!--
96103 enable-native-access=ALL-UNNAMED
97104 Java 21+: Needed by Lucene indexes unless we do -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false
@@ -110,25 +117,6 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
110117 </execution >
111118 </executions >
112119 </plugin >
113- <plugin >
114- <groupId >org.apache.maven.plugins</groupId >
115- <artifactId >maven-antrun-plugin</artifactId >
116- <executions >
117- <execution >
118- <id >fix-windows-shell-script</id >
119- <phase >package</phase >
120- <goals >
121- <goal >run</goal >
122- </goals >
123- <configuration >
124- <!-- Hack/workaround for https://github.com/mojohaus/appassembler/issues/114 -->
125- <target >
126- <replace file =" ${project.build.directory}/release/bin/dependency-check.bat" token =" %JAVACMD% %JAVA_OPTS%" value =" " %JAVACMD%" %JAVA_OPTS%" failOnNoReplacements =" true" />
127- </target >
128- </configuration >
129- </execution >
130- </executions >
131- </plugin >
132120 <plugin >
133121 <groupId >org.apache.maven.plugins</groupId >
134122 <artifactId >maven-assembly-plugin</artifactId >
@@ -179,10 +167,6 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
179167 <groupId >org.slf4j</groupId >
180168 <artifactId >slf4j-api</artifactId >
181169 </dependency >
182- <dependency >
183- <groupId >io.github.jeremylong</groupId >
184- <artifactId >jcs3-slf4j</artifactId >
185- </dependency >
186170 <dependency >
187171 <!-- not visible in imports due to method chaining, but App code uses classes from this library -->
188172 <groupId >io.github.jeremylong</groupId >
@@ -202,5 +186,10 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
202186 </exclusion >
203187 </exclusions >
204188 </dependency >
189+ <dependency >
190+ <groupId >org.mockito</groupId >
191+ <artifactId >mockito-core</artifactId >
192+ <scope >test</scope >
193+ </dependency >
205194 </dependencies >
206195</project >
0 commit comments