You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Felipe Leme (JIRA)" <ji...@codehaus.org> on 2005/10/24 20:23:11 UTC
[jira] Created: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Allow project to be generated somewhere else ${basedir}
-------------------------------------------------------
Key: MPGENAPP-24
URL: http://jira.codehaus.org/browse/MPGENAPP-24
Project: maven-genapp-plugin
Type: Improvement
Versions: 2.2
Reporter: Felipe Leme
Assigned to: Felipe Leme
Priority: Minor
Fix For: 2.3
When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Felipe Leme (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=comments#action_49260 ]
Felipe Leme commented on MPGENAPP-24:
-------------------------------------
Hi again,
I tried to set the properties to skip the prompt, but it didn't work, I mean, not all the questions were skipped; I will try again anyway.
Regarding the invokeStatic, I will take a look on the xdocs plugin. What I know works is to access a class that is included in a dependency; if that's the case, I could move that class to the main plugin (in fact, doing so would allow to reuse it for other genapp test cases).
-- Felipe
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=comments#action_49258 ]
Arnaud Heritier commented on MPGENAPP-24:
-----------------------------------------
Hi Felipe.
Did you see that you could bypass the <i:ask> with something like :
maven -Dtemplate=default -Dmaven.genapp.template.id=myId -Dmaven.genapp.template.name="My Name" -Dmaven.genapp.template.package=org.apache.mypackage genapp
For the problem of class not found, I don't know what happens.
Did you take a look at the xdoc plugin ? There are some invokeStatic . For example :
<j:invokeStatic className="org.apache.maven.xdoc.util.LocaleUtil" method="codeToLocale" var="defaultLocale">
<j:arg value="${maven.xdoc.locale.default}" type="java.lang.String"/>
</j:invokeStatic>
I don't understand why it doesn't work for you. It's very similar.
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Felipe Leme (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=all ]
Felipe Leme closed MPGENAPP-24:
-------------------------------
Resolution: Fixed
Fixed.
PS: I added a test case, although the test case interactes with the user (which is bad :-(.
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Felipe Leme (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=comments#action_49207 ]
Felipe Leme commented on MPGENAPP-24:
-------------------------------------
Hi Arnauld,
Well, at least after months of inactivity I contributed with something useful :-)
Now we just need to figure it out an elegant way to bypass those <i:ask> questions...
-- Felipe
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=comments#action_49180 ]
Arnaud Heritier commented on MPGENAPP-24:
-----------------------------------------
You read in my mind Felipe.
Some weeks ago I wanted to add tests for the plugin and I found I couldn't do it due to this limitation !!
Thanks a lot to did it.
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MPGENAPP-24) Allow project to be generated somewhere else ${basedir}
Posted by "Felipe Leme (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPGENAPP-24?page=comments#action_49257 ]
Felipe Leme commented on MPGENAPP-24:
-------------------------------------
Arnauld,
I have createad a class that sets the System.in to always return enter:
package org.apache.maven.genapp.testing;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
public class NewlinerInputStream extends BufferedInputStream {
private static final InputStream SYSTEM_IN = System.in;
private static final NewlinerInputStream THE_INSTANCE = new NewlinerInputStream(SYSTEM_IN);
public static void replaceSystemIn() {
System.setIn( THE_INSTANCE );
}
public NewlinerInputStream(InputStream in) {
super(in);
}
public synchronized int read(byte[] b, int off, int len) throws IOException {
b[0] = '\n';
return 1;
}
}
And then on maven.xml I used:
<goal name="test-genapp" prereqs="clean,java:compile">
<j:invokeStatic className="org.apache.maven.genapp.testing.NewlinerInputStream" method="replaceSystemIn"/>
<attainGoal name="genapp"/>
</goal>
But I got a ClassNotFoundException:
BUILD FAILED
File...... e:\cvs\maven\svn\plugins\trunk\genapp\src\plugin-test\basedirTest\mav
en.xml
Element... j:invokeStatic
Line...... 30
Column.... 110
org.apache.maven.genapp.testing.NewlinerInputStream
Total time: 2 seconds
Finished at: Tue Oct 25 18:31:39 BRST 2005
Do you know how should I set Jelly to use that class (which is under src/main on the plugin - I have also set the <build> on the testcase's POM to that value)?
Thks,
-- Felipe
> Allow project to be generated somewhere else ${basedir}
> -------------------------------------------------------
>
> Key: MPGENAPP-24
> URL: http://jira.codehaus.org/browse/MPGENAPP-24
> Project: maven-genapp-plugin
> Type: Improvement
> Versions: 2.2
> Reporter: Felipe Leme
> Assignee: Felipe Leme
> Priority: Minor
> Fix For: 2.3
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> When you run genapp, it creates the new project in the current directory. I see at least one situation (which is why I'm creating this issue) where that is not desired: when creating test cases for this plugin!
> So, I will create a maven.genapp.basedir property to fix this issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org