Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Nexus570IndexArchetypeIT fix, take two.
Browse files Browse the repository at this point in the history
Last failure:
https://bamboo.zion.sonatype.com/browse/NXO-OSST-118

This time a small change implemented in AbstractNexusIntegrationTest
and added proper packaging to the test project being
deployed as part of preparations for this IT.

Original assumption still stands, asynchronously run
event inspector ordering is not guaranteed, and also
reliability of "wait for ..." IT utilities are questioned
too (NEXUS-5127).

With this change (redone), it should never fail again,
as it will immediately (on POM arrival) be indexed as archetype,
not JAR anymore.
  • Loading branch information
cstamas committed Dec 14, 2012
1 parent c87495a commit a227f09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -4,6 +4,7 @@
<groupId>nexus570</groupId>
<artifactId>simple-archetype</artifactId>
<version>3.0.1</version>
<packaging>maven-archetype</packaging>
<distributionManagement>
<repository>
<id>nexus-test-harness-repo</id>
Expand Down
Expand Up @@ -680,14 +680,21 @@ protected void deployArtifacts( File project, String wagonHint, String deployUrl
File pom = new File( project, "pom.xml" );

// FIXME, this needs to be fluffed up a little, should add the classifier, etc.
String artifactFileName = model.getArtifactId() + "." + model.getPackaging();
String extension = model.getPackaging();
// for now, only due to Nexus570IndexArchetypeIT
// no other IT specifies other packaging where extension != packaging
if ( "maven-archetype".equals( extension ) )
{
extension = "jar";
}
String artifactFileName = model.getArtifactId() + "." + extension;
File artifactFile = new File( project, artifactFileName );

log.debug( "wow, this is working: " + artifactFile.getName() );

final Gav gav =
new Gav( model.getGroupId(), model.getArtifactId(), model.getVersion(), null,
FileUtils.getExtension( artifactFile.getName() ), null, null, artifactFile.getName(), false, null,
extension, null, null, artifactFile.getName(), false, null,
false, null );

// the Restlet Client does not support multipart forms:
Expand Down

0 comments on commit a227f09

Please sign in to comment.