[JBoss JIRA] (JBIDE-14782) Add ShrinkWrap Archive file location validation
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14782?page=com.atlassian.jira.plugi... ]
Aslak Knutsen updated JBIDE-14782:
----------------------------------
Description:
*Given*
A Deployment method
*When*
{code}
war.addAsManifestResource(X, "beans.xml")
ear.addAsManifestResource(X, "beans.xml")
war.addAsManifestResource(X, "persistence.xml")
{code}
*Then*
Warn that known EE descriptor files are in the wrong location
Some mapping on top of my head:
WebArchive
{code}
web.xml -> /WEB-INF/
web-fragment.xml -> Not supported ?
beans.xml -> /WEB-INF/
persistence.xml -> /WEB-INF/classes/META-INF/
ejb-jar.xml -> /WEB-INF/classes/META-INF/
{code}
JavaArchive
{code}
web.xml -> Not supported
web-fragment.xml -> /META-INF/
beans.xml -> /META-INF/
persistence.xml -> /META-INF/
ejb-jar.xml -> /META-INF/
{code}
EnterpriseArchive
{code}
beans.xml -> Not supported
persistence.xml -> Not supported
ejb-jar.xml -> Not supported
application.xml -> /META-INF/
{code}
One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEb-INF/
was:
*Given*
A Deployment method
*When*
{code}
war.addAsManifestResource(X, "beans.xml")
ear.addAsManifestResource(X, "beans.xml")
war.addAsManifestResource(X, "persistence.xml")
{code}
*Then*
Warn that known EE descriptor files are in the wrong location
Some mapping on top of my head:
WebArchive
web.xml -> /WEB-INF/
web-fragment.xml -> Not supported ?
beans.xml -> /WEB-INF/
persistence.xml -> /WEB-INF/classes/META-INF/
ejb-jar.xml -> /WEB-INF/classes/META-INF/
JavaArchive
web.xml -> Not supported
web-fragment.xml -> /META-INF/
beans.xml -> /META-INF/
persistence.xml -> /META-INF/
ejb-jar.xml -> /META-INF/
EnterpriseArchive
beans.xml -> Not supported
persistence.xml -> Not supported
ejb-jar.xml -> Not supported
application.xml -> /META-INF/
One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEb-INF/
> Add ShrinkWrap Archive file location validation
> -----------------------------------------------
>
> Key: JBIDE-14782
> URL: https://issues.jboss.org/browse/JBIDE-14782
> Project: Tools (JBoss Tools)
> Issue Type: Sub-task
> Components: testing-tools
> Reporter: Aslak Knutsen
> Fix For: 4.1.0.Beta2
>
>
> *Given*
> A Deployment method
> *When*
> {code}
> war.addAsManifestResource(X, "beans.xml")
> ear.addAsManifestResource(X, "beans.xml")
> war.addAsManifestResource(X, "persistence.xml")
> {code}
> *Then*
> Warn that known EE descriptor files are in the wrong location
> Some mapping on top of my head:
> WebArchive
> {code}
> web.xml -> /WEB-INF/
> web-fragment.xml -> Not supported ?
> beans.xml -> /WEB-INF/
> persistence.xml -> /WEB-INF/classes/META-INF/
> ejb-jar.xml -> /WEB-INF/classes/META-INF/
> {code}
> JavaArchive
> {code}
> web.xml -> Not supported
> web-fragment.xml -> /META-INF/
> beans.xml -> /META-INF/
> persistence.xml -> /META-INF/
> ejb-jar.xml -> /META-INF/
> {code}
> EnterpriseArchive
> {code}
> beans.xml -> Not supported
> persistence.xml -> Not supported
> ejb-jar.xml -> Not supported
> application.xml -> /META-INF/
> {code}
> One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEb-INF/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14782) Add ShrinkWrap Archive file location validation
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14782?page=com.atlassian.jira.plugi... ]
Aslak Knutsen updated JBIDE-14782:
----------------------------------
Description:
*Given*
A Deployment method
*When*
{code}
war.addAsManifestResource(X, "beans.xml")
ear.addAsManifestResource(X, "beans.xml")
war.addAsManifestResource(X, "persistence.xml")
{code}
*Then*
Warn that known EE descriptor files are in the wrong location
Some mapping on top of my head:
WebArchive
{code}
web.xml -> /WEB-INF/
web-fragment.xml -> Not supported ?
beans.xml -> /WEB-INF/
persistence.xml -> /WEB-INF/classes/META-INF/
ejb-jar.xml -> /WEB-INF/classes/META-INF/
{code}
JavaArchive
{code}
web.xml -> Not supported
web-fragment.xml -> /META-INF/
beans.xml -> /META-INF/
persistence.xml -> /META-INF/
ejb-jar.xml -> /META-INF/
{code}
EnterpriseArchive
{code}
beans.xml -> Not supported
persistence.xml -> Not supported
ejb-jar.xml -> Not supported
application.xml -> /META-INF/
{code}
One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEB-INF/
was:
*Given*
A Deployment method
*When*
{code}
war.addAsManifestResource(X, "beans.xml")
ear.addAsManifestResource(X, "beans.xml")
war.addAsManifestResource(X, "persistence.xml")
{code}
*Then*
Warn that known EE descriptor files are in the wrong location
Some mapping on top of my head:
WebArchive
{code}
web.xml -> /WEB-INF/
web-fragment.xml -> Not supported ?
beans.xml -> /WEB-INF/
persistence.xml -> /WEB-INF/classes/META-INF/
ejb-jar.xml -> /WEB-INF/classes/META-INF/
{code}
JavaArchive
{code}
web.xml -> Not supported
web-fragment.xml -> /META-INF/
beans.xml -> /META-INF/
persistence.xml -> /META-INF/
ejb-jar.xml -> /META-INF/
{code}
EnterpriseArchive
{code}
beans.xml -> Not supported
persistence.xml -> Not supported
ejb-jar.xml -> Not supported
application.xml -> /META-INF/
{code}
One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEb-INF/
> Add ShrinkWrap Archive file location validation
> -----------------------------------------------
>
> Key: JBIDE-14782
> URL: https://issues.jboss.org/browse/JBIDE-14782
> Project: Tools (JBoss Tools)
> Issue Type: Sub-task
> Components: testing-tools
> Reporter: Aslak Knutsen
> Fix For: 4.1.0.Beta2
>
>
> *Given*
> A Deployment method
> *When*
> {code}
> war.addAsManifestResource(X, "beans.xml")
> ear.addAsManifestResource(X, "beans.xml")
> war.addAsManifestResource(X, "persistence.xml")
> {code}
> *Then*
> Warn that known EE descriptor files are in the wrong location
> Some mapping on top of my head:
> WebArchive
> {code}
> web.xml -> /WEB-INF/
> web-fragment.xml -> Not supported ?
> beans.xml -> /WEB-INF/
> persistence.xml -> /WEB-INF/classes/META-INF/
> ejb-jar.xml -> /WEB-INF/classes/META-INF/
> {code}
> JavaArchive
> {code}
> web.xml -> Not supported
> web-fragment.xml -> /META-INF/
> beans.xml -> /META-INF/
> persistence.xml -> /META-INF/
> ejb-jar.xml -> /META-INF/
> {code}
> EnterpriseArchive
> {code}
> beans.xml -> Not supported
> persistence.xml -> Not supported
> ejb-jar.xml -> Not supported
> application.xml -> /META-INF/
> {code}
> One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEB-INF/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14782) Add ShrinkWrap Archive file location validation
by Aslak Knutsen (JIRA)
Aslak Knutsen created JBIDE-14782:
-------------------------------------
Summary: Add ShrinkWrap Archive file location validation
Key: JBIDE-14782
URL: https://issues.jboss.org/browse/JBIDE-14782
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: testing-tools
Reporter: Aslak Knutsen
*Given*
A Deployment method
*When*
{code}
war.addAsManifestResource(X, "beans.xml")
ear.addAsManifestResource(X, "beans.xml")
war.addAsManifestResource(X, "persistence.xml")
{code}
*Then*
Warn that known EE descriptor files are in the wrong location
Some mapping on top of my head:
WebArchive
web.xml -> /WEB-INF/
web-fragment.xml -> Not supported ?
beans.xml -> /WEB-INF/
persistence.xml -> /WEB-INF/classes/META-INF/
ejb-jar.xml -> /WEB-INF/classes/META-INF/
JavaArchive
web.xml -> Not supported
web-fragment.xml -> /META-INF/
beans.xml -> /META-INF/
persistence.xml -> /META-INF/
ejb-jar.xml -> /META-INF/
EnterpriseArchive
beans.xml -> Not supported
persistence.xml -> Not supported
ejb-jar.xml -> Not supported
application.xml -> /META-INF/
One common mistake is using addAsManifestResource on WebArchives. A quickfix / suggestion would be to use addAsWebInfResource for the files located in /WEb-INF/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14781) 'Generate Deployment Method Dialog' should warn of Type and Name.extension missmatch
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14781?page=com.atlassian.jira.plugi... ]
Aslak Knutsen updated JBIDE-14781:
----------------------------------
Description:
*Given*
Generate Deployment Method Dialog
*When*
* Select Archive Type: WebArchive
* Type Archive Name: test.jar
*Then*
Validate the Type Name combination and give warning according to the same rules used in JBIDE-14780
was:
*Given*
Generate Deployment Method Dialog
*When*
* Select Archive Type: WebArchive
* Type Archive Name: test.jar
*Then*
Validate the Type Name combination and give warning according to the same rules rules used in JBIDE-14780
> 'Generate Deployment Method Dialog' should warn of Type and Name.extension missmatch
> ------------------------------------------------------------------------------------
>
> Key: JBIDE-14781
> URL: https://issues.jboss.org/browse/JBIDE-14781
> Project: Tools (JBoss Tools)
> Issue Type: Sub-task
> Components: testing-tools
> Reporter: Aslak Knutsen
> Fix For: 4.1.0.Beta2
>
>
> *Given*
> Generate Deployment Method Dialog
> *When*
> * Select Archive Type: WebArchive
> * Type Archive Name: test.jar
> *Then*
> Validate the Type Name combination and give warning according to the same rules used in JBIDE-14780
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14780) Add ShrinkWrap Archive name/type validation
by Aslak Knutsen (JIRA)
Aslak Knutsen created JBIDE-14780:
-------------------------------------
Summary: Add ShrinkWrap Archive name/type validation
Key: JBIDE-14780
URL: https://issues.jboss.org/browse/JBIDE-14780
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Reporter: Aslak Knutsen
*Given*
{code}
ShrinkWrap.create(WebArchive.class, "test.jar")
ShrinkWrap.create(WebArchive.class, "test.ear")
ShrinkWrap.create(JavaArchive.class, "test.ear")
ShrinkWrap.create(WebArchive.class, "test")
{code}
*When*
User is creating a Archive
*Then*
The known Archive types should match given archive name extensions.
*Expected*
Warning; Creating an archive of type WebArchive but given name does not match to predefined name extension; .war
*Actual*
Nothing.. waits for Arquillian to fail.
This is a very common and annoying user error. The Container/Server will 99% of the time rely on the deployment file extension to determine what type of archive this is. While our 'WebArchive' Archive types are only convenience views on how to add data to correct locations within the target archive and can be any type; we choose to validate this runtime in Arquillian core to warn that 'hey, this is probably not what you intended to do' to hopefully save users from a few hours pointless debugging.
See https://github.com/arquillian/arquillian-core/blob/master/container/spi/s... for our extension type mapping.
Our validation logic is; if extension does not match, but Archive is of Type then warn.
That allows users to use Custom views without warning.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14779) 'Generate deployment method' add Archive Type 'rar'
by Aslak Knutsen (JIRA)
Aslak Knutsen created JBIDE-14779:
-------------------------------------
Summary: 'Generate deployment method' add Archive Type 'rar'
Key: JBIDE-14779
URL: https://issues.jboss.org/browse/JBIDE-14779
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Reporter: Aslak Knutsen
*Given*
Generate Deployment Method Dialog
*When*
Selecting Archive Type
*Then*
Show all known EE Archive types
*Expected*
JavaArchive, WebArchive, EnterpriseArchive and ResourceAdapterArchive
*Actual*
ResourceAdapterArchive is missing
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14778) 'Generate deployment method' uses wrong location for option 'add empty beans.xml' when war type is selected
by Aslak Knutsen (JIRA)
Aslak Knutsen created JBIDE-14778:
-------------------------------------
Summary: 'Generate deployment method' uses wrong location for option 'add empty beans.xml' when war type is selected
Key: JBIDE-14778
URL: https://issues.jboss.org/browse/JBIDE-14778
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: testing-tools
Reporter: Aslak Knutsen
Given:
Generate Deployment Method Dialog
When:
* Archive type: WebArchive
* Add an empty beans.xml file: true
Then:
Generated ShrinkWrap deployment should have a EmptyAsset.INSTANCE to beans.xml mapping added in the correct location.
*Expected*
When WebArchive:
{code}
archive.addAsWebInfResource(EmptyAsset.INSTNACE, "beans.xml")
{code}
When JavaArchive:
{code}
archive.addAsManifestResource(EmptyAsset.INSTNACE, "beans.xml")
{code}
When Enterprise Archive:
Field _Add an empty beans.xml file_ should be disabled. No CDI on EAR level in spec.
Actual result:
Both JavaArchive, WebArchive, EnterpriseArchive use ManifestResource location
{code}
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months