[ 
https://issues.apache.org/jira/browse/ARCHETYPE-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026036#comment-16026036
 ] 

João Cabrita commented on ARCHETYPE-528:
----------------------------------------

And, after some more investigation:

Using
{noformat}
-P camunda -X -DgroupId=the.groupId -DartifactId=bpm-stuff 
-Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.camunda.bpm.archetype 
-DarchetypeArtifactId=camunda-archetype-servlet-war -DarchetypeVersion=7.6.2 
-DarchetypeRepository=https://app.camunda.com/nexus/content/repositories/camunda-bpm/
 org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
{noformat}

I get the following output:
{noformat}
[INFO] Generating project in Interactive mode
[DEBUG] Searching for remote catalog: 
https://repo.maven.apache.org/maven2/archetype-catalog.xml
[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
[DEBUG] Using catalog C:\Users\joao.cabrita\.m2\repository\archetype-catalog.xml
[WARNING] Archetype not found in any catalog. Falling back to central 
repository.
[WARNING] Add a repsoitory with id 'archetype' in your settings.xml if 
archetype's repository is elsewhere.
[DEBUG] Not found archetype 
org.camunda.bpm.archetype:camunda-archetype-servlet-war:7.6.2 in cache
[DEBUG] Using transporter WagonTransporter with priority -1.0 for 
https://app.camunda.com/nexus/content/repositories/camunda-bpm
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for 
https://app.camunda.com/nexus/content/repositories/camunda-bpm via 
proxy.brisa.pt:3128 with username=****, password=***
Downloading: 
https://app.camunda.com/nexus/content/repositories/camunda-bpm/org/camunda/bpm/archetype/camunda-archetype-servlet-war/7.6.2/camunda-archetype-servlet-war-7.6.2.pom
Downloaded: 
https://app.camunda.com/nexus/content/repositories/camunda-bpm/org/camunda/bpm/archetype/camunda-archetype-servlet-war/7.6.2/camunda-archetype-servlet-war-7.6.2.pom
 (2 KB at 2.9 KB/sec)
{noformat}

So it seems to me that some things aren't quite right:
* maven central is hardcoded into the plugin
* the "archetype" repository isn't being used for fetching the catalog but can 
be used for fetching artifacts

> Archetype:generate from repos besides central does not work
> -----------------------------------------------------------
>
>                 Key: ARCHETYPE-528
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-528
>             Project: Maven Archetype
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>            Reporter: João Cabrita
>            Priority: Critical
>         Attachments: settings.xml
>
>
> {noformat}
> mvn -X -P camunda -DarchetypeCatalog=remote  
> org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate 
> -Dfilter=org.camunda.bpm.archetype:
> {noformat}
> Results in the following:
> {noformat}
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate' with basic 
> configurator -->
> [DEBUG]   (f) archetypeCatalog = remote
> [DEBUG]   (f) basedir = C:\Users\joao.cabrita\projects\bpm
> [DEBUG]   (f) filter = org.camunda.bpm.archetype:
> [DEBUG]   (f) interactiveMode = true
> [DEBUG]   (f) localRepository =       id: local
>       url: file:///C:/Users/joao.cabrita/.m2/repository/
>    layout: default
> snapshots: [enabled => true, update => always]
>  releases: [enabled => true, update => always]
> [DEBUG]   (f) remoteArtifactRepositories = [      id: central
>       url: https://app.camunda.com/nexus/content/repositories/camunda-bpm
>    layout: default
>     proxy: proxy.brisa.pt:3128
> snapshots: [enabled => true, update => daily]
>  releases: [enabled => true, update => daily]
> ,       id: archetype
>       url: https://app.camunda.com/nexus/content/repositories/camunda-bpm
>    layout: default
>     proxy: proxy.brisa.pt:3128
> snapshots: [enabled => true, update => daily]
>  releases: [enabled => true, update => daily]
> ]
> [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@325f7fa9
> [DEBUG] -- end configuration --
> [INFO] Generating project in Interactive mode
> [DEBUG] Searching for remote catalog: 
> https://repo.maven.apache.org/maven2/archetype-catalog.xml
> [WARNING] No archetype found in remote catalog. Defaulting to internal catalog
> [INFO] Your filter doesn't match any archetype, so try again with another 
> value.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> {noformat}
> I've attached my settings.xml file.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to