[jira] [Comment Edited] (ARCHETYPE-478) cannot run archetype:create-from-project when dependency on maven-ear-plugin

2015-06-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/ARCHETYPE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14578667#comment-14578667
 ] 

Pop Qvarnström edited comment on ARCHETYPE-478 at 6/9/15 10:20 AM:
---

FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

!Debug screenshot showing call stack.png!
!Debug screenshot showing more call stack.png!



was (Author: popq):
FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

!Debug screenshot showing call stack.png|thumbnail!
!Debug screenshot showing more call stack.png|thumbnail!


 cannot run archetype:create-from-project when dependency on maven-ear-plugin
 

 Key: ARCHETYPE-478
 URL: https://issues.apache.org/jira/browse/ARCHETYPE-478
 Project: Maven Archetype
  Issue Type: Bug
Affects Versions: 2.3
 Environment: Windows 7, Maven 3.2.5 and 3.0.5, JDK 7.0.75
Reporter: Bernard LUPIN
 Attachments: Debug screenshot showing call stack.png, Debug 
 screenshot showing more call stack.png, myproj.zip


 I'm migrating maven-archetype-plugin from 2.2 to 2.3.
 I cannot create an archetype if my project has a dependency on 
 maven-ear-plugin.
 Using attached pom.xml and running mvn archetype:create-from-project gives me 
 following error :
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null: MojoFailureException - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
 Caused by: org.apache.maven.plugin.MojoFailureException
 at 
 

[jira] [Comment Edited] (ARCHETYPE-478) cannot run archetype:create-from-project when dependency on maven-ear-plugin

2015-06-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/ARCHETYPE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14578667#comment-14578667
 ] 

Pop Qvarnström edited comment on ARCHETYPE-478 at 6/9/15 10:21 AM:
---

FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

Where it blows up:
!Debug screenshot showing call stack.png!

Source of the call:
!Debug screenshot showing more call stack.png!



was (Author: popq):
FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

!Debug screenshot showing call stack.png!
!Debug screenshot showing more call stack.png!


 cannot run archetype:create-from-project when dependency on maven-ear-plugin
 

 Key: ARCHETYPE-478
 URL: https://issues.apache.org/jira/browse/ARCHETYPE-478
 Project: Maven Archetype
  Issue Type: Bug
Affects Versions: 2.3
 Environment: Windows 7, Maven 3.2.5 and 3.0.5, JDK 7.0.75
Reporter: Bernard LUPIN
 Attachments: Debug screenshot showing call stack.png, Debug 
 screenshot showing more call stack.png, myproj.zip


 I'm migrating maven-archetype-plugin from 2.2 to 2.3.
 I cannot create an archetype if my project has a dependency on 
 maven-ear-plugin.
 Using attached pom.xml and running mvn archetype:create-from-project gives me 
 following error :
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null: MojoFailureException - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
 Caused by: org.apache.maven.plugin.MojoFailureException
 at 
 

[jira] [Comment Edited] (ARCHETYPE-478) cannot run archetype:create-from-project when dependency on maven-ear-plugin

2015-06-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/ARCHETYPE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14578667#comment-14578667
 ] 

Pop Qvarnström edited comment on ARCHETYPE-478 at 6/9/15 10:19 AM:
---

FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

!Debug screenshot showing call stack.png|thumbnail!
!Debug screenshot showing more call stack.png|thumbnail!



was (Author: popq):
FilesetArchetypeCreator:rewriteEARPluginReferences(...) seems to be the place 
where it blows up, while rewriting pluginManagement items. Ear plugin 
references are treated specially, and a configuration seems to be expected. If 
there is none (not uncommon in plugin management), there will be an NPE.
{code:title=FilesetArchetypeCreator.java:686-}
private void rewriteEARPluginReferences( Plugin plugin, String 
rootArtifactId, String groupId )
{
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
HERE --Xpp3Dom[] modules = configuration.getChild( modules ).getChildren();
for ( int i = 0; i  modules.length; i++ )
{code}

 cannot run archetype:create-from-project when dependency on maven-ear-plugin
 

 Key: ARCHETYPE-478
 URL: https://issues.apache.org/jira/browse/ARCHETYPE-478
 Project: Maven Archetype
  Issue Type: Bug
Affects Versions: 2.3
 Environment: Windows 7, Maven 3.2.5 and 3.0.5, JDK 7.0.75
Reporter: Bernard LUPIN
 Attachments: Debug screenshot showing call stack.png, Debug 
 screenshot showing more call stack.png, myproj.zip


 I'm migrating maven-archetype-plugin from 2.2 to 2.3.
 I cannot create an archetype if my project has a dependency on 
 maven-ear-plugin.
 Using attached pom.xml and running mvn archetype:create-from-project gives me 
 following error :
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null: MojoFailureException - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal org.apache.maven.plugins:maven-archetype-plugin:2.3:create-from-project 
 (default-cli) on project myproj: null
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
 at 
 org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
 Caused by: org.apache.maven.plugin.MojoFailureException
 at 
 org.apache.maven.archetype.mojos.CreateArchetypeFromProjectMojo.execute(CreateArchetypeFromProjectMojo.java:258)
 at