EMBJOPR SVN: r19 - in trunk: core/src/main/java/org/jboss/on/embedded and 11 other directories.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-22 20:54:28 -0400 (Wed, 22 Oct 2008)
New Revision: 19
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java
trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementDisplay.java
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java
trunk/core/src/main/java/org/jboss/on/embedded/manager/ResourceManager.java
trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java
trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
trunk/core/src/main/webapp/WEB-INF/pages.xml
trunk/core/src/main/webapp/include/tabMenu.xhtml
trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml
trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml
trunk/core/src/test/java/org/jboss/on/embedded/util/BootstrapAction.java
trunk/pom.xml
Log:
resource-create/deploy is now implemented, e.g. for WARs and EARs (https://jira.jboss.org/jira/browse/EMBJOPR-9)
Modified: trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -57,9 +57,9 @@
import java.util.logging.Level;
/**
- * A Seam managed bean that bootstraps the admin console immediately after the WAR is deployed.
+ * A Seam managed bean that bootstraps the admin console immediately after the admin console WAR is deployed.
*/
-@Name("pluginContainerBootstrap")
+@Name("bootstrapAction")
@Scope(ScopeType.APPLICATION)
@Startup
public class BootstrapAction
@@ -76,6 +76,8 @@
@In(value = "contentHistoryManager", create = true)
private ContentHistoryManagerBean contentHistoryManager;
+ private File tempDir;
+
@Create
public void init() throws ServletException
{
@@ -98,6 +100,11 @@
PluginContainer.getInstance().shutdown();
}
+ public File getTempDir()
+ {
+ return this.tempDir;
+ }
+
private void bootstrap()
throws Exception
{
@@ -151,7 +158,7 @@
PluginContainerConfiguration config = new PluginContainerConfiguration();
config.setPluginFinder(createPluginFinder());
setPluginContainerDataDirectory(config);
- setPluginContainerTempDirectory(config);
+ config.setTemporaryDirectory(initTempDir());
config.setContentDiscoveryPeriod(0);
ServerServices services = new ServerServices();
@@ -212,25 +219,18 @@
}
}
- private static void setPluginContainerTempDirectory(PluginContainerConfiguration config)
+ private File initTempDir()
{
- File tempDirectory = getDirectory("jboss.server.temp.dir");
- if (tempDirectory != null)
- {
- File jonTempDirectory = new File(tempDirectory + File.separator + "jon_temp");
- if (jonTempDirectory.exists())
- {
- config.setTemporaryDirectory(jonTempDirectory);
- }
- else
- {
- // only set it, if the create was successful
- if (jonTempDirectory.mkdir())
- {
- config.setTemporaryDirectory(jonTempDirectory);
- }
- }
- }
+ String jbasTempDir = System.getProperty("jboss.server.temp.dir");
+ String javaTempDir = System.getProperty("java.io.tmpdir");
+ String baseTempDir = (jbasTempDir != null) ? jbasTempDir : javaTempDir;
+ if (baseTempDir == null)
+ baseTempDir = File.separatorChar == '/' ? "/tmp" : "C:/tmp";
+ this.tempDir = new File(baseTempDir, "embjopr");
+ this.tempDir.mkdirs();
+ if (!this.tempDir.exists())
+ throw new IllegalStateException("Failed to initialize temporary directory: " + this.tempDir);
+ return this.tempDir;
}
@Nullable
Modified: trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementDisplay.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementDisplay.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/MeasurementDisplay.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -19,6 +19,8 @@
*/
package org.jboss.on.embedded.bean;
+import java.io.Serializable;
+
import org.rhq.core.domain.measurement.MeasurementData;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.composite.MeasurementValueAndUnits;
@@ -28,7 +30,7 @@
*
* @author Jessica Sant
*/
-public class MeasurementDisplay
+public class MeasurementDisplay implements Serializable
{
/**
* the data to be displayed
Modified: trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.BufferedInputStream;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -60,38 +61,51 @@
public void completeDeletePackageRequest(RemovePackagesResponse response)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In completeDeletePackageRequest");
+ log.debug("In completeDeletePackageRequest()");
}
public void completeDeployPackageRequest(DeployPackagesResponse response)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In completeDeployPackageRequest");
+ log.debug("In completeDeployPackageRequest()");
}
public void completeRetrievePackageBitsRequest(ContentServiceResponse response, InputStream contentStream)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In completeRetrievePackageBitsRequest");
+ log.debug("In completeRetrievePackageBitsRequest()");
}
public long downloadPackageBitsForChildResource(int parentResourceId, String resourceTypeName, PackageDetailsKey packageDetailsKey, OutputStream outputStream)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In downloadPackageBitsForChildResource");
+ log.debug("In downloadPackageBitsForChildResource()");
long bitSize;
String fileName = packageDetailsKey.getName();
File file = new File(fileName);
+ InputStream inputStream = null;
try
{
- FileInputStream stream = new FileInputStream(file);
+ inputStream = new BufferedInputStream(new FileInputStream(file));
byte[] fileBytes = new byte[(int)file.length()];
- bitSize = stream.read(fileBytes);
+ bitSize = inputStream.read(fileBytes);
+ inputStream.close();
outputStream.write(fileBytes);
-
}
catch (IOException e)
{
- log.error("Unable to downloadPackageBitsForChildResource", e);
+ log.error("Unable to download package bits for " + resourceTypeName + " child Resource.", e);
bitSize = -1;
}
+ finally
+ {
+ if (inputStream != null)
+ try
+ {
+ inputStream.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Failed to close input stream.", e);
+ }
+ }
return bitSize;
}
@@ -102,13 +116,13 @@
public long downloadPackageBitsRangeGivenResource(int resourceId, PackageDetailsKey packageDetailsKey, OutputStream outputStream, long startByte, long endByte)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In downloadPackageBitsRangeGivenResource");
+ log.debug("In downloadPackageBitsRangeGivenResource()");
return 0;
}
public long getPackageBitsLength(int resourceId, PackageDetailsKey packageDetailsKey)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In getPackageBitsLength");
+ log.debug("In getPackageBitsLength()");
long bitsLength = 0;
String fileName = packageDetailsKey.getName();
File file = new File(fileName);
@@ -121,19 +135,19 @@
public PageList<PackageVersionMetadataComposite> getPackageVersionMetadata(int resourceId, PageControl pc)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In getPackageVersionMetadata");
+ log.debug("In getPackageVersionMetadata()");
return null;
}
public String getResourceSubscriptionMD5(int resourceId)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In getResourceSubscriptionMD5");
+ log.debug("In getResourceSubscriptionMD5()");
return null;
}
public Set<ResourcePackageDetails> loadDependencies(int requestId, Set<PackageDetailsKey> dependencyPackages)
{
- log.info("$$$$$$$$$$$$$$$$$$$$$$$$ In loadDependencies");
+ log.debug("In loadDependencies()");
return null;
}
Modified: trunk/core/src/main/java/org/jboss/on/embedded/manager/ResourceManager.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/manager/ResourceManager.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/manager/ResourceManager.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -124,12 +124,12 @@
*
* @param resourceName name of the resource being created
* @param resourceType type of resource being created.
- * @param ancestorResource the closest ancestor resource to the one being created, usually parent
+ * @param parentResource the parent resource of the one being created
* @param pluginConfiguration optional values that can be used use when creating the newly created resource.
* @param packageDetails PackagedDetails for a content backed resource.
* @return returns the CreateResourceRequest, allows the caller to check for errors and status.
*/
- CreateResourceResponse createResource(String resourceName, ResourceType resourceType, Resource ancestorResource, Configuration pluginConfiguration, ResourcePackageDetails packageDetails);
+ CreateResourceResponse createResource(String resourceName, ResourceType resourceType, Resource parentResource, Configuration pluginConfiguration, ResourcePackageDetails packageDetails);
/**
* Updates the resource with the specified configuration values.
Modified: trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/manager/pc/PluginContainerResourceManager.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -277,10 +277,10 @@
return response;
}
- public CreateResourceResponse createResource(String resourceName, ResourceType resourceType, Resource ancestorResource, Configuration pluginConfiguration, ResourcePackageDetails packageDetails)
+ public CreateResourceResponse createResource(String resourceName, ResourceType resourceType, Resource parentResource, Configuration pluginConfiguration, ResourcePackageDetails packageDetails)
{
CreateResourceResponse response;
- CreateResourceRequest request = new CreateResourceRequest(1, ancestorResource.getId(), resourceName, resourceType.getName(), resourceType.getPlugin(), pluginConfiguration, packageDetails);
+ CreateResourceRequest request = new CreateResourceRequest(1, parentResource.getId(), resourceName, resourceType.getName(), resourceType.getPlugin(), pluginConfiguration, packageDetails);
response = createResource(resourceType, request);
return response;
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -70,7 +70,7 @@
/**
* the resourceType that was selected based on the path request parameter
*/
- @Out(required = false)
+ @Out(required = false, scope = ScopeType.PAGE)
private ResourceType resourceType;
/**
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -19,54 +19,78 @@
*/
package org.jboss.on.embedded.ui.content;
-import org.jboss.on.embedded.manager.ResourceManager;
-import org.jboss.on.embedded.manager.ResourceManagerFactory;
-import org.jboss.on.embedded.ui.NavigationAction;
-import org.jboss.on.embedded.ui.nav.JONTreeNode;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Set;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jetbrains.annotations.Nullable;
+
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.FacesMessages;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.faces.FacesMessages;
+
import org.rhq.core.clientapi.server.plugin.content.ContentSourcePackageDetailsKey;
+import org.rhq.core.clientapi.agent.inventory.CreateResourceResponse;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.content.PackageDetailsKey;
import org.rhq.core.domain.content.PackageType;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import javax.faces.application.FacesMessage;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.File;
-import java.util.Set;
+import org.jboss.on.embedded.manager.ResourceManager;
+import org.jboss.on.embedded.manager.ResourceManagerFactory;
+import org.jboss.on.embedded.ui.NavigationAction;
+import org.jboss.on.embedded.ui.nav.JONTreeNode;
+import org.jboss.on.embedded.ui.nav.ResourceTypeTreeNode;
+import org.jboss.on.embedded.BootstrapAction;
+/**
+ * A Seam action for creating a content-backed Resource (e.g. a WAR or an EAR).
+ *
+ * @author Ian Springer
+ */
@Name("resourceTypeContentAction")
-(a)Scope(ScopeType.PAGE)
+(a)Scope(ScopeType.CONVERSATION)
public class ResourceTypeContentAction
{
+ private static final String SUCCESS_OUTCOME = "success";
+ private static final String FAILURE_OUTCOME = "failure";
- private final Log LOG = LogFactory.getLog(ResourceTypeContentAction.class);
+ private final Log log = LogFactory.getLog(ResourceTypeContentAction.class);
- private ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
+ private final ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
private String fileName;
private byte[] file;
private String fileContentType;
-
- @In(value = "navigationAction", required = false)
+
+ @Out
+ private ConfigurationDefinition configurationDefinition;
+
+ @Out
+ private Configuration configuration;
+
+ @In
NavigationAction navigationAction;
+ @In
+ BootstrapAction bootstrapAction;
+
/**
* facesMessages is a Seam Component that will handle the success/fail messages across a page redirect
*/
@@ -76,70 +100,117 @@
@RequestParameter
String selectedResourceTypeName;
+ private ResourceType resourceType;
+
+ private PackageType packageType;
+
+ @Begin(join = true)
+ public String init()
+ {
+ ResourceTypeTreeNode resourceTypeTreeNode = (ResourceTypeTreeNode)this.navigationAction.getSelectedNode();
+ this.resourceType = resourceTypeTreeNode.getResourceType();
+ this.packageType = getCreationPackageType(this.resourceType);
+ if (this.packageType == null)
+ {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.resourceTypeHasNoCreationPackageType");
+ return FAILURE_OUTCOME;
+ }
+ this.configurationDefinition = this.packageType.getDeploymentConfigurationDefinition();
+ if (this.configurationDefinition != null)
+ {
+ if (this.configurationDefinition.getDefaultTemplate() != null)
+ //noinspection ConstantConditions
+ this.configuration = this.configurationDefinition.getDefaultTemplate().getConfiguration();
+ else
+ this.configuration = new Configuration();
+ }
+ return SUCCESS_OUTCOME;
+ }
+
+ @End(ifOutcome={"success"})
public String createContentBackedResource()
{
- selectedResourceTypeName = "Enterprise Application (EAR)";
- ResourceType resourceType = resourceManager.getResourceType(selectedResourceTypeName);
- String resourceName = fileName;
- String tempFileName = System.getProperty("jboss.server.temp.dir") + System.getProperty("file.separator") + "jon_temp/" + fileName;
+ if (this.fileName == null)
+ {
+ // NOTE: This check is necessary, because the "required" attribute of the Seam FileUpload component doesn't
+ // work.
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
+ "content.resourceInstance.create.noFileSelected");
+ return FAILURE_OUTCOME;
+ }
+ log.debug("Creating content-backed " + this.resourceType + " Resource " + this.fileName + "...");
+ File tempDir = this.bootstrapAction.getTempDir();
+ tempDir.mkdirs(); // just in case the temp dir got deleted since this webapp was last deployed
+ File tempFile;
try
{
- if (resourceName != null)
- {
- File newTempFile = new File(tempFileName);
- boolean createdTempFile = newTempFile.createNewFile();
- if (createdTempFile)
- {
- FileOutputStream fos = new FileOutputStream(newTempFile);
- fos.write(file);
+ tempFile = writeTempFile(tempDir);
+ }
+ catch (IOException e)
+ {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
+ "content.resourceInstance.create.unableToCreateTempFile");
+ log.error("Unable to save uploaded file to temp directory " + tempDir + ".", e);
+ return FAILURE_OUTCOME;
+ }
- String version = "1.0";
- String architectureName = "no-arch";
- String resourceTypeName = resourceType.getName();
- String resourceTypePluginName = resourceType.getPlugin();
+ final String version = "1.0";
+ final String architectureName = "no-arch";
- String packageTypeName = null;
- Set<PackageType> packageTypes = resourceType.getPackageTypes();
- for (PackageType packageType : packageTypes)
- {
- packageTypeName = packageType.getName();
- }
+ PackageDetailsKey key = new ContentSourcePackageDetailsKey(tempFile.getPath(), version, this.packageType.getName(),
+ architectureName, this.resourceType.getName(), this.resourceType.getPlugin());
+ ResourcePackageDetails detail = new ResourcePackageDetails(key);
+ detail.setDeploymentTimeConfiguration(this.configuration);
- if (packageTypeName == null)
- {
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.resourceTypeHasNoPackageTypes");
- }
- else
- {
- PackageDetailsKey key = new ContentSourcePackageDetailsKey(tempFileName, version, packageTypeName, architectureName, resourceTypeName, resourceTypePluginName);
- ResourcePackageDetails detail = new ResourcePackageDetails(key);
+ Configuration pluginConfiguration = null;
- Configuration pluginConfiguration = null;
+ JONTreeNode currentNode = navigationAction.getSelectedNode();
+ Resource ancestorResource = currentNode.getClosestResource();
- JONTreeNode currentNode = navigationAction.getSelectedNode();
- Resource ancestorResource = currentNode.getClosestResource();
-
- resourceManager.createResource(resourceName, resourceType, ancestorResource, pluginConfiguration, detail);
+ final String resourceName = this.fileName;
+ CreateResourceResponse createResourceResponse = this.resourceManager.createResource(resourceName,
+ this.resourceType, ancestorResource, pluginConfiguration, detail);
+ switch (createResourceResponse.getStatus())
+ {
+ case SUCCESS:
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "content.resourceInstance.create.success",
+ this.fileName);
+ return SUCCESS_OUTCOME;
+ default:
+ String cause = (createResourceResponse.getErrorMessage() != null) ?
+ createResourceResponse.getErrorMessage() : "unknown";
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.failure",
+ this.fileName, cause);
+ return FAILURE_OUTCOME;
+ }
+ }
- return "success";
- }
- }
- else
- {
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.unableToCreateTempFile");
- }
- }
- else
+ private File writeTempFile(File tempDir)
+ throws IOException
+ {
+ File tempFile = new File(tempDir, this.fileName);
+ log.debug("Writing temp file to " + tempFile + "...");
+ if (tempFile.exists())
+ tempFile.delete();
+ FileOutputStream fos = new FileOutputStream(tempFile);
+ fos.write(this.file);
+ fos.close();
+ return tempFile;
+ }
+
+ @Nullable
+ private static PackageType getCreationPackageType(ResourceType resourceType)
+ {
+ Set<PackageType> packageTypes = resourceType.getPackageTypes();
+ for (PackageType packageType : packageTypes)
+ {
+ if (packageType.isCreationData())
{
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.noFileSelected");
+ return packageType;
}
-
- } catch (IOException e) {
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.fileUploadFailure");
- LOG.warn("Unable to create file in temp directory",e);
}
- return "failure";
+ return null;
}
public String getFileName()
@@ -152,20 +223,23 @@
this.fileName = fileName;
}
- public byte[] getFile() {
+ public byte[] getFile()
+ {
return file;
}
- public void setFile(byte[] file) {
+ public void setFile(byte[] file)
+ {
this.file = file;
}
- public String getFileContentType() {
+ public String getFileContentType()
+ {
return fileContentType;
}
- public void setFileContentType(String fileContentType) {
+ public void setFileContentType(String fileContentType)
+ {
this.fileContentType = fileContentType;
}
-
}
Modified: trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-23 00:54:28 UTC (rev 19)
@@ -68,7 +68,7 @@
resource.view.button.cancel=Cancel
resource.view.requiredFields=Required fields
-resource.add.pageTitle=Add New Resource
+resource.add.pageTitlePrefix=Add New
resource.add.button.continue=Continue
resource.add.button.save=Save
resource.add.button.cancel=Cancel
@@ -149,11 +149,12 @@
content.resourceInstance.version=Version
#Messages for resourceContentCreate.xhtml
-content.resourceInstance.create=Enter the filename to deploy
-content.resourceInstance.create.fileUploadFailure=Unable to upload file.
+content.resourceInstance.create=Enter the filename you wish to deploy:
content.resourceInstance.create.noFileSelected=Please enter a file to upload.
-content.resourceInstance.create.resourceTypeHasNoPackageTypes=Unable to deploy files of this type. The file type is not defined in the plugin. Please contact the plugin creator about this issue.
+content.resourceInstance.create.resourceTypeHasNoCreationPackageType=Unable to create resources of this type. The resource type does not define a creation package type.
content.resourceInstance.create.unableToCreateTempFile=Unable to create temp file from file upload.
+content.resourceInstance.create.success=Resource {0} created successfully!
+content.resourceInstance.create.failure=Failed to create Resource {0} - cause: {1}
exception.heading=Internal Error
exception.paragraph1=The application has encountered an error.
Modified: trunk/core/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-10-23 00:54:28 UTC (rev 19)
@@ -69,6 +69,25 @@
</navigation>
</page>
+ <page view-id="/secure/resourceTypeSummary.xhtml">
+ <navigation from-action="#{resourceTypeContentAction.init()}">
+ <rule if-outcome="success">
+ <redirect view-id="/secure/resourceContentCreate.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/secure/resourceContentCreate.xhtml">
+ <navigation>
+ <rule if-outcome="success">
+ <redirect view-id="/secure/summary.xhtml"/>
+ </rule>
+ <rule if-outcome="failure">
+ <render view-id="/secure/resourceContentCreate.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
<page view-id="/secure/resourceView.xhtml">
<!--Do NOT try and put parenthesis in the add/edit/open map pages from action because the
@@ -121,8 +140,7 @@
<!-- Run this method before rendering the page. -->
<action execute="#{operationAction.initOperationsAndHistory()}"/>
-
- <!-- Do not put a parenthesis on the invokeOperation or it will rerun the operation on refresh. -->
+
<navigation from-action="#{operationAction.invokeOperation()}">
<rule if-outcome="missingParams">
<render view-id="/secure/operationParameters.xhtml"/>
@@ -152,18 +170,6 @@
</navigation>
</page>
- <page view-id="/secure/resourceContentCreate.xhtml">
- <navigation>
- <rule if-outcome="success">
- <redirect view-id="/secure/summary.xhtml"/>
- </rule>
- <rule if-outcome="failure">
- <render view-id="/secure/resourceContentCreate.xhtml"/>
- </rule>
-
- </navigation>
- </page>
-
<page view-id="/secure/resourceInstanceMetrics.xhtml">
<param name="path" value="#{navigationAction.currentPath}"/>
Modified: trunk/core/src/main/webapp/include/tabMenu.xhtml
===================================================================
--- trunk/core/src/main/webapp/include/tabMenu.xhtml 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/webapp/include/tabMenu.xhtml 2008-10-23 00:54:28 UTC (rev 19)
@@ -135,7 +135,6 @@
</h:panelGroup>
</h:panelGroup>
- <ui:remove>
<!-- ======================= CONTENT TAB ======================== -->
<h:panelGroup layout="block">
<!-- ACTIVE panel (currently being viewed) -->
@@ -160,7 +159,7 @@
</li>
</h:panelGroup>
</h:panelGroup>
- </ui:remove>
+
</ul>
<div class="statusindicator">
<h:panelGroup rendered="#{navigationAction.availableStatus ne 'SUMMARY'}">
Modified: trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml 2008-10-23 00:54:28 UTC (rev 19)
@@ -30,7 +30,7 @@
<ui:composition template="/layout.xhtml">
<!-- page title -->
- <ui:define name="pagetitle">#{messages['resource.add.pageTitle']}</ui:define>
+ <ui:define name="pagetitle">#{messages['resource.add.pageTitlePrefix']} #{param.selectedResourceTypeName}</ui:define>
<!-- body -->
<ui:define name="body">
<div class="notabmenubox">
@@ -41,22 +41,26 @@
<hr/>
<h:form enctype="multipart/form-data">
<h:panelGrid styleClass="formstyle">
+ <input type="hidden" name="selectedResourceTypeName" value="#{param.selectedResourceTypeName}"/>
<s:fileUpload id="file"
data="#{resourceTypeContentAction.file}"
fileName="#{resourceTypeContentAction.fileName}"
accept="application/zip,application/war,application/ear,application/jar"
- contentType="#{resourceTypeContentAction.fileContentType}"/>
- <h:panelGroup>
+ contentType="#{resourceTypeContentAction.fileContentType}"
+ required="true"/>
+ <onc:config configurationDefinition="#{configurationDefinition}"
+ configuration="#{configuration}"
+ nullConfigurationDefinitionMessage="null ConfigurationDefinition!"
+ nullConfigurationMessage="null Configuration!"/>
+ <h:panelGrid columns="2" cellspacing="9">
<h:commandButton value="#{messages['resource.add.button.continue']}"
action="#{resourceTypeContentAction.createContentBackedResource()}"
- styleClass="buttonmed">
- <f:param name="selectedResourceTypeName" value="#{param.selectedResourceTypeName}"/>
- </h:commandButton>
+ styleClass="buttonmed"/>
<s:button value="#{messages['resource.add.button.cancel']}"
view="/secure/summary.xhtml"
- styleClass="buttonmed">
- </s:button>
- </h:panelGroup>
+ propagation="end"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
</h:panelGrid>
</h:form>
</div>
Modified: trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml 2008-10-23 00:54:28 UTC (rev 19)
@@ -57,22 +57,14 @@
value="#{messages['summary.resourceType.addNew']}" styleClass="buttonmed">
<f:param name="selectedResourceTypeName" value="#{resourceType.name}"/>
</s:button>
- <ui:remove>
- <!-- TODO: Uncomment this once content-backed Resource creation is supported on the backend.
- (see https://jira.jboss.org/jira/browse/JBMANCON-407) -->
- <s:button rendered="#{resourceType.creationDataType eq 'CONTENT'}"
- view="/secure/resourceContentCreate.xhtml"
- value="#{messages['summary.resourceType.addNew']}" styleClass="buttonmed">
- <f:param name="selectedResourceTypeName" value="#{resourceType.name}"/>
- </s:button>
- </ui:remove>
+
+ <s:button rendered="#{resourceType.creationDataType eq 'CONTENT'}"
+ action="#{resourceTypeContentAction.init()}"
+ value="#{messages['summary.resourceType.addNew']}" styleClass="buttonmed">
+ <f:param name="selectedResourceTypeName" value="#{resourceType.name}"/>
+ </s:button>
</h:form>
- <ui:remove>
- <!-- TODO: Change below to rendered="#{!resourceType.creatable} once content-backed Resource
- creation is supported on the backend.
- (see https://jira.jboss.org/jira/browse/JBMANCON-407) -->
- </ui:remove>
- <h:outputLabel rendered="#{!resourceType.creatable or resourceType.creationDataType eq 'CONTENT'}"
+ <h:outputLabel rendered="#{!resourceType.creatable}"
value="#{messages['resourcetype.no.action']}"/>
</div>
<h:form>
Modified: trunk/core/src/test/java/org/jboss/on/embedded/util/BootstrapAction.java
===================================================================
--- trunk/core/src/test/java/org/jboss/on/embedded/util/BootstrapAction.java 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/core/src/test/java/org/jboss/on/embedded/util/BootstrapAction.java 2008-10-23 00:54:28 UTC (rev 19)
@@ -46,7 +46,7 @@
/**
* Seam version of BootstrapServlet
*/
-@Name("pluginContainerBootstrap")
+@Name("bootstrapAction")
@Scope(ScopeType.APPLICATION)
@Startup
@Install(precedence = (Install.MOCK))
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-10-22 21:08:53 UTC (rev 18)
+++ trunk/pom.xml 2008-10-23 00:54:28 UTC (rev 19)
@@ -65,7 +65,7 @@
<jaxb-api.version>2.1</jaxb-api.version>
<jaxb-impl.version>2.1.6</jaxb-impl.version>
<jon.version>2.2.0-SNAPSHOT</jon.version>
- <richfaces.version>3.2.0.GA</richfaces.version>
+ <richfaces.version>3.2.2.GA</richfaces.version>
<rhq.version>1.2.0-SNAPSHOT</rhq.version>
<seam.version>2.0.2.SP1</seam.version>
<seam.embedded.version>beta3.SP2</seam.embedded.version>
16 years, 2 months
EMBJOPR SVN: r18 - trunk.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-22 17:08:53 -0400 (Wed, 22 Oct 2008)
New Revision: 18
Modified:
trunk/BUILD.txt
Log:
updated to include svn checkout instructions
Modified: trunk/BUILD.txt
===================================================================
--- trunk/BUILD.txt 2008-10-22 18:21:08 UTC (rev 17)
+++ trunk/BUILD.txt 2008-10-22 21:08:53 UTC (rev 18)
@@ -2,9 +2,17 @@
********************************
Compiling
=========
-1) Make sure you have JDK 5 and Maven 2 setup on your system.
-2) Build Embedded Jopr:
+1) Make sure you have JDK 5, a Subversion (SVN) client, and Maven 2 setup on your system.
+2) Check out the Embedded Jopr source from SVN:
+ svn co http://anonsvn.jboss.org/repos/embjopr/trunk/ embjopr
+
+ or, if you are a committer:
+
+ svn co https://svn.jboss.org/repos/embjopr/trunk/ embjopr
+3) Build Embedded Jopr:
+
+ cd embjopr
mvn install -Dmaven.test.skip=true
This will produce two admin console WARs:
@@ -14,7 +22,7 @@
Installation
============
-See INSTALL.txt for instructions on:
+See INSTALL.txt in the embjopr root directory for instructions on:
1) Installing the admin console WAR to a JBAS instance.
2) Logging in to the admin console.
@@ -47,7 +55,7 @@
4) Increase your JVM memory settings in run.sh/conf/bat to at least the following
(via the JAVA_OPTS environment variable):
- -Xms256M -Xmx256M -XX:PermSize=256M -XX:MaxPermSize=256M
+ -Xms200M -Xmx200M -XX:PermSize=200M -XX:MaxPermSize=200M
This is recommended, because multiple redeploys of Seam-based webapps can cause you to run out of heap,
or more likely, permgen.
16 years, 2 months
EMBJOPR SVN: r17 - trunk/core/src/main/webapp/js.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-22 14:21:08 -0400 (Wed, 22 Oct 2008)
New Revision: 17
Modified:
trunk/core/src/main/webapp/js/embedded.js
Log:
sync up with latest rev of rhq.js
Modified: trunk/core/src/main/webapp/js/embedded.js
===================================================================
--- trunk/core/src/main/webapp/js/embedded.js 2008-10-22 18:10:52 UTC (rev 16)
+++ trunk/core/src/main/webapp/js/embedded.js 2008-10-22 18:21:08 UTC (rev 17)
@@ -19,7 +19,7 @@
*/
//**********************************************************************************************************/
-// NOTE: This file is a copy of rhq.js, r502. If that file is updated, this file should be updated as well!
+// NOTE: This file is a copy of rhq.js, r1832. If that file is updated, this file should be updated as well!
//**********************************************************************************************************/
/**
@@ -30,10 +30,9 @@
var WINDOW_THEME = 'alphacube';
/**
- * A special value (a single NBSP character) for an input that tells the server-side that the corresponding value
- * should be set to null.
+ * A special value for an input that tells the server-side that the corresponding value should be set to null.
*/
-var NULL_INPUT_VALUE = "\u00A0";
+var NULL_INPUT_VALUE = " ";
/**
* Set the unset status of the specified input.
16 years, 2 months
EMBJOPR SVN: r16 - trunk/core.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-22 14:10:52 -0400 (Wed, 22 Oct 2008)
New Revision: 16
Modified:
trunk/core/pom.xml
Log:
use a version of the JSF API jar that is available from the JBoss repo
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2008-10-20 20:49:18 UTC (rev 15)
+++ trunk/core/pom.xml 2008-10-22 18:10:52 UTC (rev 16)
@@ -165,7 +165,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <!-- NOTE: The version is defined in the rhq-parent POM's dependencyManagement section. -->
+ <version>1.2_09</version>
<scope>provided</scope>
</dependency>
16 years, 2 months
EMBJOPR SVN: r15 - trunk/core.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-20 16:49:18 -0400 (Mon, 20 Oct 2008)
New Revision: 15
Modified:
trunk/core/pom.xml
Log:
add missing JSF API dep
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2008-10-20 20:48:39 UTC (rev 14)
+++ trunk/core/pom.xml 2008-10-20 20:49:18 UTC (rev 15)
@@ -161,6 +161,14 @@
</exclusions>
<scope>runtime</scope>
</dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <!-- NOTE: The version is defined in the rhq-parent POM's dependencyManagement section. -->
+ <scope>provided</scope>
+ </dependency>
+
<!-- Provided in 5.0 -->
<dependency>
<groupId>javax.el</groupId>
16 years, 2 months
EMBJOPR SVN: r14 - trunk.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-20 16:48:39 -0400 (Mon, 20 Oct 2008)
New Revision: 14
Modified:
trunk/pom.xml
Log:
add project URL
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-10-19 18:49:28 UTC (rev 13)
+++ trunk/pom.xml 2008-10-20 20:48:39 UTC (rev 14)
@@ -18,116 +18,117 @@
~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <!-- NOTE: We extend the RHQ parent pom, because we essentially want all the same
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- NOTE: We extend the RHQ parent pom, because we essentially want all the same
base settings - plugins, dependencies, etc. -->
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
-
- <groupId>org.jboss.jopr</groupId>
- <artifactId>jopr-embedded-parent</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Embedded Jopr</name>
- <description>a web application that provides administration and monitoring of the app server instance to which it is deployed</description>
- <inceptionYear>2007</inceptionYear>
- <organization>
- <name>JBoss, a division of Red Hat</name>
- <url>http://jboss.com/</url>
- </organization>
-
+
+ <groupId>org.jboss.jopr</groupId>
+ <artifactId>jopr-embedded-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Embedded Jopr</name>
+ <description>a web application that provides administration and monitoring of the app server instance to which it is deployed</description>
+ <url>http://jboss.org/embjopr/</url>
+ <inceptionYear>2007</inceptionYear>
+ <organization>
+ <name>JBoss, a division of Red Hat</name>
+ <url>http://jboss.com/</url>
+ </organization>
+
<scm>
- <connection>scm:svn:http://svn.jboss.org/repos/embjopr/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/</developerConnection>
- </scm>
-
+ <connection>scm:svn:http://svn.jboss.org/repos/embjopr/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/embjopr/trunk/</developerConnection>
+ </scm>
+
<issueManagement>
- <system>jira</system>
- <url>https://jira.jboss.org/jira/browse/EMBJOPR</url>
- </issueManagement>
-
- <properties>
- <jbas4.finalName>admin-console</jbas4.finalName>
- <jbas5.finalName>admin-console</jbas5.finalName>
-
- <!-- dependency groupIds -->
- <rhq.groupId>org.rhq</rhq.groupId>
- <jon.groupId>org.jboss.on</jon.groupId>
- <seam.groupId>org.jboss.seam</seam.groupId>
- <seam.embedded.groupId>org.jboss.seam.embedded</seam.embedded.groupId>
-
- <!-- dependency versions -->
- <jaxb-api.version>2.1</jaxb-api.version>
- <jaxb-impl.version>2.1.6</jaxb-impl.version>
- <jon.version>2.2.0-SNAPSHOT</jon.version>
- <richfaces.version>3.1.3.GA</richfaces.version>
- <rhq.version>1.2.0-SNAPSHOT</rhq.version>
- <seam.version>2.0.2.SP1</seam.version>
+ <system>jira</system>
+ <url>https://jira.jboss.org/jira/browse/EMBJOPR</url>
+ </issueManagement>
+
+ <properties>
+ <jbas4.finalName>admin-console</jbas4.finalName>
+ <jbas5.finalName>admin-console</jbas5.finalName>
+
+ <!-- dependency groupIds -->
+ <rhq.groupId>org.rhq</rhq.groupId>
+ <jon.groupId>org.jboss.on</jon.groupId>
+ <seam.groupId>org.jboss.seam</seam.groupId>
+ <seam.embedded.groupId>org.jboss.seam.embedded</seam.embedded.groupId>
+
+ <!-- dependency versions -->
+ <jaxb-api.version>2.1</jaxb-api.version>
+ <jaxb-impl.version>2.1.6</jaxb-impl.version>
+ <jon.version>2.2.0-SNAPSHOT</jon.version>
+ <richfaces.version>3.2.0.GA</richfaces.version>
+ <rhq.version>1.2.0-SNAPSHOT</rhq.version>
+ <seam.version>2.0.2.SP1</seam.version>
<seam.embedded.version>beta3.SP2</seam.embedded.version>
<!-- This is a special patched version of not-yet-released Facelets 1.1.15,
which is required in order for Facelets to work in AS5.
(see https://jira.jboss.org/jira/browse/JBSEAM-3066) -->
<facelets.version>1.1.15.B1</facelets.version>
- </properties>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-3</version>
- <executions>
- <execution>
- <id>enforce-versions</id>
- <goals>
- <!-- IMPORTANT: Use enforce goal, rather than enforce-once goal, otherwise reactor
- builds will fail due to http://jira.codehaus.org/browse/MENFORCER-11 -->
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireMavenVersion>
- <version>2.0</version>
- </requireMavenVersion>
- <requireJavaVersion>
- <version>(1.5,1.6]</version>
- <!-- 1.5.x -->
- </requireJavaVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ </properties>
+
+ <build>
+ <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <useCache>false</useCache>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-3</version>
+ <executions>
+ <execution>
+ <id>enforce-versions</id>
+ <goals>
+ <!-- IMPORTANT: Use enforce goal, rather than enforce-once goal, otherwise reactor
+ builds will fail due to http://jira.codehaus.org/browse/MENFORCER-11 -->
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>2.0</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>(1.5,1.6]</version>
+ <!-- 1.5.x -->
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <useCache>false</useCache>
<archive>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<!-- TODO: This isn't working, because the build number plugin hasn't run yet
at the time the buildNumber prop below is resolved. -->
<Build-Number>${buildNumber}</Build-Number>
</manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
+ </archive>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-1-jboss-1</version>
<executions>
<execution>
- <phase>validate</phase>
+ <phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
@@ -137,29 +138,29 @@
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
- </plugin>
-
- </plugins>
- </build>
-
+ </plugin>
+
+ </plugins>
+ </build>
+
<modules>
<module>core</module>
<module>jbas4</module>
<module>jbas5</module>
- </modules>
-
- <repositories>
-
- <repository>
- <id>jboss</id>
- <name>JBoss Release Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
-
+ </modules>
+
+ <repositories>
+
<repository>
+ <id>jboss</id>
+ <name>JBoss Release Repository</name>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
<id>jboss-snapshots</id>
<name>JBoss Snapshot Repository</name>
<url>http://snapshots.jboss.org/maven2/</url>
@@ -167,19 +168,19 @@
<enabled>true</enabled>
</snapshots>
</repository>
-
- </repositories>
-
- <pluginRepositories>
+ </repositories>
+
+ <pluginRepositories>
+
<pluginRepository>
- <id>jboss</id>
- <name>JBoss Release Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
+ <id>jboss</id>
+ <name>JBoss Release Repository</name>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
<pluginRepository>
<id>jboss-snapshots</id>
@@ -189,7 +190,7 @@
<enabled>true</enabled>
</snapshots>
</pluginRepository>
-
- </pluginRepositories>
-
+
+ </pluginRepositories>
+
</project>
16 years, 2 months
EMBJOPR SVN: r13 - trunk/core/src/main/webapp/js.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-19 14:49:28 -0400 (Sun, 19 Oct 2008)
New Revision: 13
Modified:
trunk/core/src/main/webapp/js/embedded.js
Log:
update to match latest rhq.ds
Modified: trunk/core/src/main/webapp/js/embedded.js
===================================================================
--- trunk/core/src/main/webapp/js/embedded.js 2008-10-17 20:39:43 UTC (rev 12)
+++ trunk/core/src/main/webapp/js/embedded.js 2008-10-19 18:49:28 UTC (rev 13)
@@ -30,10 +30,10 @@
var WINDOW_THEME = 'alphacube';
/**
- * A special value (a single DELETE character) for an input that tells the server-side that the corresponding value
+ * A special value (a single NBSP character) for an input that tells the server-side that the corresponding value
* should be set to null.
*/
-var NULL_INPUT_VALUE = "\u007F";
+var NULL_INPUT_VALUE = "\u00A0";
/**
* Set the unset status of the specified input.
@@ -226,21 +226,22 @@
var inputs = Form.getInputs(form);
for (var i = 0; i < inputs.length; i++)
{
- if (inputs[i].disabled)
+ var input = inputs[i];
+ if (input.disabled)
{
// NOTE: It is vital to enable any disabled inputs, since the browser will exclude disabled inputs from the
// POST request.
- setInputDisabled(inputs[i], false, false);
+ setInputDisabled(input, false, false);
// Some browsers (e.g. Firefox) will automatically un-gray-out the input, when the disabled property is
// set to false, so we need to gray it out again, so it still appears to be disabled.
- grayOutInput(inputs[i]);
- if (inputs[i].unset)
+ grayOutInput(input);
+ if (input.unset)
{
// NOTE: Set the input's value to a special string that will allow the server-side to distinguish between a
// null (i.e. unset) value and an empty string value.
- inputs[i].value = NULL_INPUT_VALUE;
+ input.value = NULL_INPUT_VALUE;
}
- }
+ }
}
}
16 years, 2 months
EMBJOPR SVN: r12 - in trunk: core and 2 other directories.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-17 16:39:43 -0400 (Fri, 17 Oct 2008)
New Revision: 12
Modified:
trunk/core/pom.xml
trunk/jbas4/pom.xml
trunk/jbas5/pom.xml
trunk/pom.xml
Log:
dev profile back in da house
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2008-10-17 17:04:21 UTC (rev 11)
+++ trunk/core/pom.xml 2008-10-17 20:39:43 UTC (rev 12)
@@ -304,4 +304,79 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <jbas4.warDir>${jbas4.configDir}/deploy/${jbas4.finalName}.war</jbas4.warDir>
+ <jbas5.warDir>${jbas5.configDir}/deploy/${jbas5.finalName}.war</jbas5.warDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy-to-jbas4</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <echo>*** Copying updated files from target${file.separator}classes to <jbas4.warDir>${file.separator}WEB-INF${file.separator}classes...</echo>
+ <copy todir="${jbas4.warDir}/WEB-INF/classes">
+ <fileset dir="target/classes" />
+ </copy>
+
+ <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to <jbas4.warDir>...</echo>
+ <copy todir="${jbas4.warDir}">
+ <fileset dir="${basedir}/src/main/webapp" />
+ </copy>
+ <!-- TODO: Also copy the files from src/main/webapp-filtered/, and then filter them ourselves. -->
+
+ <echo>*** Touching <jbas4.warDir>/WEB-INF/web.xml to force redeploy...</echo>
+ <touch file="${jbas4.warDir}/WEB-INF/web.xml" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>deploy-to-jbas5</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <echo>*** Copying updated files from target${file.separator}classes to <jbas5.warDir>${file.separator}WEB-INF${file.separator}classes...</echo>
+ <copy todir="${jbas5.warDir}/WEB-INF/classes">
+ <fileset dir="target/classes" />
+ </copy>
+
+ <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to <jbas5.warDir>...</echo>
+ <copy todir="${jbas5.warDir}">
+ <fileset dir="${basedir}/src/main/webapp" />
+ </copy>
+ <!-- TODO: Also copy the files from src/main/webapp-filtered/, and then filter them ourselves. -->
+
+ <echo>*** Touching <jbas5.warDir>/WEB-INF/web.xml to force redeploy...</echo>
+ <touch file="${jbas5.warDir}/WEB-INF/web.xml" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
Modified: trunk/jbas4/pom.xml
===================================================================
--- trunk/jbas4/pom.xml 2008-10-17 17:04:21 UTC (rev 11)
+++ trunk/jbas4/pom.xml 2008-10-17 20:39:43 UTC (rev 12)
@@ -50,7 +50,7 @@
</dependencies>
<build>
- <finalName>jbas4-console</finalName>
+ <finalName>${jbas4.finalName}</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
@@ -137,4 +137,66 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <warDir>${jbas4.configDir}/deploy/${project.build.finalName}.war</warDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.dir" location="${warDir}" />
+ <echo>*** Copying updated files from target${file.separator}${project.build.finalName} to <warDir>...</echo>
+ <touch file="${basedir}/target/${project.build.finalName}/WEB-INF/classes/messages.properties" />
+ <copy todir="${deployment.dir}" verbose="${embedded.verbose}">
+ <fileset dir="${basedir}/target/${project.build.finalName}" />
+ </copy>
+ <unjar src="${project.build.directory}/${project.build.finalName}.war" dest="${deployment.dir}">
+ <patternset>
+ <include name="META-INF/**" />
+ </patternset>
+ </unjar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.dir" location="${warDir}" />
+ <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
+ <delete dir="${deployment.dir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
Modified: trunk/jbas5/pom.xml
===================================================================
--- trunk/jbas5/pom.xml 2008-10-17 17:04:21 UTC (rev 11)
+++ trunk/jbas5/pom.xml 2008-10-17 20:39:43 UTC (rev 12)
@@ -76,7 +76,7 @@
</dependencies>
<build>
- <finalName>jbas5-console</finalName>
+ <finalName>${jbas5.finalName}</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
@@ -152,5 +152,67 @@
-->
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <warDir>${jbas5.configDir}/deploy/${project.build.finalName}.war</warDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.dir" location="${warDir}" />
+ <echo>*** Copying updated files from target${file.separator}${project.build.finalName} to <warDir>...</echo>
+ <touch file="${basedir}/target/${project.build.finalName}/WEB-INF/classes/messages.properties" />
+ <copy todir="${deployment.dir}" verbose="${embedded.verbose}">
+ <fileset dir="${basedir}/target/${project.build.finalName}" />
+ </copy>
+ <unjar src="${project.build.directory}/${project.build.finalName}.war" dest="${deployment.dir}">
+ <patternset>
+ <include name="META-INF/**" />
+ </patternset>
+ </unjar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.dir" location="${warDir}" />
+ <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
+ <delete dir="${deployment.dir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-10-17 17:04:21 UTC (rev 11)
+++ trunk/pom.xml 2008-10-17 20:39:43 UTC (rev 12)
@@ -50,8 +50,10 @@
<url>https://jira.jboss.org/jira/browse/EMBJOPR</url>
</issueManagement>
- <properties>
-
+ <properties>
+ <jbas4.finalName>admin-console</jbas4.finalName>
+ <jbas5.finalName>admin-console</jbas5.finalName>
+
<!-- dependency groupIds -->
<rhq.groupId>org.rhq</rhq.groupId>
<jon.groupId>org.jboss.on</jon.groupId>
16 years, 2 months
EMBJOPR SVN: r11 - trunk.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-17 13:04:21 -0400 (Fri, 17 Oct 2008)
New Revision: 11
Modified:
trunk/INSTALL.txt
Log:
add instructions for turning down verbosity of RuntimeDiscoveryExecutor logger
Modified: trunk/INSTALL.txt
===================================================================
--- trunk/INSTALL.txt 2008-10-17 14:00:07 UTC (rev 10)
+++ trunk/INSTALL.txt 2008-10-17 17:04:21 UTC (rev 11)
@@ -10,12 +10,13 @@
2) (OPTIONAL) If you want the Admin Console to expose JVM metrics and operations, add
-Djboss.platform.mbeanserver to your JAVA_OPTS.
-3) (OPTIONAL) Modify ${JBOSS_CONFIG_DIR}/conf/jboss-log4j.xml, and add the following in
- the category section to turn off Seam DEBUG logging, which can be very noisy:
+3) (OPTIONAL) Modify ${JBOSS_CONFIG_DIR}/conf/jboss-log4j.xml, and add the following
+ to turn down the verbosity for some overly noisy categories:
- <category name="org.jboss.seam"><priority value="INFO"/></category>
- <category name="com.sun"><priority value="INFO"/></category>
-
+ <category name="org.jboss.seam"><priority value="DEBUG"/></category>
+ <category name="com.sun"><priority value="DEBUG"/></category>
+ <category name="org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor"><priority value="DEBUG"/></category>
+
4) Stop your JBAS instance.
5) Copy jbas4-console.war (JBAS 4.2.x/4.3.x) *or* jbas5-console.war (JBAS 5.x)
16 years, 2 months
EMBJOPR SVN: r10 - in trunk: core and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-10-17 10:00:07 -0400 (Fri, 17 Oct 2008)
New Revision: 10
Added:
trunk/BUILD.txt
trunk/INSTALL.txt
Removed:
trunk/core/BUILD.txt
trunk/core/INSTALL.txt
Log:
move BUILD.txt and INSTALL.txt up to the root dir
Copied: trunk/BUILD.txt (from rev 9, trunk/core/BUILD.txt)
===================================================================
--- trunk/BUILD.txt (rev 0)
+++ trunk/BUILD.txt 2008-10-17 14:00:07 UTC (rev 10)
@@ -0,0 +1,61 @@
+Embedded Jopr Build instructions
+********************************
+Compiling
+=========
+1) Make sure you have JDK 5 and Maven 2 setup on your system.
+2) Build Embedded Jopr:
+
+ mvn install -Dmaven.test.skip=true
+
+ This will produce two admin console WARs:
+
+ * jbas4/target/jbas4-console.war - for JBAS 4.2.x deployment
+ * jbas5/target/jbas5-console.war - for JBAS 5.x deployment
+
+Installation
+============
+See INSTALL.txt for instructions on:
+1) Installing the admin console WAR to a JBAS instance.
+2) Logging in to the admin console.
+
+'dev' Profile
+=============
+If you are doing development work on Embedded Jopr, the 'dev' Maven profile can be used to speed up the dev/test cycle.
+This will cause Maven to automatically copy any updated files to a copy of the admin console WAR deployed to a JBAS
+instance.
+
+One-Time Steps
+--------------
+1) (OPTIONAL) Activate the 'dev' profile either by adding "<activeProfile>dev</activeProfile>" to the "activeProfiles"
+ section of your Maven settings.xml or by specifying -Pdev when running "mvn package" to build the Admin Console WAR.
+2) Add the following to the "profiles" section of your Maven settings.xml:
+ <profile>
+ <id>dev</id>
+ <properties>
+ <!-- Set the below prop to the location to your dev JBAS 4.2/4.3 deploy location for the admin console WAR.
+ e.g.: C:/opt/jboss-eap-4.3.0.GA_CP02/jboss-as/server/production -->
+ <jbas4.configDir>SET_ME</jbas4.configDir>
+ <!-- Set the below prop to the location to your dev JBAS 5.0 deploy location for the embedded console WAR.
+ e.g.: C:/opt/jboss-5.0.0.CR1/server/default -->
+ <jbas5.configDir>SET_ME</jbas5.configDir>
+ </properties>
+ </profile>
+
+3) Add the reloadable="true" atrribute to $JBOSS_HOME/server/$CONFIG/deploy/jboss-web.deployer/context.xml, i.e.:
+ <Context cookies="true" crossContext="true" reloadable="true">
+ This will ensure that the WAR gets redeployed by JBAS whenever a dev-profile build is run.
+4) Increase your JVM memory settings in run.sh/conf/bat to at least the following
+ (via the JAVA_OPTS environment variable):
+
+ -Xms256M -Xmx256M -XX:PermSize=256M -XX:MaxPermSize=256M
+
+ This is recommended, because multiple redeploys of Seam-based webapps can cause you to run out of heap,
+ or more likely, permgen.
+5) Restart your JBAS instance, so the changes from 3) and 4) will take effect.
+6) Build Embedded Jopr using the instructions above, then copy the admin console WAR corresponding to your
+ JBAS version, *in exploded form*, to the deploy directory of your development JBAS instance.
+
+Running Builds
+--------------
+If you did not activate the 'dev' profile in your Maven settings.xml (step 1 above), make sure to include "-Pdev"
+to activate the 'dev' profile when running mvn.
Property changes on: trunk/BUILD.txt
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/INSTALL.txt (from rev 9, trunk/core/INSTALL.txt)
===================================================================
--- trunk/INSTALL.txt (rev 0)
+++ trunk/INSTALL.txt 2008-10-17 14:00:07 UTC (rev 10)
@@ -0,0 +1,35 @@
+Embedded Jopr Install instructions
+**********************************
+Note, for instructions on building Embedded Jopr, see BUILD.txt.
+
+To install the JBAS admin console webapp, perform the following steps:
+
+1) Uncomment the admin user (or some other user in the JBossAdmin role) in
+ ${JBOSS_CONFIG_DIR}/conf/props/jmx-console-users.properties.
+
+2) (OPTIONAL) If you want the Admin Console to expose JVM metrics and operations, add
+ -Djboss.platform.mbeanserver to your JAVA_OPTS.
+
+3) (OPTIONAL) Modify ${JBOSS_CONFIG_DIR}/conf/jboss-log4j.xml, and add the following in
+ the category section to turn off Seam DEBUG logging, which can be very noisy:
+
+ <category name="org.jboss.seam"><priority value="INFO"/></category>
+ <category name="com.sun"><priority value="INFO"/></category>
+
+4) Stop your JBAS instance.
+
+5) Copy jbas4-console.war (JBAS 4.2.x/4.3.x) *or* jbas5-console.war (JBAS 5.x)
+ to your ${JBOSS_CONFIG_DIR}/deploy/ directory.
+
+6) (AS5 ONLY) Enable the Profile Service.
+ *NOTE* These instructions currently work for AS5 CR1, but not for CR2.
+ a) In the ${JBOSS_CONFIG_DIR}/conf directory, delete the bootstrap.xml file and
+ rename the bootstrap-repo.xml to bootstrap.xml.
+ b) In ${JBOSS_CONFIG_DIR}/deployers directory, rename the
+ profileservice-beans.xml.bak file to profile-service-beans.xml.
+
+7) Restart your JBAS instance.
+
+8) Once JBAS fully starts, go to http://localhost:8080/jbas4-console/ (JBAS 4.2.x/4.3.x)
+ *or* http://localhost:8080/jbas5-console/ (JBAS 5.x). Login with the same credentials
+ you would use for the JMX console (e.g. admin:admin).
Property changes on: trunk/INSTALL.txt
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/core/BUILD.txt
===================================================================
--- trunk/core/BUILD.txt 2008-10-17 13:58:44 UTC (rev 9)
+++ trunk/core/BUILD.txt 2008-10-17 14:00:07 UTC (rev 10)
@@ -1,61 +0,0 @@
-Embedded Jopr Build instructions
-********************************
-Compiling
-=========
-1) Make sure you have JDK 5 and Maven 2 setup on your system.
-2) Build Embedded Jopr:
-
- mvn install -Dmaven.test.skip=true
-
- This will produce two admin console WARs:
-
- * jbas4/target/jbas4-console.war - for JBAS 4.2.x deployment
- * jbas5/target/jbas5-console.war - for JBAS 5.x deployment
-
-Installation
-============
-See INSTALL.txt for instructions on:
-1) Installing the admin console WAR to a JBAS instance.
-2) Logging in to the admin console.
-
-'dev' Profile
-=============
-If you are doing development work on Embedded Jopr, the 'dev' Maven profile can be used to speed up the dev/test cycle.
-This will cause Maven to automatically copy any updated files to a copy of the admin console WAR deployed to a JBAS
-instance.
-
-One-Time Steps
---------------
-1) (OPTIONAL) Activate the 'dev' profile either by adding "<activeProfile>dev</activeProfile>" to the "activeProfiles"
- section of your Maven settings.xml or by specifying -Pdev when running "mvn package" to build the Admin Console WAR.
-2) Add the following to the "profiles" section of your Maven settings.xml:
- <profile>
- <id>dev</id>
- <properties>
- <!-- Set the below prop to the location to your dev JBAS 4.2/4.3 deploy location for the admin console WAR.
- e.g.: C:/opt/jboss-eap-4.3.0.GA_CP02/jboss-as/server/production -->
- <jbas4.configDir>SET_ME</jbas4.configDir>
- <!-- Set the below prop to the location to your dev JBAS 5.0 deploy location for the embedded console WAR.
- e.g.: C:/opt/jboss-5.0.0.CR1/server/default -->
- <jbas5.configDir>SET_ME</jbas5.configDir>
- </properties>
- </profile>
-
-3) Add the reloadable="true" atrribute to $JBOSS_HOME/server/$CONFIG/deploy/jboss-web.deployer/context.xml, i.e.:
- <Context cookies="true" crossContext="true" reloadable="true">
- This will ensure that the WAR gets redeployed by JBAS whenever a dev-profile build is run.
-4) Increase your JVM memory settings in run.sh/conf/bat to at least the following
- (via the JAVA_OPTS environment variable):
-
- -Xms256M -Xmx256M -XX:PermSize=256M -XX:MaxPermSize=256M
-
- This is recommended, because multiple redeploys of Seam-based webapps can cause you to run out of heap,
- or more likely, permgen.
-5) Restart your JBAS instance, so the changes from 3) and 4) will take effect.
-6) Build Embedded Jopr using the instructions above, then copy the admin console WAR corresponding to your
- JBAS version, *in exploded form*, to the deploy directory of your development JBAS instance.
-
-Running Builds
---------------
-If you did not activate the 'dev' profile in your Maven settings.xml (step 1 above), make sure to include "-Pdev"
-to activate the 'dev' profile when running mvn.
Deleted: trunk/core/INSTALL.txt
===================================================================
--- trunk/core/INSTALL.txt 2008-10-17 13:58:44 UTC (rev 9)
+++ trunk/core/INSTALL.txt 2008-10-17 14:00:07 UTC (rev 10)
@@ -1,35 +0,0 @@
-Embedded Jopr Install instructions
-**********************************
-Note, for instructions on building Embedded Jopr, see BUILD.txt.
-
-To install the JBAS admin console webapp, perform the following steps:
-
-1) Uncomment the admin user (or some other user in the JBossAdmin role) in
- ${JBOSS_CONFIG_DIR}/conf/props/jmx-console-users.properties.
-
-2) (OPTIONAL) If you want the Admin Console to expose JVM metrics and operations, add
- -Djboss.platform.mbeanserver to your JAVA_OPTS.
-
-3) (OPTIONAL) Modify ${JBOSS_CONFIG_DIR}/conf/jboss-log4j.xml, and add the following in
- the category section to turn off Seam DEBUG logging, which can be very noisy:
-
- <category name="org.jboss.seam"><priority value="INFO"/></category>
- <category name="com.sun"><priority value="INFO"/></category>
-
-4) Stop your JBAS instance.
-
-5) Copy jbas4-console.war (JBAS 4.2.x/4.3.x) *or* jbas5-console.war (JBAS 5.x)
- to your ${JBOSS_CONFIG_DIR}/deploy/ directory.
-
-6) (AS5 ONLY) Enable the Profile Service.
- *NOTE* These instructions currently work for AS5 CR1, but not for CR2.
- a) In the ${JBOSS_CONFIG_DIR}/conf directory, delete the bootstrap.xml file and
- rename the bootstrap-repo.xml to bootstrap.xml.
- b) In ${JBOSS_CONFIG_DIR}/deployers directory, rename the
- profileservice-beans.xml.bak file to profile-service-beans.xml.
-
-7) Restart your JBAS instance.
-
-8) Once JBAS fully starts, go to http://localhost:8080/jbas4-console/ (JBAS 4.2.x/4.3.x)
- *or* http://localhost:8080/jbas5-console/ (JBAS 5.x). Login with the same credentials
- you would use for the JMX console (e.g. admin:admin).
16 years, 2 months