[ 
https://issues.apache.org/jira/browse/ARCHETYPE-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vadym Lotar updated ARCHETYPE-530:
----------------------------------
    Description: 
Hello,

While trying to create an archetype out of source project applying global 
settings.xml which contains proxy configuration, plugin fails with the 
following error:

{color:red}[INFO] Scanning for projects...
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-packaging/3.0.1/archetype-packaging-3.0.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin 
org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.archetype:archetype-packaging:jar:3.0.1 @ 
[ERROR] Unknown packaging: maven-archetype @ line 8, column 14
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.adidas.pc:kafka_consumer-archetype:1.0-SNAPSHOT 
(/opt/jenkins/workspace/PC/pcdsp/archetypes/kafka-consumer-archetype-build/target/generated-sources/archetype/pom.xml)
 has 2 errors
[ERROR]     Unresolveable build extension: Plugin 
org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.archetype:archetype-packaging:jar:3.0.1: Could not transfer 
artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.1 from/to 
central (https://repo.maven.apache.org/maven2): Connect to 
repo.maven.apache.org:443 [repo.maven.apache.org/151.101.112.215] failed: 
Connection timed out (Connection timed out) -> [Help 2]
[ERROR]     Unknown packaging: maven-archetype @ line 8, column 14{color}

It appeared that the plugin creates new 
org.apache.maven.shared.invoker.InvocationRequest to "package" the archetype 
without applying configuration specified in settings.xml.

Being more precise, I feel like the invocation request itself has to be built 
in a little bit different way here, so local and global settings.xml are passed:
org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:281

Please, let me know if more information needs to be provided.

Best.



----

{color:red}[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project 
(default-cli) on project kafka_consumer: Invoker process ended with result 
different than 0! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project 
(default-cli) on project kafka_consumer: Invoker process ended with result 
different than 0!
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        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:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Invoker process ended 
with result different than 0!
        at 
org.apache.maven.archetype.mojos.CreateArchetypeFromProjectMojo.execute(CreateArchetypeFromProjectMojo.java:261)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more{color}

  was:
Hello,

While trying to create an archetype out of source project applying global 
settings.xml which contains proxy configuration, plugin fails with the 
following error:

{color:red}[INFO] Scanning for projects...
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-packaging/3.0.1/archetype-packaging-3.0.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin 
org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.archetype:archetype-packaging:jar:3.0.1 @ 
[ERROR] Unknown packaging: maven-archetype @ line 8, column 14
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.adidas.pc:kafka_consumer-archetype:1.0-SNAPSHOT 
(/opt/jenkins/workspace/PC/pcdsp/archetypes/kafka-consumer-archetype-build/target/generated-sources/archetype/pom.xml)
 has 2 errors
[ERROR]     Unresolveable build extension: Plugin 
org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.archetype:archetype-packaging:jar:3.0.1: Could not transfer 
artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.1 from/to 
central (https://repo.maven.apache.org/maven2): Connect to 
repo.maven.apache.org:443 [repo.maven.apache.org/151.101.112.215] failed: 
Connection timed out (Connection timed out) -> [Help 2]
[ERROR]     Unknown packaging: maven-archetype @ line 8, column 14{color}

It appeared that the plugin creates new 
org.apache.maven.shared.invoker.InvocationRequest to "package" the archetype 
without applying configuration specified in settings.xml.

Being more precise, I feel like the invocation request itself has to be built 
in a little bit different way here, so local and global settings.xml are passed:
org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:281

Please, let me know if more information needs to be provided.

Best.



> [archetype:create-from-project] Proxy configuration from settings.xml is not 
> taken into account
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-530
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-530
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Plugin
>    Affects Versions: 3.0.1
>            Reporter: Vadym Lotar
>
> Hello,
> While trying to create an archetype out of source project applying global 
> settings.xml which contains proxy configuration, plugin fails with the 
> following error:
> {color:red}[INFO] Scanning for projects...
> [INFO] Downloading: 
> https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-packaging/3.0.1/archetype-packaging-3.0.1.pom
> [ERROR] [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] Unresolveable build extension: Plugin 
> org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor for 
> org.apache.maven.archetype:archetype-packaging:jar:3.0.1 @ 
> [ERROR] Unknown packaging: maven-archetype @ line 8, column 14
>  @ 
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]   
> [ERROR]   The project com.adidas.pc:kafka_consumer-archetype:1.0-SNAPSHOT 
> (/opt/jenkins/workspace/PC/pcdsp/archetypes/kafka-consumer-archetype-build/target/generated-sources/archetype/pom.xml)
>  has 2 errors
> [ERROR]     Unresolveable build extension: Plugin 
> org.apache.maven.archetype:archetype-packaging:3.0.1 or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor for 
> org.apache.maven.archetype:archetype-packaging:jar:3.0.1: Could not transfer 
> artifact org.apache.maven.archetype:archetype-packaging:pom:3.0.1 from/to 
> central (https://repo.maven.apache.org/maven2): Connect to 
> repo.maven.apache.org:443 [repo.maven.apache.org/151.101.112.215] failed: 
> Connection timed out (Connection timed out) -> [Help 2]
> [ERROR]     Unknown packaging: maven-archetype @ line 8, column 14{color}
> It appeared that the plugin creates new 
> org.apache.maven.shared.invoker.InvocationRequest to "package" the archetype 
> without applying configuration specified in settings.xml.
> Being more precise, I feel like the invocation request itself has to be built 
> in a little bit different way here, so local and global settings.xml are 
> passed:
> org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:281
> Please, let me know if more information needs to be provided.
> Best.
> ----
> {color:red}[ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project 
> (default-cli) on project kafka_consumer: Invoker process ended with result 
> different than 0! -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal 
> org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project 
> (default-cli) on project kafka_consumer: Invoker process ended with result 
> different than 0!
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>       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:116)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>       at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoFailureException: Invoker process 
> ended with result different than 0!
>       at 
> org.apache.maven.archetype.mojos.CreateArchetypeFromProjectMojo.execute(CreateArchetypeFromProjectMojo.java:261)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>       ... 20 more{color}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to