[JBoss JIRA] (FORGE-385) Current directory is poor default for new-project location when existing project is detected
by Dan Allen (Created) (JIRA)
Current directory is poor default for new-project location when existing project is detected
--------------------------------------------------------------------------------------------
Key: FORGE-385
URL: https://issues.jboss.org/browse/FORGE-385
Project: Forge
Issue Type: Enhancement
Components: Builtin Plugins
Affects Versions: 1.0.0.Beta3
Reporter: Dan Allen
Assignee: Lincoln Baxter III
Priority: Minor
When creating a new project using the new-project command, forge will offer the current directory as the target location if a project with the same name is found.
{code}
$ new-project --named example --topLevelPackage org.example
***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
Where would you like to create the project? [Press ENTER to use the current directory: dallen]
{code}
This default is a recipe for disaster. If there is a project in the way, then using the current directory puts that project *in* the project being created. Additionally, if the current directory is $HOME, then the project will get overlaid in a directory which has many other files and directories.
A better default is to append a number to the end of the project name. For example:
{code}
$ new-project --named example --topLevelPackage org.example
***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
Where would you like to create the project? [Press ENTER to use an alternative directory: example2]
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (FORGE-518) projectFactory.createProjet doesn't work out of embeded plugins
by Guillaume Gustin (JIRA)
Guillaume Gustin created FORGE-518:
--------------------------------------
Summary: projectFactory.createProjet doesn't work out of embeded plugins
Key: FORGE-518
URL: https://issues.jboss.org/browse/FORGE-518
Project: Forge
Issue Type: Bug
Components: Builtin Plugins, Forge Build
Affects Versions: 1.0.0.Final
Environment: Windows XP Professional Service Pack 3 - 32 bits
Reporter: Guillaume Gustin
Priority: Blocker
I want to create a new plugin which allow to create a solution (set of projects) based on a specific solution model. But when the forge execute the project building code "projectFactory.createProject(targetProjectDir, DependencyFacet.class, MetadataFacet.class, JavaSourceFacet.class, ResourceFacet.class)" i receive the exception "org.jboss.forge.project.ProjectModelException" with the message "Could not create Maven project building request"
When i fire my new plugin, my forge promps is "[no project] myTempdir $ ", I have the same exception when I copy the "new-project plugin" as "new-new-project plugin".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (FORGE-471) JavaResource handling of files with nested classes is incorrect
by Rudy De Busscher (JIRA)
Rudy De Busscher created FORGE-471:
--------------------------------------
Summary: JavaResource handling of files with nested classes is incorrect
Key: FORGE-471
URL: https://issues.jboss.org/browse/FORGE-471
Project: Forge
Issue Type: Bug
Components: Parsers / File Manipulation, Resources API
Affects Versions: 1.0.0.Beta5
Reporter: Rudy De Busscher
In the case you have following java source file
public class Test {
private String mainProperty;
public void mainMethod() {
System.out.println("Hi");
}
public static final class Nested {
private String innerProperty;
public void innerMethod() {
System.out.println("I'm inner");
}
}
}
And running following statements
JavaResource javaResource = factory.getResourceFrom(new File"/path/to/file/Test.java")).reify(JavaResource.class);
System.out.println(javaResource.toString());
List<Resource<?>> resources = javaResource.listResources();
for (Resource res : resources) {
System.out.println(res.getFullyQualifiedName());
}
You get following output
be.rubus.forge.deltaspike.test.projectstage.Nested
/path/to/file/Test.java/innerProperty::String
/path/to/file/Test.java/mainMethod()::void
/path/to/file/Test.java/innerMethod()::void
The wrong name is due to the fact that TypeDeclarationFinderVisitor records every class type the parser finds. In our case the 2 class names but only the last one is kept (first name is overwritten)
The MethodFinderVisitor has a similar problem, it gets called twice and adds up the found methods.
So there need to be a general review of the visitors to be able to handle nested or multiple classes in one java source file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (FORGE-552) Escaping of selected characters doesn't work
by Jevgeni Zelenkov (JIRA)
Jevgeni Zelenkov created FORGE-552:
--------------------------------------
Summary: Escaping of selected characters doesn't work
Key: FORGE-552
URL: https://issues.jboss.org/browse/FORGE-552
Project: Forge
Issue Type: Bug
Components: Forge Build
Affects Versions: 1.0.2.Final
Environment: Ubuntu 10.04 i686
Reporter: Jevgeni Zelenkov
This is related to the https://issues.jboss.org/browse/FORGE-43 issue.
The following characters in file names should be escaped by the forge completion:
* ? = ' " { } \ $ ! & ; ( ) < > |
also: TAB-char (yes, I know it is stupid, but possible)
First two (*, ?) are used internally as wildcard chars, so should be allowed to be used escaped as well as unescaped.
= char doesn't need to be escaped neither on linux nor on windows but somehow forge fails to work with files containing = (at least on my ubuntu).
Windows has a slightly different set of chars to be escaped (from wikipedia, not actually tested):
' " = & | ( ) < > ^
This issue is added for completeness.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months