Class MvnPublicationGenerator
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.mvnrepo.MvnPublicationGenerator
- All Implemented Interfaces:
Generator, ResourceProvider
The Class MvnPublicationGenerator.
-
Field Summary
Fields inherited from class AbstractProvider
log -
Constructor Summary
ConstructorsConstructorDescriptionMvnPublicationGenerator(Project project) Creates a new Maven publication generator. -
Method Summary
Modifier and TypeMethodDescriptionReturns the directory where additional artifacts are created.artifactDirectory(Path directory) Sets the directory where additional artifacts are created.artifactDirectory(Supplier<Path> directory) Sets the directory where additional artifacts are created.credentials(String user, String pass) Sets the Maven repository credentials.doProvide(ResourceRequest<T> requested) Invoked byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.Keep generated sub artifacts (checksums, signatures)Returns the snapshot repository.snapshotRepository(URI uri) Sets the Maven snapshot repository URI.Returns the upload URI.Sets the upload URI.Methods inherited from class AbstractProvider
provideMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
provide
-
Constructor Details
-
MvnPublicationGenerator
Creates a new Maven publication generator.- Parameters:
project- the project
-
-
Method Details
-
uploadUri
Sets the upload URI.- Parameters:
uri- the repository URI- Returns:
- the maven publication generator
-
uploadUri
-
snapshotRepository
Sets the Maven snapshot repository URI.- Parameters:
uri- the snapshot repository URI- Returns:
- the maven publication generator
-
snapshotRepository
Returns the snapshot repository. Defaults tohttps://central.sonatype.com/repository/maven-snapshots/.- Returns:
- the uri
-
credentials
Sets the Maven repository credentials.- Parameters:
user- the usernamepass- the password- Returns:
- the maven publication generator
-
keepSubArtifacts
Keep generated sub artifacts (checksums, signatures)- Returns:
- the mvn publication generator
-
artifactDirectory
Returns the directory where additional artifacts are created. Defaults to sub directorypublications/mavenin the project's build directory (seeProject.buildDirectory()).- Returns:
- the directory
-
artifactDirectory
Sets the directory where additional artifacts are created. ThePathis resolved against the project's build directory (seeProject.buildDirectory()). Ifdestinationisnull, the additional artifacts are created in the directory where the base artifact is found.- Parameters:
directory- the new directory- Returns:
- the maven publication generator
-
artifactDirectory
Sets the directory where additional artifacts are created. If theSupplierreturnsnull, the additional artifacts are created in the directory where the base artifact is found.- Parameters:
directory- the new directory- Returns:
- the maven publication generator
-
doProvide
Description copied from class:AbstractProviderInvoked byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
requested- the requested- Returns:
- the stream
-