Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Eric B
I have a need to store some binary objects (ex: zip files) in a central
repository that can be easily accessed by a build or deployment system.
Both Chef and/or Docker need access to these binary objects in order to
build out the environment needed for my application.

The binary objects are not code or libraries.  They are purely a zip file
of static resources (ex: gifs or help documentation/templates/etc, GeoIP
database, etc).  I need them somewhere centrally accessible so that my
deployment system can easily retrieve them and explode them in the
container/environment to make accessible to my application.

At the moment, they are being hosted in a "raw" Nexus repo.  But the
problem with a raw repo is that there is no classification of
artifacts/versioning/etc.  So I am considering giving them all a GAV id and
putting it in the Maven repo as a maven artifact.

But is this poor practice?  I've always considered Maven artifacts as
"code-related" - that is artifacts that are the output of some code
development.  Could be compiled sources, javadocs, generated artifacts,
etc.  But putting in these static binaries just seems "wrong".  However, I
don't really see a good alternative.

I realize that this "can" be done.  I guess my question is rather "should"
it be done?  How is everyone else handling these types of resources?

Thanks,

Eric
Reply | Threaded
Open this post in threaded view
|

Re: Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Robert Scholte-8
If you consider an artifact repository as a dependency repository, does it  
make sense now?
In a Maven project you can add dependencies required for that project.
If that means a dependency with static resources, IMHO that's fine.

thanks,
Robert


On Sun, 26 Nov 2017 20:36:07 +0100, Eric B <[hidden email]> wrote:

> I have a need to store some binary objects (ex: zip files) in a central
> repository that can be easily accessed by a build or deployment system.
> Both Chef and/or Docker need access to these binary objects in order to
> build out the environment needed for my application.
>
> The binary objects are not code or libraries.  They are purely a zip file
> of static resources (ex: gifs or help documentation/templates/etc, GeoIP
> database, etc).  I need them somewhere centrally accessible so that my
> deployment system can easily retrieve them and explode them in the
> container/environment to make accessible to my application.
>
> At the moment, they are being hosted in a "raw" Nexus repo.  But the
> problem with a raw repo is that there is no classification of
> artifacts/versioning/etc.  So I am considering giving them all a GAV id  
> and
> putting it in the Maven repo as a maven artifact.
>
> But is this poor practice?  I've always considered Maven artifacts as
> "code-related" - that is artifacts that are the output of some code
> development.  Could be compiled sources, javadocs, generated artifacts,
> etc.  But putting in these static binaries just seems "wrong".  However,  
> I
> don't really see a good alternative.
>
> I realize that this "can" be done.  I guess my question is rather  
> "should"
> it be done?  How is everyone else handling these types of resources?
>
> Thanks,
>
> Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Manfred Moser-4
In reply to this post by Eric B
I think it is a common and good practice. Specifically if you take advantage of using a good structure in terms of the use GAV coordinates and release versioning. And also with regards to potentially restricting access based on that..

manfred

Eric B wrote on 2017-11-26 11:36:

> I have a need to store some binary objects (ex: zip files) in a central
> repository that can be easily accessed by a build or deployment system.
> Both Chef and/or Docker need access to these binary objects in order to
> build out the environment needed for my application.
>
> The binary objects are not code or libraries.  They are purely a zip file
> of static resources (ex: gifs or help documentation/templates/etc, GeoIP
> database, etc).  I need them somewhere centrally accessible so that my
> deployment system can easily retrieve them and explode them in the
> container/environment to make accessible to my application.
>
> At the moment, they are being hosted in a "raw" Nexus repo.  But the
> problem with a raw repo is that there is no classification of
> artifacts/versioning/etc.  So I am considering giving them all a GAV id and
> putting it in the Maven repo as a maven artifact.
>
> But is this poor practice?  I've always considered Maven artifacts as
> "code-related" - that is artifacts that are the output of some code
> development.  Could be compiled sources, javadocs, generated artifacts,
> etc.  But putting in these static binaries just seems "wrong".  However, I
> don't really see a good alternative.
>
> I realize that this "can" be done.  I guess my question is rather "should"
> it be done?  How is everyone else handling these types of resources?
>
> Thanks,
>
> Eric
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Andrew Todd
In order to keep track of what you've uploaded and allow consistent uploads
of new versions, I recommend that you create a POM file for each binary
artifact and define an execution of the
http://www.mojohaus.org/build-helper-maven-plugin/ attach-artifact goal to
perform the upload.

