[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aether-users] Creating metadata for local installation
|
Dennis Reedy wrote:
I'm installing both jars and poms into the local repository, and that all works fine. What seems to be missing is the meta-data associated with the install.
The maven-aether-provider ships with implementations of the
MetadataGeneratorFactory interface to provide the usual Maven metadata
during install/deploy. My first guess is that you're not using those at
all or that your setup is incomplete.
String metaDataFileLocation = repositorySystemSession.getLocalRepositoryManager().getPathForLocalMetadata(metaData);
metaData.setFile(new File(getLocalRepositoryLocation(), metaDataFileLocation));
pomArtifact = pomArtifact.setFile(pomFile);
Just like you already do with pomArtifact, the proper call would in
general be
metaData = metaData.setFile( ... )
Besides, the file you set here is meant to denote the source file to be
installed/copied into the local repo and not the destination file within
the local repository. I.e. the file you want to set should exist and
contain the desired metadata.
But as said before, you should try into reusing the existing components
from the maven-aether-provider.
Benjamin