summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/env/pom.xml2
-rw-r--r--misc/log4j/pom.xml2
-rw-r--r--misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java7
-rw-r--r--misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java13
-rw-r--r--misc/pom.xml4
-rw-r--r--misc/rosetta/pom.xml13
-rw-r--r--misc/xgen/pom.xml2
7 files changed, 16 insertions, 27 deletions
diff --git a/misc/env/pom.xml b/misc/env/pom.xml
index d1e3ad95..9a725b9f 100644
--- a/misc/env/pom.xml
+++ b/misc/env/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>miscparent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
diff --git a/misc/log4j/pom.xml b/misc/log4j/pom.xml
index 31d8f9f5..ed277b29 100644
--- a/misc/log4j/pom.xml
+++ b/misc/log4j/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>miscparent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
diff --git a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
index a98ba7c0..c6537deb 100644
--- a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
+++ b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
@@ -59,15 +59,14 @@ public class LogFileNamer {
* @throws IOException
*/
public String setAppender(String appender) throws IOException {
- String filename;
int i = 0;
File f;
- while ((f = new File(filename = String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {
+ while ((f = new File(String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {
++i;
}
- ;
+
f.createNewFile();
- System.setProperty("LOG4J_FILENAME_" + appender, filename);
+ System.setProperty("LOG4J_FILENAME_" + appender, f.getCanonicalPath());
return appender;
}
diff --git a/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java b/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
index 0ee79a5f..b96d6dd0 100644
--- a/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
+++ b/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
@@ -34,6 +34,7 @@ import org.junit.Before;
import org.junit.Test;
public class JU_LogFileNamerTest {
+ private File dir = new File(".");
private String ending = new SimpleDateFormat("YYYYMMdd").format(new Date());
@@ -43,26 +44,26 @@ public class JU_LogFileNamerTest {
@Test
public void test() throws IOException {
- LogFileNamer logFileNamer = new LogFileNamer(".", "log");
+ LogFileNamer logFileNamer = new LogFileNamer(dir.getCanonicalPath(), "log");
assertEquals(logFileNamer, logFileNamer.noPID());
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./log-Append" + ending + "_0.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalFile()+"/log-Append" + ending + "_0.log");
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./log-Append" + ending + "_1.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalFile()+"/log-Append" + ending + "_1.log");
}
@Test
public void testBlankRoot() throws IOException {
- LogFileNamer logFileNamer = new LogFileNamer(".", "");
+ LogFileNamer logFileNamer = new LogFileNamer(dir.getCanonicalPath(), "");
assertEquals(logFileNamer, logFileNamer.noPID());
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./Append" + ending + "_0.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalPath()+"/Append" + ending + "_0.log");
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./Append" + ending + "_1.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalPath()+"/Append" + ending + "_1.log");
}
@After
diff --git a/misc/pom.xml b/misc/pom.xml
index d35dd721..a4945a67 100644
--- a/misc/pom.xml
+++ b/misc/pom.xml
@@ -25,12 +25,12 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>parent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>miscparent</artifactId>
<name>AAF Misc Parent</name>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<packaging>pom</packaging>
diff --git a/misc/rosetta/pom.xml b/misc/rosetta/pom.xml
index efd1c2fa..78ee5c9c 100644
--- a/misc/rosetta/pom.xml
+++ b/misc/rosetta/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>miscparent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
@@ -110,7 +110,6 @@
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
@@ -135,7 +134,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <version>2.4</version>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<outputDirectory>target</outputDirectory>
@@ -151,7 +149,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10</version>
<configuration>
<excludePackageNames>org.opendaylight.*</excludePackageNames>
</configuration>
@@ -159,7 +156,6 @@
<plugin>
<artifactId>maven-release-plugin</artifactId>
- <version>2.5.2</version>
<configuration>
<goals>-s ${mvn.settings} deploy</goals>
</configuration>
@@ -167,13 +163,11 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
- <version>2.8.1</version>
<configuration>
<skip>false</skip>
</configuration>
@@ -183,13 +177,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
</plugin>
<!-- Maven surefire plugin for testing -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
<configuration>
<skipTests>false</skipTests>
<includes>
@@ -205,7 +197,6 @@
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
@@ -235,7 +226,6 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
- <version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<nexusUrl>${nexusproxy}</nexusUrl>
@@ -246,7 +236,6 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>**/gen/**</exclude>
diff --git a/misc/xgen/pom.xml b/misc/xgen/pom.xml
index 8aa12fa8..083c0dc2 100644
--- a/misc/xgen/pom.xml
+++ b/misc/xgen/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>miscparent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>