On Sun, Nov 26, 2017 at 3:52 PM, Manfred Moser <[hidden email]>
wrote:

> I think it is a common and good practice. Specifically if you take
> advantage of using a good structure in terms of the use GAV coordinates and
> release versioning. And also with regards to potentially restricting access
> based on that..
>
> manfred
>
> Eric B wrote on 2017-11-26 11:36:
>
> > I have a need to store some binary objects (ex: zip files) in a central
> > repository that can be easily accessed by a build or deployment system.
> > Both Chef and/or Docker need access to these binary objects in order to
> > build out the environment needed for my application.
> >
> > The binary objects are not code or libraries.  They are purely a zip file
> > of static resources (ex: gifs or help documentation/templates/etc, GeoIP
> > database, etc).  I need them somewhere centrally accessible so that my
> > deployment system can easily retrieve them and explode them in the
> > container/environment to make accessible to my application.
> >
> > At the moment, they are being hosted in a "raw" Nexus repo.  But the
> > problem with a raw repo is that there is no classification of
> > artifacts/versioning/etc.  So I am considering giving them all a GAV id
> and
> > putting it in the Maven repo as a maven artifact.
> >
> > But is this poor practice?  I've always considered Maven artifacts as
> > "code-related" - that is artifacts that are the output of some code
> > development.  Could be compiled sources, javadocs, generated artifacts,
> > etc.  But putting in these static binaries just seems "wrong".  However,
> I
> > don't really see a good alternative.
> >
> > I realize that this "can" be done.  I guess my question is rather
> "should"
> > it be done?  How is everyone else handling these types of resources?
> >
> > Thanks,
> >
> > Eric
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Is it poor practice to use Maven repo (ie: Nexus) to store non maven artifacts?

Eric Benzacar
Thanks for the suggestions/confirmations.  Not a bad idea to create a basic
pom with the build-helper plugin; it'll allow me at the very least to add a
little documentation as to what the artifact is.

Eric


On Mon, Nov 27, 2017 at 12:03 PM, Andrew Todd <[hidden email]>
wrote:

> In order to keep track of what you've uploaded and allow consistent uploads
> of new versions, I recommend that you create a POM file for each binary
> artifact and define an execution of the
> http://www.mojohaus.org/build-helper-maven-plugin/ attach-artifact goal to
> perform the upload.
>
> On Sun, Nov 26, 2017 at 3:52 PM, Manfred Moser <[hidden email]>
> wrote:
>
> > I think it is a common and good practice. Specifically if you take
> > advantage of using a good structure in terms of the use GAV coordinates
> and
> > release versioning. And also with regards to potentially restricting
> access
> > based on that..
> >
> > manfred
> >
> > Eric B wrote on 2017-11-26 11:36:
> >
> > > I have a need to store some binary objects (ex: zip files) in a central
> > > repository that can be easily accessed by a build or deployment system.
> > > Both Chef and/or Docker need access to these binary objects in order to
> > > build out the environment needed for my application.
> > >
> > > The binary objects are not code or libraries.  They are purely a zip
> file
> > > of static resources (ex: gifs or help documentation/templates/etc,
> GeoIP
> > > database, etc).  I need them somewhere centrally accessible so that my
> > > deployment system can easily retrieve them and explode them in the
> > > container/environment to make accessible to my application.
> > >
> > > At the moment, they are being hosted in a "raw" Nexus repo.  But the
> > > problem with a raw repo is that there is no classification of
> > > artifacts/versioning/etc.  So I am considering giving them all a GAV id
> > and
> > > putting it in the Maven repo as a maven artifact.
> > >
> > > But is this poor practice?  I've always considered Maven artifacts as
> > > "code-related" - that is artifacts that are the output of some code
> > > development.  Could be compiled sources, javadocs, generated artifacts,
> > > etc.  But putting in these static binaries just seems "wrong".
> However,
> > I
> > > don't really see a good alternative.
> > >
> > > I realize that this "can" be done.  I guess my question is rather
> > "should"
> > > it be done?  How is everyone else handling these types of resources?
> > >
> > > Thanks,
> > >
> > > Eric
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>