forge / plugin-arquillian

Forge Arquillian Plugin
http://www.jboss.org/arquillian
19 stars 16 forks source link

To create a new test, we shouldn't need to specify the project root in the path #36

Open agoncal opened 10 years ago

agoncal commented 10 years ago

I am scaffolding a JSF application with Forge. Then, I create a test but, without specifying the project root, it doesn't work. Here is how to reproduce it. In this example I create a project (arqproject), an entity, generate a backing bean, and then I want to create a test class. If I use code completion (pressing TAB) I end up with a path that doesn't contain arqproject and it doesn't work. I have to manually add it:

[temp]$ project-new --named arqproject
[arqproject]$ jpa-new-entity --named ArqEntity
[ArqEntity.java]$ jpa-new-field --named arqField
[ArqEntity.java]$ scaffold-generate --targets org.arqproject.model.ArqEntity
[ArqEntity.java]$ cd ~~
[arqproject]$ arquillian-setup --testFramework junit
[arqproject]$ arquillian-create-test --value src/main/java/org/arqproject/view/ArqEntityBean.java
***ERROR*** cannot obtain stream to file: file does not exist: /Users/antoniombp/Documents/Code/Devoxx/src/main/java/org/arqproject/view/ArqEntityBean.java
[arqproject]$ arquillian-create-test --value arqproject/src/main/java/org/arqproject/view/ArqEntityBean.java
aslakknutsen commented 10 years ago

I don't think this is a Arquillian Plugin issue, but rather a Forge Core issue; https://issues.jboss.org/browse/FORGE-1645

agoncal commented 10 years ago

Arghhh !!! That's the one bug I would really need to be fixed. Well, I'll ping George about this

aslakknutsen commented 10 years ago

The current 'resolution' is; work around it in your Addon.

gastaldi commented 10 years ago

This is an Aesh limitation, which only accepts existing File objects as the current directory. I believe @stalep is already working on a fix.

Em 11/06/2014, às 07:05, Aslak Knutsen notifications@github.com escreveu:

The current 'resolution' is; work around it in your Addon.

— Reply to this email directly or view it on GitHub.