Skip to content

Commit

Permalink
#2851 Remove plugin directory handling and cleanup plugin-related tas…
Browse files Browse the repository at this point in the history
…ks in build and resource utility files.
  • Loading branch information
marevol committed Oct 24, 2024
1 parent 160dd6e commit 5fdafb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
24 changes: 5 additions & 19 deletions deps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<mkdir dir="${target.dir}" />
<delete dir="${webinf.dir}/lib" />
<mkdir dir="${webinf.dir}/lib" />
<delete dir="${webinf.dir}/plugin" />
<mkdir dir="${webinf.dir}/plugin" />
<delete dir="${crawler.dir}/lib" />
<mkdir dir="${crawler.dir}/lib" />
<delete dir="${suggest.dir}/lib" />
Expand All @@ -43,15 +41,11 @@
</patternset>
<cutdirsmapper dirs="2" />
</unzip>
<!--
<antcall target="install.plugin.jar">
<param name="repo.url" value="${maven.snapshot.repo.url}" />
<param name="jar.groupId" value="org/codelibs/fess" />
<param name="jar.artifactId" value="fess-script-ognl" />
<param name="jar.version" value="15.0.0" />
<param name="file.version" value="15.0.0" />
</antcall>
-->
<delete>
<fileset dir="${webinf.dir}/plugin">
<include name="**/*.jar" />
</fileset>
</delete>
</target>

<target name="install.env.jar">
Expand All @@ -65,12 +59,4 @@
<copy file="${target.dir}/${jar.artifactId}-${file.version}.jar"
todir="${thumbnail.dir}/lib"/>
</target>

<target name="install.plugin.jar">
<get dest="${target.dir}">
<url url="${repo.url}/${jar.groupId}/${jar.artifactId}/${jar.version}/${jar.artifactId}-${file.version}.jar" />
</get>
<copy file="${target.dir}/${jar.artifactId}-${file.version}.jar"
todir="${webinf.dir}/plugin"/>
</target>
</project>
10 changes: 1 addition & 9 deletions src/main/java/org/codelibs/fess/util/ResourceUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,7 @@ public static File[] getPluginJarFiles(final String namePrefix) {
}

public static File[] getPluginJarFiles(final FilenameFilter filter) {
final ServletContext context = LaServletContextUtil.getServletContext();
if (context == null) {
return new File[0];
}
final String libPath = context.getRealPath("/WEB-INF/plugin");
if (StringUtil.isBlank(libPath)) {
return new File[0];
}
final File libDir = new File(libPath);
final File libDir =getPluginPath().toFile();
if (!libDir.exists()) {
return new File[0];
}
Expand Down

0 comments on commit 5fdafb7

Please sign in to comment.