diff --git a/README.md b/README.md
index 87c6bc2..bfef635 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
- Version 2.0.1 with Maven 3.0.5 [![Dependency Status](http://www.versioneye.com/user/projects/5379ad3f14c158ccc700002d/badge.svg?style=flat)](http://www.versioneye.com/user/projects/5379ad3f14c158ccc700002d)
-- Version 3.10.0 with Maven 3.3.9 [![Dependency Status](https://www.versioneye.com/user/projects/544d0ff9512592562c000003/badge.svg?style=flat)](https://www.versioneye.com/user/projects/544d0ff9512592562c000003)
+- Version 3.10.1 with Maven 3.3.9 [![Dependency Status](https://www.versioneye.com/user/projects/544d0ff9512592562c000003/badge.svg?style=flat)](https://www.versioneye.com/user/projects/544d0ff9512592562c000003)
[![VersionEye Dependencies](src/site/images/VersionEyeLogo.png)](https://www.versioneye.com)
@@ -43,7 +43,7 @@ You can add the plugin to your project by adding this snippet to your
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
@@ -138,7 +138,7 @@ Now let the versioneye-maven-plugin know what your *API KEY* is.
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
MY_SECRET_API_KEY
@@ -173,7 +173,7 @@ If you want so you can configure another place for the versioneye.properties fil
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
${basedir}/versioneye.properties
@@ -238,7 +238,7 @@ By the way. If you don't like to have a `versioneye.properties` file you can set
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
_YOUR_VERSONEYE_PROJECT_ID_
@@ -298,7 +298,7 @@ If you are behind a proxy server you can configure the plugin for that like this
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
127.0.0.1
8888
@@ -326,7 +326,7 @@ The whole plugin snippet would look similar to this one.
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
http://versioneye.my-company.com
_YOUR_VERSONEYE_PROJECT_ID_
@@ -346,7 +346,7 @@ Assume you have a big Java Enterprise multi-module project with Maven and you wa
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
MY_SECRET_API_KEY
@@ -383,7 +383,7 @@ The VersionEye Maven Plugin has many configuration options.
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
544d0ff9512592562c000003
diff --git a/pom.xml b/pom.xml
index 317bde7..8156b65 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
maven-plugin
versioneye-maven-plugin
@@ -113,7 +113,7 @@
com.versioneye
versioneye-maven-plugin
- 3.10.0
+ 3.10.1
@@ -148,7 +148,6 @@
-
diff --git a/src/main/java/com/versioneye/SuperMojo.java b/src/main/java/com/versioneye/SuperMojo.java
index 9093d46..fede42a 100644
--- a/src/main/java/com/versioneye/SuperMojo.java
+++ b/src/main/java/com/versioneye/SuperMojo.java
@@ -155,20 +155,29 @@ protected String fetchProjectId() throws Exception {
if (projectId != null && !projectId.isEmpty() )
return projectId;
- propertiesPath = projectDirectory + "/src/qa/resources/" + propertiesFile;
- String project_id = getPropertyFromPath(propertiesPath, "project_id");
+ if (propertiesPath != null && !propertiesPath.isEmpty()){
+ String project_id = getPropertyFromPath(propertiesPath, "project_id");
+ if (project_id != null && !project_id.isEmpty()){
+ projectId = project_id;
+ }
+ }
+
+ String pPath1 = projectDirectory + "/src/qa/resources/" + propertiesFile;
+ String project_id = getPropertyFromPath(pPath1, "project_id");
if (project_id != null && !project_id.isEmpty()){
projectId = project_id;
+ propertiesPath = pPath1;
}
- propertiesPath = projectDirectory + "/src/main/resources/" + propertiesFile;
- project_id = getPropertyFromPath(propertiesPath, "project_id");
+ String pPath2 = projectDirectory + "/src/main/resources/" + propertiesFile;
+ project_id = getPropertyFromPath(pPath2, "project_id");
if (project_id != null && !project_id.isEmpty()){
projectId = project_id;
+ propertiesPath = pPath2;
}
if (projectId == null || projectId.isEmpty()){
- String msg = "versioneye.properties found but without project_id! Read the instructions at https://github.com/versioneye/versioneye_maven_plugin";
+ String msg = "Searched in " + pPath1 + " and " + pPath2 + " for project_id but could't find any. Read the instructions at https://github.com/versioneye/versioneye_maven_plugin";
getLog().error(msg);
throw new MojoExecutionException(msg);
}
@@ -292,6 +301,8 @@ private String getPropertyFromPath(String propertiesPath, String propertiesKey )
PropertiesUtils propertiesUtils = new PropertiesUtils();
Properties homeProperties = propertiesUtils.readProperties(propertiesPath);
return homeProperties.getProperty(propertiesKey);
+ } else {
+ getLog().info("File " + propertiesPath + " does not exist");
}
return null;
}