diff --git a/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java b/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java index 0bae553e..1acfc5f9 100644 --- a/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java +++ b/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java @@ -49,18 +49,26 @@ public class DefaultArchetypeGenerator implements ArchetypeGenerator { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultArchetypeGenerator.class); - @Inject private ArchetypeArtifactManager archetypeArtifactManager; - @Inject private FilesetArchetypeGenerator filesetGenerator; - @Inject private OldArchetype oldArchetype; - @Inject private RepositorySystem repositorySystem; + @Inject + public DefaultArchetypeGenerator( + ArchetypeArtifactManager archetypeArtifactManager, + FilesetArchetypeGenerator filesetGenerator, + OldArchetype oldArchetype, + RepositorySystem repositorySystem) { + this.archetypeArtifactManager = archetypeArtifactManager; + this.filesetGenerator = filesetGenerator; + this.oldArchetype = oldArchetype; + this.repositorySystem = repositorySystem; + } + private File getArchetypeFile(ArchetypeGenerationRequest request) throws ArchetypeException { if (!isArchetypeDefined(request)) { throw new ArchetypeNotDefined("The archetype is not defined");