Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
February 2014
- 3 participants
- 15 discussions
r3746 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/importexport
by dcosse@users.chorem.org 14 Feb '14
by dcosse@users.chorem.org 14 Feb '14
14 Feb '14
Author: dcosse
Date: 2014-02-14 19:06:21 +0100 (Fri, 14 Feb 2014)
New Revision: 3746
Url: http://chorem.org/projects/lima/repository/revisions/3746
Log:
refs #970 work in progress
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-02-14 14:59:24 UTC (rev 3745)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-02-14 18:06:21 UTC (rev 3746)
@@ -25,6 +25,7 @@
package org.chorem.lima.business.ejb;
+import com.google.common.base.Strings;
import com.lowagie.text.Font;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@@ -45,6 +46,7 @@
import org.chorem.lima.business.api.VatStatementService;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.EntryComparator;
+import org.chorem.lima.business.utils.FormatsEnum;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
@@ -145,112 +147,108 @@
//create pages
for (List<FinancialStatementAmounts> list : listList) {
- String title = list.get(0).getLabel();
- int i = 0;
- int n = list.size();
- printedType ++;
- while (i < n) {
- int j = i + n;
- if (j > n) {
- j = n;
- }
- List<FinancialStatementAmounts> subFinancialStatementAmounts =
- list.subList(i, j);
+ if (!list.isEmpty()){
+ String title = list.get(0).getLabel();
+ int i = 0;
+ int n = list.size();
+ printedType ++;
+ while (i < n) {
- financialReport += constructHeaderTitle(title, beginDate, endDate);
+ financialReport += constructHeaderTitle(title, beginDate, endDate);
- String boldBegin = "<b>";
- String boldEnd = "</b>";
- financialReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" +
- "<tr align=\"center\">\n";
+ String boldBegin = "<b>";
+ String boldEnd = "</b>";
+ financialReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" +
+ "<tr align=\"center\">\n";
- if (printedType == 0) {
- String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.grossamount")+boldEnd,
- boldBegin+_("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+_("lima-business.document.netamount")+boldEnd};
- financialReport += constructTableLine(columnHeaderTable);
- } else if (printedType == 1) {
- String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd};
- financialReport += constructTableLine(columnHeaderTable);
- } else {
- String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd};
- financialReport += constructTableLine(columnHeaderTable);
- }
-
- for (FinancialStatementAmounts financialStatementAmount : subFinancialStatementAmounts) {
-
- String label = financialStatementAmount.getLabel();
- int level = financialStatementAmount.getLevel();
- BigDecimal grossAmount =
- financialStatementAmount.getGrossAmount();
- if (grossAmount == null) {
- grossAmount = new BigDecimal(0);
- }
- BigDecimal provisionDeprecationAmount =
- financialStatementAmount.getProvisionDeprecationAmount();
- if (provisionDeprecationAmount == null) {
- provisionDeprecationAmount = new BigDecimal(0);
- }
-
- String fontColor = "";
- if (financialStatementAmount.getSubAmount() && level == 1) {
- fontColor = "#CCCCCC";
- } else if (financialStatementAmount.getSubAmount()) {
- fontColor = "#C0C0C0";
+ if (printedType == 0) {
+ String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.grossamount")+boldEnd,
+ boldBegin+_("lima-business.document.provisiondeprecationamount")+boldEnd, boldBegin+_("lima-business.document.netamount")+boldEnd};
+ financialReport += constructTableLine(columnHeaderTable);
+ } else if (printedType == 1) {
+ String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd};
+ financialReport += constructTableLine(columnHeaderTable);
} else {
- fontColor = "#999999";
+ String[] columnHeaderTable = {boldBegin+_("lima-business.document.label")+boldEnd, boldBegin+_("lima-business.document.amount")+boldEnd};
+ financialReport += constructTableLine(columnHeaderTable);
}
- if (label == null) {
- if (printedType == 0) {
- String [] emptyColumn = {"","","",""};
- financialReport += constructTableLine(emptyColumn);
- } else {
- String [] emptyColumn = {"", ""};
- financialReport += constructTableLine(emptyColumn);
+
+ for (FinancialStatementAmounts financialStatementAmount : list) {
+
+ String label = financialStatementAmount.getLabel();
+ int level = financialStatementAmount.getLevel();
+ BigDecimal grossAmount =
+ financialStatementAmount.getGrossAmount();
+ if (grossAmount == null) {
+ grossAmount = new BigDecimal(0);
}
- } else {
- //cell1
- StringBuilder tab = new StringBuilder();
- for (int k = 0; k < level; k++) {
- tab.append("\t");
+ BigDecimal provisionDeprecationAmount =
+ financialStatementAmount.getProvisionDeprecationAmount();
+ if (provisionDeprecationAmount == null) {
+ provisionDeprecationAmount = new BigDecimal(0);
}
- //Phrase phrase;
- String tabLabel = "";
- if (financialStatementAmount.getHeader()) {
- tabLabel = boldBegin + tab + label + boldEnd;
+
+ String fontColor = "";
+ if (financialStatementAmount.getSubAmount() && level == 1) {
+ fontColor = "#CCCCCC";
+ } else if (financialStatementAmount.getSubAmount()) {
+ fontColor = "#C0C0C0";
} else {
- tabLabel = tab + label;
+ fontColor = "#999999";
}
- //cell2
- String grossAmountStr = "";
- if (!grossAmount.equals(BigDecimal.ZERO)) {
- grossAmountStr = grossAmount.toString();
- }
+ if (label == null) {
+ if (printedType == 0) {
+ String [] emptyColumn = {"","","",""};
+ financialReport += constructTableLine(emptyColumn);
+ } else {
+ String [] emptyColumn = {"", ""};
+ financialReport += constructTableLine(emptyColumn);
+ }
+ } else {
+ //cell1
+ StringBuilder tab = new StringBuilder();
+ for (int k = 0; k < level; k++) {
+ tab.append("\t");
+ }
+ //Phrase phrase;
+ String tabLabel = "";
+ if (financialStatementAmount.getHeader()) {
+ tabLabel = boldBegin + tab + label + boldEnd;
+ } else {
+ tabLabel = tab + label;
+ }
+ //cell2
+ String grossAmountStr = "";
+ if (!grossAmount.equals(BigDecimal.ZERO)) {
+ grossAmountStr = grossAmount.toString();
+ }
- //cell 3
- String provisionDeprecationAmountStr = "";
- if (!provisionDeprecationAmount.equals(BigDecimal.ZERO)) {
- provisionDeprecationAmountStr = provisionDeprecationAmount.toString();
- }
+ //cell 3
+ String provisionDeprecationAmountStr = "";
+ if (!provisionDeprecationAmount.equals(BigDecimal.ZERO)) {
+ provisionDeprecationAmountStr = provisionDeprecationAmount.toString();
+ }
- //cell 4
- BigDecimal solde = grossAmount;
- solde = solde.subtract(provisionDeprecationAmount);
- String soldeStr = "";
- if (!solde.equals(BigDecimal.ZERO)) {
- soldeStr = solde.toString();
- }
+ //cell 4
+ BigDecimal solde = grossAmount;
+ solde = solde.subtract(provisionDeprecationAmount);
+ String soldeStr = "";
+ if (!solde.equals(BigDecimal.ZERO)) {
+ soldeStr = solde.toString();
+ }
- if (printedType == 0) {
- String [] columns = {tabLabel, grossAmountStr, provisionDeprecationAmountStr, soldeStr};
- financialReport += constructTableLine(columns);
- } else /*if (printedType == 1)*/ {
- String [] columns = {tabLabel, soldeStr};
- financialReport += constructTableLine(columns);
+ if (printedType == 0) {
+ String [] columns = {tabLabel, grossAmountStr, provisionDeprecationAmountStr, soldeStr};
+ financialReport += constructTableLine(columns);
+ } else /*if (printedType == 1)*/ {
+ String [] columns = {tabLabel, soldeStr};
+ financialReport += constructTableLine(columns);
+ }
}
}
+ i = i + n;
+ financialReport += "</table>";
}
- i = i + n;
- financialReport += "</table>";
}
}
financialReport += "</body>" +
@@ -263,8 +261,6 @@
}
//############## Ledger ##############
-
-
@Override
public String createLedgerDocuments(Date beginDate,
Date endDate) throws LimaException {
@@ -292,31 +288,15 @@
//create pages
int i = 0;
int n = list.size();
- int max = n;
+ boolean even = true;
+ BigDecimal currentAmountDebit = new BigDecimal(0);
+ BigDecimal currentAmountCredit = new BigDecimal(0);
+
while (i < n) {
- int j = i + max;
- if (j > n) {
- j = n;
- }
ledgerReport += constructHeaderTitle(_("lima-business.document.ledger"), beginDate, endDate);
- BigDecimal currentAmountDebit = new BigDecimal(0);
- BigDecimal currentAmountCredit = new BigDecimal(0);
- String accountcarry = "";
-
- List<Object> subList = list.subList(i, j);
-
-
- //backward amounts
- if (n > max ) {
- String [] columnsCarryBack = {boldBegin + accountcarry + boldEnd, boldBegin + _("lima-business.document.carryback") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd};
- ledgerReport += constructTableLine(columnsCarryBack);
- }
-
ledgerReport += "<table align=\"left\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n";
String [] columnsNames = {_("lima-business.document.account"), _("lima-business.document.debit"),
@@ -325,8 +305,8 @@
ledgerReport += "<tbody>\n";
int indexEntry = -1;
- boolean even = true;
- for (Object object : subList) {
+
+ for (Object object : list) {
if (object instanceof ReportsDatas) {
if (indexEntry != -1) {
indexEntry = -1;
@@ -385,43 +365,30 @@
}
}
- for (Object objectList : subList) {
- if (objectList instanceof Entry) {
- Entry entry = (Entry) objectList;
- if (entry.getDebit()) {
- currentAmountDebit = currentAmountDebit.add(entry.getAmount());
- } else {
- currentAmountCredit = currentAmountCredit.add(entry.getAmount());
- }
+ for (Object objectList : list) {
+ if (objectList instanceof Entry) {
+ Entry entry = (Entry) objectList;
+ if (entry.getDebit()) {
+ currentAmountDebit = currentAmountDebit.add(entry.getAmount());
} else {
- ReportsDatas reportsDatas = (ReportsDatas) objectList;
- Account account = reportsDatas.getAccount();
- if (account != null) {
- accountcarry = account.getAccountNumber()
- + " " + account.getLabel() + " ";
- }
+ currentAmountCredit = currentAmountCredit.add(entry.getAmount());
}
+ } else {
+ ReportsDatas reportsDatas = (ReportsDatas) objectList;
}
- //forward amounts
- if (n > max && i <= n - max) {
- String [] columnsTable = {"", boldBegin + _("lima-business.document.carryforward") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd};
- ledgerReport += constructTableLine(columnsTable, even);
- even = !even;
- }
- //final amounts
- if (i >= n - max) {
- String [] columnsTable = { boldBegin + _("lima-business.document.amounts") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd};
- ledgerReport += constructTableLine(columnsTable, even);
- even = !even;
- }
- i = i + max;
+ }
+
+ i = i + n;
}
+ //final amounts
+ String [] columnsTable = { boldBegin + _("lima-business.document.amounts") + boldEnd,
+ boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
+ boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd};
+ ledgerReport += constructTableLine(columnsTable, even);
+
+
ledgerReport += "</tbody></table></body>\n</html>";
- }catch (Exception ex) {
+ } catch (Exception ex) {
log.error("Can't create document", ex);
}
}
@@ -476,13 +443,16 @@
String subTitleSecPart = _("lima-business.document.date") + " : " +
simpleDateFormat.format(closedPeriodicEntryBook.getFinancialPeriod().getBeginDate());
- if (!journal.equals(closedPeriodicEntryBook.getEntryBook().getLabel())) {
- entryBookReport += constructSubTitleHtml(_("lima-business.document.entrybook")
- + " : " + closedPeriodicEntryBook.getEntryBook().getLabel(),
- subTitleSecPart);
- journal = closedPeriodicEntryBook.getEntryBook().getLabel();
- } else {
- entryBookReport += constructSubTitleHtml("", subTitleSecPart);
+ if (closedPeriodicEntryBook.getEntryBook() != null) {
+ String label = Strings.isNullOrEmpty(closedPeriodicEntryBook.getEntryBook().getLabel()) == true ? "-" :closedPeriodicEntryBook.getEntryBook().getLabel();
+ if (!journal.equals(label)) {
+ entryBookReport += constructSubTitleHtml(_("lima-business.document.entrybook")
+ + " : " + label,
+ subTitleSecPart);
+ journal = label;
+ } else {
+ entryBookReport += constructSubTitleHtml("", subTitleSecPart);
+ }
}
entryBookReport += "<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n" +
@@ -546,12 +516,8 @@
int i = 0;
int n = list.size();
+ boolean even = true;
while (i < n) {
- int j = i + n;
- if (j > n) {
- j = n;
- }
- List<ReportsDatas> subList = list.subList(i, j);
balanceReport += constructHeaderTitle(_("lima-business.document.balance"), beginDate, endDate);
@@ -563,18 +529,7 @@
balanceReport += constructTableHeader(columnsNames);
balanceReport += "\t\t<tbody>\n";
- if (n > n) {
- String boldBegin = "<b>";
- String boldEnd = "</b>";
- String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryback") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd};
- balanceReport += constructTableLine(columnsBalanceAmount);
- balanceReport += "</tbody></table>\n";
- }
-
- boolean even = true;
- for (ReportsDatas reportsDatas : subList) {
+ for (ReportsDatas reportsDatas : list) {
String soldeDebit = String.valueOf(reportsDatas.getSoldeDebit() ? reportsDatas.getAmountSolde() : 0);
String soldeCredit = String.valueOf(reportsDatas.getSoldeDebit() ? 0 : reportsDatas.getAmountSolde());
@@ -583,9 +538,7 @@
soldeDebit, soldeCredit};
balanceReport += constructTableLine(columnsBalanceAmount, even);
even = !even;
- }
- for (ReportsDatas reportsDatas : subList) {
currentAmountDebit = currentAmountDebit.add(reportsDatas.getAmountDebit());
currentAmountCredit = currentAmountCredit.add(reportsDatas.getAmountCredit());
if (reportsDatas.getSoldeDebit()) {
@@ -595,30 +548,18 @@
}
}
- if (n > n && i <= n - n) {
- String boldBegin = "<b>";
- String boldEnd = "</b>";
- String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.carryforward") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd};
- balanceReport += constructTableLine(columnsBalanceAmount, even);
- even = !even;
- balanceReport += "</tbody></table>\n";
- }
-
- //final amounts
- if (i >= n - n) {
- String boldBegin = "<b>";
- String boldEnd = "</b>";
- String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd,
- boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
- boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd};
- balanceReport += constructTableLine(columnsBalanceAmount, even);
- even = !even;
- balanceReport += "</tbody></table>\n";
- }
i = i + n;
}
+ //final amounts
+ String boldBegin = "<b>";
+ String boldEnd = "</b>";
+ String [] columnsBalanceAmount = {"", boldBegin + _("lima-business.document.amounts") + boldEnd,
+ boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd,
+ boldBegin + currentSoldeDebit.toString() + boldEnd,boldBegin + currentSoldeCredit.toString() + boldEnd};
+ balanceReport += constructTableLine(columnsBalanceAmount, even);
+ balanceReport += "</tbody></table>\n";
+
+
balanceReport += "</body>\n</html>";
} catch (Exception ex) {
log.error("Can't create document", ex);
@@ -742,7 +683,7 @@
if (!entryBookCode.equals(generalEntryBooksDataInList.getCode())) {
entryBookCode = generalEntryBooksDataInList.getCode();
code = entryBookCode;
- description = generalEntryBooksDataInList.getDescription();
+ description = Strings.isNullOrEmpty(generalEntryBooksDataInList.getDescription()) == true ? "" : generalEntryBooksDataInList.getDescription();
} else {
code = "";
description = "";
@@ -1004,41 +945,43 @@
String boldItalicBegin = "<b>" + "<i>";
String boldItalicEnd = "</i>" + "</b>";
- String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsNameSociety);
+ if (identity != null) {
+ String [] columnsNameSociety = {boldItalicBegin + _("lima-business.document.society") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getName()) ? identity.getName() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsNameSociety);
- String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsDescription);
+ String [] columnsDescription = {boldItalicBegin + _("lima-business.document.description") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getDescription()) ? identity.getDescription() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsDescription);
- String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsAdressOne);
+ String [] columnsAdressOne = {boldItalicBegin + _("lima-business.document.adress") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getAddress()) ? identity.getAddress() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsAdressOne);
- String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsAdressTwo);
+ String [] columnsAdressTwo = {boldItalicBegin + _("lima-business.document.adresssuite") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getAddress2()) ? identity.getAddress2() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsAdressTwo);
- String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsZipCode);
+ String [] columnsZipCode = {boldItalicBegin + _("lima-business.document.zipcode") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getZipCode()) ? identity.getZipCode() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsZipCode);
- String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsCity);
+ String [] columnsCity = {boldItalicBegin + _("lima-business.document.city") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getCity()) ? identity.getCity() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsCity);
- String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") +
- boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"};
- headerTitle += constructTableLine(columnsBusinessNumber);
+ String [] columnsBusinessNumber = {boldItalicBegin + _("lima-business.document.businessnumber") +
+ boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getBusinessNumber()) ? identity.getBusinessNumber() : " - ") + "</i>"};
+ headerTitle += constructTableLine(columnsBusinessNumber);
- String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") +
- boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"};
- headerTitle += constructTableLine(columnsClassifCode);
+ String [] columnsClassifCode = {boldItalicBegin + _("lima-business.document.classificationcode") +
+ boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"};
+ headerTitle += constructTableLine(columnsClassifCode);
- String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd,
- "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", };
- headerTitle += constructTableLine(columnsVatNumber);
+ String [] columnsVatNumber = {boldItalicBegin + _("lima-business.document.vatnumber") + boldItalicEnd,
+ "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>", };
+ headerTitle += constructTableLine(columnsVatNumber);
+ }
String [] columnsPeriodOne = {boldItalicBegin + _("lima-business.document.period1") + boldItalicEnd, "<i>"
+ _("lima-business.document.period1format", beginDate)+ "</i>"};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-02-14 14:59:24 UTC (rev 3745)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-02-14 18:06:21 UTC (rev 3746)
@@ -216,7 +216,7 @@
// display result dialog
if (verboseMode) {
String result = get();
- if (result.equals(null)) {
+ if (Strings.isNullOrEmpty(null)) {
JOptionPane.showMessageDialog(viewComponent, _("lima.ui.importexport.importerror"),
_("lima.ui.importexport.importtitle"), JOptionPane.ERROR_MESSAGE);
1
0
Jenkins build became unstable: lima » Lima :: business #7
by admin+ci-chorem.org@codelutin.com 14 Feb '14
by admin+ci-chorem.org@codelutin.com 14 Feb '14
14 Feb '14
r3745 - in trunk: lima-business/src/main/java/org/chorem/lima/business/accountingrules lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui/importexport
by dcosse@users.chorem.org 14 Feb '14
by dcosse@users.chorem.org 14 Feb '14
14 Feb '14
Author: dcosse
Date: 2014-02-14 15:59:24 +0100 (Fri, 14 Feb 2014)
New Revision: 3745
Url: http://chorem.org/projects/lima/repository/revisions/3745
Log:
les compte comportant des lettres autre que les compte commen?\195?\167ant par 4 sont authoris?\195?\169s
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2014-01-31 16:41:50 UTC (rev 3744)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2014-02-14 14:59:24 UTC (rev 3745)
@@ -69,8 +69,8 @@
// ledger account must be located in 411 account
if (!StringUtils.isNumeric(accountNumber) && !accountNumber.startsWith("4")) {
- throw new LimaBusinessException(_("lima-business.franceaccountingrules.accountnumbernotnumeric",
- account.getAccountNumber()));
+ log.warn(_("lima-business.franceaccountingrules.accountnumbernotnumeric",
+ account.getAccountNumber()));
}
// Check root account starts with 1 to 8
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-01-31 16:41:50 UTC (rev 3744)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2014-02-14 14:59:24 UTC (rev 3745)
@@ -988,10 +988,10 @@
}
protected String constructHeaderTitle(String title, Date beginDate, Date endDate) {
- String headerTitle = "";
+ String headerTitle;
Identity identity = identityService.getIdentity();
- headerTitle += "<table>" +
+ headerTitle = "<table>" +
"<thead> " +
"<tr><th>" + title +
"</th></tr>" +
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-01-31 16:41:50 UTC (rev 3744)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2014-02-14 14:59:24 UTC (rev 3745)
@@ -50,6 +50,7 @@
import javax.swing.JPanel;
import javax.swing.SwingWorker;
+import com.google.common.base.Strings;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -112,11 +113,11 @@
public void importExport(ImportExportEnum importExportMethode, String file, boolean verbose) {
final ImportExportEnum importExportMethodeF = importExportMethode;
encodingEnum = EncodingEnum.UTF8;
- if (file.equals("")) {
+ if (Strings.isNullOrEmpty(file)) {
file = chooseFile(importExportMethode.getImportMode(), importExportMethode);
}
//if export cancel
- if (!file.equals("")) {
+ if (!Strings.isNullOrEmpty(file)) {
final EncodingEnum charset = encodingEnum;
final String filePath = file;
final Boolean verboseMode = verbose;
1
0
See <http://ci-ng.chorem.org/jenkins/job/lima/5/>
------------------------------------------
[...truncated 1823 lines...]
[INFO] [03:15:40.340] Sensor InitialOpenIssuesSensor done: 2 ms
[INFO] [03:15:40.340] Sensor ProfileSensor...
[INFO] [03:15:40.434] Sensor ProfileSensor done: 94 ms
[INFO] [03:15:40.435] Sensor ProfileEventsSensor...
[INFO] [03:15:40.436] Sensor ProfileEventsSensor done: 1 ms
[INFO] [03:15:40.436] Sensor ProjectLinksSensor...
[INFO] [03:15:40.521] Sensor ProjectLinksSensor done: 85 ms
[INFO] [03:15:40.522] Sensor VersionEventsSensor...
[INFO] [03:15:40.527] Sensor VersionEventsSensor done: 5 ms
[INFO] [03:15:40.527] Sensor FileHashSensor...
[INFO] [03:15:40.528] Sensor FileHashSensor done: 1 ms
[INFO] [03:15:40.528] Sensor Maven dependencies...
[INFO] [03:15:40.662] Sensor Maven dependencies done: 134 ms
[INFO] [03:15:40.662] Sensor JaCoCoSensor...
[INFO] [03:15:40.662] Project coverage is set to 0% as no JaCoCo execution data has been dumped: <http://ci-ng.chorem.org/jenkins/job/lima/ws/trunk/lima-business-api/target/…>
[INFO] [03:15:41.038] Sensor JaCoCoSensor done: 376 ms
[INFO] [03:15:41.180] Execute decorators...
[INFO] [03:15:41.723] ------------- Scan Lima :: business
[INFO] [03:15:41.724] Load module settings
[INFO] [03:15:41.855] Quality profile : [name=Sonar way,language=java]
[INFO] [03:15:41.856] Excluded tests:
[INFO] [03:15:41.856] **/package-info.java
[INFO] [03:15:41.860] Index files
[INFO] [03:15:41.893] 65 files indexed
[INFO] [03:15:41.940] Configure Maven plugins
[INFO] [03:15:41.976] JaCoCo agent (version 0.6.3.201306030806) extracted: /tmp/jacocoagent5300693598869337411.jar
[INFO] [03:15:41.976] JVM options: -javaagent:/tmp/jacocoagent5300693598869337411.jar=destfile=target/jacoco.exec,excludes=*_javassist_*
[INFO] [03:15:41.992] Initializer FindbugsMavenInitializer...
[INFO] [03:15:41.992] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [03:15:41.992] Execute maven plugin maven-surefire-plugin...
[INFO] [03:15:41.992] Execute org.apache.maven.plugins:maven-surefire-plugin:2.15:test...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Lima :: business 0.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.656s
[INFO] Finished at: Thu Feb 06 03:15:42 CET 2014
[INFO] Final Memory: 100M/1169M
[INFO] ------------------------------------------------------------------------
[INFO] [03:15:42.359] Execute org.apache.maven.plugins:maven-surefire-plugin:2.15:test done: 367 ms
[ERROR] Unable to execute maven plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lima .............................................. FAILURE [20.666s]
[INFO] Lima :: callao .................................... SKIPPED
[INFO] Lima :: business API .............................. SKIPPED
[INFO] Lima :: business .................................. FAILURE [0.040s]
[INFO] Lima :: Swing ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.334s
[INFO] Finished at: Thu Feb 06 03:15:42 CET 2014
[INFO] Final Memory: 50M/1168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project lima-business: Could not resolve dependencies for project org.chorem.lima:lima-business:jar:0.8-SNAPSHOT: The following artifacts could not be resolved: org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT, org.chorem.lima:lima-business-api:jar:0.8-SNAPSHOT: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project lima-business: Could not resolve dependencies for project org.chorem.lima:lima-business:jar:0.8-SNAPSHOT: The following artifacts could not be resolved: org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT, org.chorem.lima:lima-business-api:jar:0.8-SNAPSHOT: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:85)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecuteMaven3(DefaultMavenPluginExecutor.java:123)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecute(DefaultMavenPluginExecutor.java:107)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:71)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:58)
at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:86)
at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:66)
at org.sonar.batch.phases.PhaseExecutor.executeInitializersPhase(PhaseExecutor.java:162)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:109)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:204)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:104)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:67)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:109)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.chorem.lima:lima-business:jar:0.8-SNAPSHOT: The following artifacts could not be resolved: org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT, org.chorem.lima:lima-business-api:jar:0.8-SNAPSHOT: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 75 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT, org.chorem.lima:lima-business-api:jar:0.8-SNAPSHOT: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 76 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT, org.chorem.lima:lima-business-api:jar:0.8-SNAPSHOT: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 77 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.chorem.lima:lima-callao:jar:0.8-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:232)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:177)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:599)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:518)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436)
... 79 more
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project lima: Can not execute SonarQube analysis: Unable to execute maven plugin: Exception during execution of org.apache.maven.plugins:maven-surefire-plugin:2.15:test -> [Help 2]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project lima: Can not execute SonarQube analysis
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute SonarQube analysis
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:109)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:67)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:109)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute maven plugin
at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:104)
... 23 more
Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:73)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:58)
at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:86)
at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:66)
at org.sonar.batch.phases.PhaseExecutor.executeInitializersPhase(PhaseExecutor.java:162)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:109)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:204)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
... 24 more
Caused by: org.sonar.api.utils.SonarException: Exception during execution of org.apache.maven.plugins:maven-surefire-plugin:2.15:test
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecuteMaven3(DefaultMavenPluginExecutor.java:125)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecute(DefaultMavenPluginExecutor.java:107)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:71)
... 62 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcept…
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :lima-business
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
1
1