Archiva

Archiva web client does not recognize classifier

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.4
  • Component/s: None
  • Labels:
    None
  • Environment:
  • Number of attachments :
    0

Description

I've started using classifiers with some of my native libraries. The Web application does not represent the classifier, and the artifact is not downloadable from the web application. My builds are occurring correctly, so Maven has no difficulty retrieving the artifacts.

As an example, I have put the following into my local Archiva repository:

reutersRFA:libFDacsLIB:5.1:solaris
reutersRFA:libFDacsLIB:5.1:linux_2x
reutersRFA:libFDacsLIB:5.1:linux_3x

The deploy command I use to achieve this was:

mvn deploy:deploy-file -Dfile=libFDacsLib.so -DgroupId=reutersRFA -DartifactId=libFDacsLib -Dversion=5.1 -Dpackaging=so -Dclassifier=solaris -DgeneratePom=true -DrepositoryId=archiva.default -Durl=http://invldnlspare1:9100/archiva/repository/internal/

et. sim for -Dclassifier=linux_2x and -Dclassifier=linux_3x

In the archiva repository filesystem I see:

$ find /appdata/archiva -name "libFDacsLib"
./data/repositories/internal/reutersRFA/libFDacsLib
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1.pom
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_3x.so.md5
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-solaris.so.sha1
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_2x.so
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1.pom.sha1
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_2x.so.sha1
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_3x.so.sha1
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_3x.so
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-solaris.so
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-linux_2x.so.md5
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1.pom.md5
./data/repositories/internal/reutersRFA/libFDacsLib/5.1/libFDacsLib-5.1-solaris.so.md5
$

Note that there is only one *.pom, and there is no ".so" without a classifier extension.

In the web gui I can browse as far as

[top] / reutersRFA / libFDacsLib / 5.1

Inside this I see a POM Dependency Snippet which does not mention the classifier:

<dependency>
<groupId>reutersRFA</groupId>
<artifactId>libFDacsLib</artifactId>
<version>5.1</version>
<type>so</type>
</dependency>

I have a link to download the POM, but I have no link to download any actual artifact. No mention is made of "solaris", "linux_2x" or "linux_3x" anywhere on the web page.

I suspect the POM has been stripped of the classifier by archiva when maven deployed the artifact. As far as Archiva is concerned, there is only one POM which references an artifact that does not exist on the filesystem (no libFDacsLib.so file) since it's looking without the classifier extension.

Naturally I'd like to see a fix in a future version of Archiva if indeed Archiva is causing the problem. In the mean-time I would appreciate guidence as to whether I should create three separate POMs that specify the three classifier values to replace the existing POM in the archva repository filesystem.

Activity

Hide
Brett Porter added a comment -

in Maven, there is only one POM for a given 'coordinate' - classifiers are for derivative artifacts and so the project information should apply to all. That behaviour looks correct.

That said, Archiva should recognise the classifiers and list them under the downloads section, so I'll keep this open for fixing.

Does that make sense?

Show
Brett Porter added a comment - in Maven, there is only one POM for a given 'coordinate' - classifiers are for derivative artifacts and so the project information should apply to all. That behaviour looks correct. That said, Archiva should recognise the classifiers and list them under the downloads section, so I'll keep this open for fixing. Does that make sense?
Hide
Robin Roos added a comment -

That matches my understanding which is why I was reluctant to hack the POM on the repository filesystem. Clearly Maven can resolve these from Archiva without dificulty, so we're just talking about a web visualization issue.

Thanks.

Show
Robin Roos added a comment - That matches my understanding which is why I was reluctant to hack the POM on the repository filesystem. Clearly Maven can resolve these from Archiva without dificulty, so we're just talking about a web visualization issue. Thanks.
Hide
Paolo Compieta added a comment -

Hi,
that would be very handy: i've just introduced classifiers in my company to have the deploy-team download a particular EAR directly from the repo, but they still can't browse Archiva and find the artifact they need.

I could pass the actual link (so nothing blocker), but we have more than 25 ears and it takes me more than half an hour to write down all links.

One more thing: we are using different classifiers (activated by profiles) and one of them is default, so we do not publish the main artifact at all -i point this out to prevent problems in rendering the page without the main artifact.

Thanks!

Show
Paolo Compieta added a comment - Hi, that would be very handy: i've just introduced classifiers in my company to have the deploy-team download a particular EAR directly from the repo, but they still can't browse Archiva and find the artifact they need. I could pass the actual link (so nothing blocker), but we have more than 25 ears and it takes me more than half an hour to write down all links. One more thing: we are using different classifiers (activated by profiles) and one of them is default, so we do not publish the main artifact at all -i point this out to prevent problems in rendering the page without the main artifact. Thanks!
Hide
Brett Porter added a comment -

for testing

Show
Brett Porter added a comment - for testing
Hide
Brett Porter added a comment - - edited

partially fixed in 1.4. The files are all listed for download correctly.

However, the download box shows them all as 'so' instead of indicating the classifier to help distringuish them. This should additionally be fixed.

As for the POM snippet - this is incorrect, but it is a result of the deploy-file plugin generating an incorrect POM (it should not have an so packaging if the artifact gives a classifier). We need not correct that in the UI.

Show
Brett Porter added a comment - - edited partially fixed in 1.4. The files are all listed for download correctly. However, the download box shows them all as 'so' instead of indicating the classifier to help distringuish them. This should additionally be fixed. As for the POM snippet - this is incorrect, but it is a result of the deploy-file plugin generating an incorrect POM (it should not have an so packaging if the artifact gives a classifier). We need not correct that in the UI.

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated: