Author: dbaeli
Date: 2010-10-18 18:53:52 -0400 (Mon, 18 Oct 2010)
New Revision: 4719
Modified:
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/System.js
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Product.js
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Project.js
Log:
EXOGTN-113 don't call maven dependency:get from exobuild, generate the depencies to
add in the pom.xml
Modified: exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/System.js
===================================================================
--- exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/System.js 2010-10-18
22:50:41 UTC (rev 4718)
+++ exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/System.js 2010-10-18
22:53:52 UTC (rev 4719)
@@ -22,7 +22,7 @@
for ( var i = tag.length + 2; i < 10; i++)
java.lang.System.out.print(" ");
- java.lang.System.out.println(message);
+ java.lang.System.out.println("" + message);
// var tmp = message.split("\n");
// java.lang.System.out.println(tmp[0]);
// for ( var j = 1; j < tmp.length; j++) {
Modified: exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Product.js
===================================================================
---
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Product.js 2010-10-18
22:50:41 UTC (rev 4718)
+++
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Product.js 2010-10-18
22:53:52 UTC (rev 4719)
@@ -185,13 +185,23 @@
eXo.System.info("INFO", "Deploying dependencies");
var i = product.getDependencies().iterator();
counter = 0;
+ var failures = 0;
while (i.hasNext()) {
- dep = i.next();
- dep.deployTo(repos, server);
- server.onDeploy(dep);
- counter++;
+ try {
+ dep = i.next();
+ dep.deployTo(repos, server);
+ server.onDeploy(dep);
+ counter++;
+ } catch (err) {
+ failures++;
+ }
}
- eXo.System.info("INFO", "Deployed total " + counter + "
files");
+ if (failures > 0) {
+ eXo.System.info("INFO", "Deployed total " + counter + "
files");
+ throw("Missing " + failures + " dependencies please fix.");
+ } else {
+ eXo.System.info("INFO", "Deployed total " + counter + "
files");
+ }
server.postDeploy(product);
}
return descriptor;
Modified: exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Project.js
===================================================================
---
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Project.js 2010-10-18
22:50:41 UTC (rev 4718)
+++
exo/maven/packager/branches/1.0.x/src/main/javascript/eXo/projects/Project.js 2010-10-18
22:53:52 UTC (rev 4719)
@@ -132,10 +132,11 @@
try {
is = url.openStream();
} catch (err1) {
- eXo.System.info("Artifact " + this.artifact + " not found locally,
searching in maven repos");
- var mvnArgs = ["dependency:get", "-Dartifact=" +
this.artifact, "-Dmaven.artifact.threads=1"] ;
- maven.MavenTask(eXo.env.currentDir, mvnArgs).execute() ;
- }
+ eXo.System.info("Artifact " + this.artifact + " not found locally,
please declare it in the pom.xml");
+ eXo.System.info("Missing dependency !");
+ eXo.System.info("<dependency><groupId>" + this.groupId +
"</groupId><artifactId>" + this.artifactId +
"</artifactId><version>${" + this.groupId
+".version}</version><type>" + this.extension +
"</type></dependency><!-- " + this.version + "-->")
;
+ throw("Error while deploying the project : " + this.relativePath) ;
+ }
//Fetch the binary on the server
var is = url.openStream() ;
@@ -163,7 +164,7 @@
eXo.System.info("DEPLOY", fileName);
return ;
} catch(err) {
- eXo.System.info(err.message);
+ eXo.System.info(err);
if(i < (repository.length - 1)) {
eXo.System.info("Trying to download from the repo : " +
repository[i+1]);
}
Show replies by date