This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271110 - Attempt to pass -DarchetypeRepository to 3.x maven-archetype-plugin
Summary: Attempt to pass -DarchetypeRepository to 3.x maven-archetype-plugin
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2017-07-17 16:27 UTC by Jesse Glick
Modified: 2018-08-24 22:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (999 bytes, patch)
2017-07-17 16:29 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2017-07-17 16:27:53 UTC
As noted in https://maven.apache.org/archetype/maven-archetype-plugin/archetype-repository.html it is not possible to pass `archetypeRepository`, as `ArchetypeWizardUtils` does; it will just be ignored. This means that calls to `Archetype.setRepository`, as for example in https://github.com/stapler/netbeans-stapler-plugin/blob/1f180ee18b75bef191a1f7be840475f914ffaf15/jenkins-plugin/src/main/java/org/kohsuke/stapler/netbeans/jenkinsdev/JenkinsPluginTemplate.java#L37 will not work unless `~/.m2/settings.xml` already happens to define a mirror for that repository.

Since according to http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven.plugins%22%20AND%20a%3A%22maven-archetype-plugin%22 the last 2.x version was 2.4, this should be specified explicitly to make sure that new project creation works.
Comment 1 Jesse Glick 2017-07-17 16:29:18 UTC
Created attachment 164780 [details]
Proposed patch
Comment 2 Tomas Stupka 2017-07-17 17:14:00 UTC
fixed in jet-main #4896acb523c0
Comment 3 Tomas Stupka 2017-07-17 17:14:44 UTC
thanks for the patch
Comment 4 Quality Engineering 2017-07-20 17:52:09 UTC
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4896acb523c0
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #271110 - Attempt to pass -DarchetypeRepository to 3.x maven-archetype-plugin
Comment 5 Jesse Glick 2018-08-24 22:06:24 UTC
Refiled as: https://github.com/apache/incubator-netbeans/pull/788