mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
Maven: set packaging of archetype artifact to 'maven-archetype'
This commit is contained in:
parent
ddab106c5a
commit
0e4b0f6b11
|
@ -19,4 +19,8 @@ public interface PublishTeaVMExtension {
|
|||
String getArtifactId();
|
||||
|
||||
void setArtifactId(String artifactId);
|
||||
|
||||
String getPackaging();
|
||||
|
||||
void setPackaging(String packaging);
|
||||
}
|
||||
|
|
|
@ -75,10 +75,14 @@ public abstract class PublishTeaVMPlugin implements Plugin<Project> {
|
|||
publication.setArtifactId(extension.getArtifactId());
|
||||
}
|
||||
publication.from(project.getComponents().getByName("java"));
|
||||
if (extension.packaging != null) {
|
||||
publication.getPom().setPackaging(extension.packaging);
|
||||
}
|
||||
}
|
||||
|
||||
private static class ExtensionImpl implements PublishTeaVMExtension {
|
||||
private String artifactId;
|
||||
private String packaging;
|
||||
|
||||
@Override
|
||||
public String getArtifactId() {
|
||||
|
@ -89,5 +93,15 @@ public abstract class PublishTeaVMPlugin implements Plugin<Project> {
|
|||
public void setArtifactId(String artifactId) {
|
||||
this.artifactId = artifactId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackaging() {
|
||||
return packaging;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPackaging(String packaging) {
|
||||
this.packaging = packaging;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,5 @@ tasks.processResources {
|
|||
|
||||
teavmPublish {
|
||||
artifactId = "teavm-maven-webapp"
|
||||
packaging = "maven-archetype"
|
||||
}
|
Loading…
Reference in New Issue
Block a user