You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by vk...@apache.org on 2008/10/16 06:33:58 UTC
svn commit: r705139 - in
/portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy:
JetspeedDeploy.java JetspeedDeployUtils.java
Author: vkumar
Date: Wed Oct 15 21:33:57 2008
New Revision: 705139
URL: http://svn.apache.org/viewvc?rev=705139&view=rev
Log:
Reverting back commit
Deploying PSML with portlet application.
Removed:
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeployUtils.java
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeploy.java
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeploy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeploy.java?rev=705139&r1=705138&r2=705139&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeploy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-deploy-tools/src/main/java/org/apache/jetspeed/tools/deploy/JetspeedDeploy.java Wed Oct 15 21:33:57 2008
@@ -93,28 +93,17 @@
public JetspeedDeploy(String inputName, String outputName, String contextName, boolean stripLoggers, String forcedVersion) throws Exception
{
File tempFile = null;
- File tempPsmlDir = null;
JarFile jin = null;
JarOutputStream jout = null;
FileChannel srcChannel = null;
FileChannel dstChannel = null;
- InputStream inputStream = null;
- OutputStream outputStream = null;
- byte[] buffer = new byte[1024];
- int len;
- String destPath =null;
- JetspeedDeployUtils utils = new JetspeedDeployUtils();
- JetspeedDeployUtils.ZipObject zipObject;
- boolean success;
+
try
{
String portletApplicationName = contextName;
tempFile = File.createTempFile(portletApplicationName, "");
tempFile.deleteOnExit();
- tempPsmlDir = new File(tempFile.getParentFile().getPath()+"/psml");
- success = tempPsmlDir.mkdir();
-
jin = new JarFile(inputName);
jout = new JarOutputStream(new FileOutputStream(tempFile));
@@ -151,27 +140,6 @@
System.out.println("Found META-INF/context.xml");
contextXml = parseXml(source);
}
- else if(target.startsWith("psml"))
- {
- inputStream = jin.getInputStream(src);
- zipObject = utils.formatZipEntryName(src);
- if(src.isDirectory())
- {
- if(!zipObject.getName().equals("psml") && zipObject.getParents().length ==1){
- utils.createPath(tempPsmlDir.getPath(),zipObject.getParents());
- }
- }else{
- utils.createPath(tempPsmlDir.getPath(),zipObject.getParents());
- destPath = utils.getFullPath(tempPsmlDir.getPath(),zipObject.getParents(),zipObject.getName());
- outputStream = new BufferedOutputStream(new FileOutputStream(destPath));
- while((len = inputStream.read(buffer)) >= 0)
- {
- outputStream.write(buffer, 0, len);
- }
- inputStream.close();
- outputStream.close();
- }
- }
else
{
if ( stripLoggers && target.endsWith(".jar") &&
@@ -244,7 +212,6 @@
jin.close();
jin = null;
jout = null;
- utils.importJetspeedObjects(tempPsmlDir.getPath());
System.out.println("Creating war " + outputName + " ...");
System.out.flush();
// Now copy the new war to its destination
@@ -308,10 +275,6 @@
// ignore
}
}
- if (tempPsmlDir != null && tempPsmlDir.exists())
- {
- utils.deleteDirectory(tempPsmlDir);
- }
if (tempFile != null && tempFile.exists())
{
tempFile.delete();
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org