[jbosstools-issues] [JBoss JIRA] (JBIDE-19349) Fix ShrinkWrap Archive file location validation issues

Lucia Jelinkova (JIRA) issues at jboss.org
Tue Jul 14 05:18:03 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-19349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089162#comment-13089162 ] 

Lucia Jelinkova edited comment on JBIDE-19349 at 7/14/15 5:17 AM:
------------------------------------------------------------------

The validation still does not work for

{code}
war.addAsWebResource(EmptyAsset.INSTANCE, "persistence.xml");
{code}

I think there is bug in the ArquillianBuilder.class code where isAddAsManifestMethod is set to true instead of isAddAsWebResource.
{code}
if (node.getName() != null && ArquillianConstants.ADD_AS_WEB_RESOURCE.equals(node.getName().getIdentifier()) ) { //$NON-NLS-1$
		List arguments = node.arguments();
		if (arguments.size() == 2) {
			Object o = arguments.get(1);
			if (o instanceof StringLiteral) {
				StringLiteral literal = (StringLiteral) o;
				if (fileNames.contains(literal.getLiteralValue())) {
					artifactFileName = literal;
					isAddAsManifestMethod = true;
				}
			}
		}
	}
{code}



was (Author: ljelinko):
The validation still does not work for

{code}
war.addAsWebResource(EmptyAsset.INSTANCE, "persistence.xml");
{code}

I think there is bug in the code where isAddAsManifestMethod is set to true instead of isAddAsWebResource.
{code}
if (node.getName() != null && ArquillianConstants.ADD_AS_WEB_RESOURCE.equals(node.getName().getIdentifier()) ) { //$NON-NLS-1$
						List arguments = node.arguments();
						if (arguments.size() == 2) {
							Object o = arguments.get(1);
							if (o instanceof StringLiteral) {
								StringLiteral literal = (StringLiteral) o;
								if (fileNames.contains(literal.getLiteralValue())) {
									artifactFileName = literal;
									isAddAsManifestMethod = true;
								}
							}
						}
					}
{code}


> Fix ShrinkWrap Archive file location validation issues
> ------------------------------------------------------
>
>                 Key: JBIDE-19349
>                 URL: https://issues.jboss.org/browse/JBIDE-19349
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: arquillian
>    Affects Versions: 4.3.0.Alpha1
>            Reporter: Lucia Jelinkova
>            Assignee: Snjezana Peco
>             Fix For: 4.3.0.Beta2
>
>
> In JBIDE-14782, the validation was solved only partially. These issues still remain:
> - EAR - no validation for application.xml
> - WAR
> -- validation for beans.xml and web.xml going to WEB-INF
> --- addAsManifestResource - OK
> --- addAsWebResource - NOK
> -- validation for persistence.xml and ejb-jar.xml
> --- addAsWebInfResource - OK
> --- addAsWebResource - NOK



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list