*.jar
*.tar.gz
/target/
-/src/test/data/*~
-/src/test/data/*.log
-/src/test/data/cameradata/
-/src/test/data/output
-!/src/test/data/*.tar.gz
+/src/test/resources/*~
+/src/test/resources/*.log
nb*.xml
Thumbs.db
/nbproject/
+/.externalToolBuilders/
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>osm.surveyor</groupId>
<artifactId>AdjustTime</artifactId>
<connection>scm:git:http://surveyor.mydns.jp/gitbucket/git/yuu/AdjustTime.git</connection>
<url>http://surveyor.mydns.jp/gitbucket/yuu/AdjustTime/wiki</url>
<developerConnection>scm:git:http://surveyor.mydns.jp/gitbucket/git/yuu/AdjustTime.git</developerConnection>
- <tag>HEAD</tag>
+ <tag>v5.3.5</tag>
</scm>
<properties>
<repositories>
<repository>
+ <id>surveyor.mirror</id>
+ <name>Hayashi Repository</name>
+ <url>http://surveyor.mydns.jp/archiva/repository/mirror/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
<id>surveyor.haya4</id>
<name>Hayashi Repository</name>
<url>http://surveyor.mydns.jp/archiva/repository/haya4/</url>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
+
+ <pluginRepository>
+ <id>sonatype-public-repository</id>
+ <url>https://oss.sonatype.org/content/groups/public</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+
+ <pluginRepository>
+ <id>com.googlecode.maven-download-plugin</id>
+ <url>https://mvnrepository.com/artifact</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
</pluginRepositories>
<dependencies>
+ <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-imaging -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
- <version>1.0-alpha1</version>
+ <version>1.0-alpha2</version>
+ <type>jar</type>
+ </dependency>
+
+ <!-- https://mvnrepository.com/artifact/org.codehaus.plexus/plexus-utils -->
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.5</version>
+ <scope>test</scope>
<type>jar</type>
</dependency>
<scope>test</scope>
<type>jar</type>
</dependency>
+
+ <!-- https://mvnrepository.com/artifact/com.googlecode.maven-download-plugin/download-maven-plugin -->
+ <dependency>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>download-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <scope>test</scope>
+ <type>jar</type>
+ </dependency>
+
</dependencies>
<build>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>3.0.24</version>
+ <version>3.0.5</version>
+ </plugin>
+
+ <!-- mvn generate-test-resources:get -->
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>download-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>install-Sony20170518</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://surveyor.mydns.jp/data/Sony20170518.tar.gz</url>
+ <unpack>false</unpack>
+ <outputDirectory>${project.build.directory}/test-classes/imgdata</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-WiMiUS20170518</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://surveyor.mydns.jp/data/WiMiUS20170518.tar.gz</url>
+ <unpack>false</unpack>
+ <outputDirectory>${project.build.directory}/test-classes/imgdata</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-separate</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://surveyor.mydns.jp/data/separate.tar.gz</url>
+ <unpack>false</unpack>
+ <outputDirectory>${project.build.directory}/test-classes/imgdata</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<!-- mvn deploy -->
else if (gpxDir.isDirectory()) {
// 指定されたディレクトリ内のGPXファイルすべてを対象とする
gpxfiles = gpxDir.listFiles(new GpxFileFilter());
- if (gpxfiles == null) {
+ if ((gpxfiles == null) || (gpxfiles.length < 1)) {
// 対象となるGPXファイルがありませんでした。('%s')
throw new FileNotFoundException(
String.format(ImportPicture.i18n.getString("msg.110"), gpxDir.getAbsolutePath())
),
// 2
new Fixture(
+
"[A2].SONYカメラの場合.FILE_UPDATE時間を基準にして時間外のファイルもコピーする時",
"target/test-classes/imgdata/Sony20170518.tar.gz",
"target/test-classes/cameradata/20170518.gpx",
new Expecter("cameradata/20170518_094827A.jpg", true, "2017:05:18 09:48:26", 90.0D, 180.0D, null),
}
),
+ /*
// 5.
new Fixture(
"[M1a].GPXが複数のTRKSEGに分割している場合.FILE_UPDATE時間を基準.GarminColorado",
new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 10:41:19", 35.8339846227D, 138.0625408050D, "345"),
}
),
+ */
};
//public static Fixture[] stddatas;
UnZip.uncompress(new File(dataset.tarFilePath), new File("target/test-classes/cameradata"));
// GPXファイルをセット
- try (FileInputStream inStream = new FileInputStream(new File(dataset.gpxSourcePath));
- FileOutputStream outStream = new FileOutputStream(new File(dataset.gpxDestinationPath));
- FileChannel inChannel = inStream.getChannel();
- FileChannel outChannel = outStream.getChannel())
- {
- inChannel.transferTo(0, inChannel.size(), outChannel);
- }
+ //copy(new File(dataset.gpxSourcePath), new File(dataset.gpxDestinationPath));
+ }
+
+ void copy(File source, File dest) throws IOException {
+ if (source.isDirectory()) {
+ File[] files = source.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ File file = files[i];
+ copy(file, dest);
+ }
+ }
+ else {
+ try (FileInputStream inStream = new FileInputStream(source);
+ FileOutputStream outStream = new FileOutputStream(dest);
+ FileChannel inChannel = inStream.getChannel();
+ FileChannel outChannel = outStream.getChannel())
+ {
+ inChannel.transferTo(0, inChannel.size(), outChannel);
+ }
+ }
}
/**
GPX.OVERWRITE_MAGVAR=false
GPX.REUSE=false
IMG.SOURCE_FOLDER=target/test-classes/cameradata/10170518
-GPX.SOURCE_FOLDER=target/test-classes/cameradata
+GPX.SOURCE_FOLDER=target/test-classes/gpx/20170518.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170518_092031A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/20170518.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/20170518.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output
GPX.REUSE=false
IMG.BASE_FILE=20170529_103146A.jpg
IMG.SOURCE_FOLDER=target/test-classes/cameradata/separate
-GPX.SOURCE_FOLDER=target/test-classes/cameradata/separate.gpx
+GPX.SOURCE_FOLDER=target/test-classes/gpx/separate.gpx
IMG.OUTPUT_FOLDER=target/test-classes/output