mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
remove unused methods and dependency on solr 4.9.1
This commit is contained in:
parent
1b46a77fa1
commit
7e2ac8e126
25
.gitignore
vendored
25
.gitignore
vendored
@ -4,19 +4,25 @@
|
||||
*/nbproject/private/*
|
||||
/nbproject/private/*
|
||||
|
||||
/Core/release/
|
||||
/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties
|
||||
/Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
|
||||
/Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
|
||||
/Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
|
||||
/Core/build/
|
||||
/Core/dist/
|
||||
/Core/nbproject/*
|
||||
!/Core/nbproject/project.xml
|
||||
!/Core/nbproject/project.properties
|
||||
|
||||
/CoreLibs/release/
|
||||
/CoreLibs/build/
|
||||
/CoreLibs/dist/
|
||||
/CoreLibs/nbproject/*
|
||||
!/CoreLibs/nbproject/project.xml
|
||||
!/CoreLibs/nbproject/project.properties
|
||||
|
||||
/KeywordSearch/release/
|
||||
/KeywordSearch/build/
|
||||
/KeywordSearch/dist/
|
||||
/KeywordSearch/nbproject/*
|
||||
@ -25,6 +31,7 @@
|
||||
|
||||
*/genfiles.properties
|
||||
genfiles.properties
|
||||
|
||||
/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
|
||||
/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
|
||||
/branding/build/
|
||||
@ -32,6 +39,7 @@ genfiles.properties
|
||||
/branding/nbproject/*
|
||||
!/branding/nbproject/project.xml
|
||||
!/branding/nbproject/project.properties
|
||||
|
||||
/test/input/*
|
||||
!/test/input/notablehashes.txt-md5.idx
|
||||
!/test/input/notablekeywords.xml
|
||||
@ -46,6 +54,8 @@ genfiles.properties
|
||||
/test/script/DBDump.txt
|
||||
/test/script/SortedData-Diff.txt
|
||||
/test/script/SortedData.txt
|
||||
/test/script/myconfig.xml
|
||||
/test/script/*/*.xml
|
||||
/test/build/
|
||||
/test/dist/
|
||||
/test/nbproject/*
|
||||
@ -59,19 +69,10 @@ genfiles.properties
|
||||
/jdiff-logs/*
|
||||
/gen_version.txt
|
||||
hs_err_pid*.log
|
||||
Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
|
||||
Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
|
||||
Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
|
||||
/test/script/myconfig.xml
|
||||
/test/script/*/*.xml
|
||||
.DS_Store
|
||||
.*.swp
|
||||
|
||||
/Experimental/release/
|
||||
/ImageGallery/release/
|
||||
/thunderbirdparser/release/
|
||||
|
||||
|
||||
Core/release/
|
||||
CoreLibs/release/
|
||||
Experimental/release/
|
||||
ImageGallery/release/
|
||||
KeywordSearch/release/
|
||||
thunderbirdparser/release/
|
||||
|
@ -6,17 +6,19 @@
|
||||
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.experimental.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<import file="../BootstrapIvy.xml"/>
|
||||
<target name="init" depends="basic-init,files-init,build-init,-javac-init,init-ivy">
|
||||
|
||||
<target name="get-deps" depends="init-ivy">
|
||||
<ivy:settings file="ivysettings.xml" />
|
||||
<ivy:resolve/>
|
||||
<ivy:retrieve sync="false" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
<ivy:retrieve conf="experimental" pattern="${basedir}/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" />
|
||||
</target>
|
||||
|
||||
<target name="init" depends="get-deps, harness.init" />
|
||||
|
||||
<target name="clean" depends="projectized-common.clean">
|
||||
<!--Override clean to delete jars, etc downloaded with Ivy
|
||||
or copied in from thirdparty folder. This way we don't end up with
|
||||
out-of-date/unneeded stuff in the installer-->
|
||||
<mkdir dir="${basedir}/release"/>
|
||||
<delete dir="${basedir}/release"/>
|
||||
</target>
|
||||
</project>
|
||||
|
@ -7,16 +7,10 @@
|
||||
</configurations>
|
||||
<dependencies>
|
||||
<dependency conf="experimental->default" org="com.github.lgooddatepicker" name="LGoodDatePicker" rev="4.3.1"/>
|
||||
<dependency conf="experimental->default" org="org.apache.solr" name="solr-solrj" rev="4.9.1"/>
|
||||
<dependency conf="experimental->default" org="org.apache.tika" name="tika-core" rev="1.5"/>
|
||||
<dependency conf="experimental->default" org="org.postgresql" name="postgresql" rev="9.4-1201-jdbc41"/>
|
||||
<dependency conf="experimental->default" org="com.mchange" name="c3p0" rev="0.9.5"/>
|
||||
<dependency conf="experimental->default" org="com.fasterxml.jackson.core" name="jackson-core" rev="2.7.0"/>
|
||||
<dependency conf="experimental->default" org="org.swinglabs.swingx" name="swingx-all" rev="1.6.4"/>
|
||||
<exclude artifact="commons-io"/>
|
||||
<exclude artifact="slf4j-api"/>
|
||||
<exclude artifact="wstx-asl"/>
|
||||
<exclude artifact="zookeeper"/>
|
||||
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
@ -2,11 +2,9 @@ file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar
|
||||
file.reference.jackson-core-2.7.0.jar=release/modules/ext/jackson-core-2.7.0.jar
|
||||
file.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1.jar
|
||||
file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar
|
||||
file.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1.jar
|
||||
file.reference.postgresql-9.4-1201-jdbc41.jar=release/modules/ext/postgresql-9.4-1201-jdbc41.jar
|
||||
file.reference.tika-core-1.5.jar=release/modules/ext/tika-core-1.5.jar
|
||||
javac.source=1.8
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
javadoc.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-javadoc.jar
|
||||
javadoc.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-javadoc.jar
|
||||
source.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-sources.jar
|
||||
source.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-sources.jar
|
||||
|
@ -119,6 +119,10 @@
|
||||
<package>org.sleuthkit.autopsy.experimental.autoingest</package>
|
||||
<package>org.sleuthkit.autopsy.experimental.configuration</package>
|
||||
</public-packages>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-9.4-1201-jdbc41.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/postgresql-9.4-1201-jdbc41.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/mchange-commons-java-0.2.9.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/mchange-commons-java-0.2.9.jar</binary-origin>
|
||||
@ -139,30 +143,6 @@
|
||||
<runtime-relative-path>ext/c3p0-0.9.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/c3p0-0.9.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/solr-solrj-4.9.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/solr-solrj-4.9.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpclient-4.3.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpclient-4.3.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpmime-4.3.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpmime-4.3.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpcore-4.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/httpcore-4.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/noggit-0.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/noggit-0.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-9.4-1201-jdbc41.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/postgresql-9.4-1201-jdbc41.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
|
@ -32,10 +32,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
@ -64,7 +61,6 @@ import java.util.stream.Collectors;
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
import org.apache.solr.client.solrj.impl.HttpSolrServer;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
|
||||
@ -77,7 +73,6 @@ import org.sleuthkit.autopsy.coordinationservice.CoordinationService.Lock;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.core.ServicesMonitor;
|
||||
import org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitorException;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.core.UserPreferencesException;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult;
|
||||
@ -106,7 +101,6 @@ import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobStartResult;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleError;
|
||||
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
@ -781,44 +775,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to unload the Solr core for a case.
|
||||
*
|
||||
* @param caseName The case name.
|
||||
* @param coreName The name of the core to unload.
|
||||
*
|
||||
* @throws Exception if there is a problem unloading the core or it has
|
||||
* already been unloaded (e.g., by the server due to
|
||||
* resource constraints), or there is a problem deleting
|
||||
* files associated with the core
|
||||
*/
|
||||
private void unloadSolrCore(String coreName) throws Exception {
|
||||
/*
|
||||
* Send a core unload request to the Solr server, with the parameters
|
||||
* that request deleting the index and the instance directory
|
||||
* (deleteInstanceDir removes everything related to the core, the index
|
||||
* directory, the configuration files, etc.) set to true.
|
||||
*/
|
||||
String url = "http://" + UserPreferences.getIndexingServerHost() + ":" + UserPreferences.getIndexingServerPort() + "/solr";
|
||||
HttpSolrServer solrServer = new HttpSolrServer(url);
|
||||
org.apache.solr.client.solrj.request.CoreAdminRequest.unloadCore(coreName, true, true, solrServer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to delete the case database for a case.
|
||||
*
|
||||
* @param caseFolderPath The case name.
|
||||
* @param caseDatbaseName The case database name.
|
||||
*/
|
||||
private void deleteCaseDatabase(String caseDatbaseName) throws UserPreferencesException, ClassNotFoundException, SQLException {
|
||||
CaseDbConnectionInfo db = UserPreferences.getDatabaseConnectionInfo();
|
||||
Class.forName("org.postgresql.Driver"); //NON-NLS
|
||||
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://" + db.getHost() + ":" + db.getPort() + "/postgres", db.getUserName(), db.getPassword()); //NON-NLS
|
||||
Statement statement = connection.createStatement();) {
|
||||
String deleteCommand = "DROP DATABASE \"" + caseDatbaseName + "\""; //NON-NLS
|
||||
statement.execute(deleteCommand);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a set of auto ingest jobs from a collection of jobs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user