Skip to content

Commit 83abc1b

Browse files
sebtiemhboutemy
authored andcommitted
Remove attach / deployment feature
1 parent 8a27933 commit 83abc1b

4 files changed

Lines changed: 4 additions & 87 deletions

File tree

src/it/buildinfo-mono/verify.groovy

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,4 @@ if (mavenVersion.startsWith('4.')) {
3737
}
3838

3939
assert buildinfo.contains( "mvn.minimum.version=3.0.5" )
40-
assert buildinfo.contains( "mvn.rebuild-args=-Dmaven.session.versionFilter=e(org.slf4j:slf4j-api:(1.7.36,))" )
41-
42-
// check existence of buildinfo in local repository
43-
File local = new File( basedir, "../../local-repo/org/apache/maven/plugins/it/mono/1.0-SNAPSHOT/mono-1.0-SNAPSHOT.buildinfo")
44-
assert local.isFile()
45-
46-
// check existence of buildinfo in remote repository
47-
File remoteDir = new File( basedir, "target/remote-repo/org/apache/maven/plugins/it/mono/1.0-SNAPSHOT")
48-
assert remoteDir.isDirectory()
49-
50-
int count = 0;
51-
for ( File f : remoteDir.listFiles() ) {
52-
// In Maven 4 there is the build-POM and also the new (but with old name) consumer-POM
53-
// The expected ".buildinfo" file is named as the consumer-POM
54-
if ( f.getName().endsWith( ".pom" ) && !f.getName().endsWith( "build.pom" )) {
55-
File b = new File( remoteDir, f.getName().replace( ".pom", ".buildinfo" ) )
56-
println b
57-
assert b.isFile()
58-
count++
59-
}
60-
}
61-
assert count > 0
40+
assert buildinfo.contains( "mvn.rebuild-args=-Dmaven.session.versionFilter=e(org.slf4j:slf4j-api:(1.7.36,))" )

src/it/buildinfo-multi/verify.groovy

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -114,31 +114,4 @@ if (mavenVersion.startsWith('4.')) {
114114
}
115115

116116
assert !buildinfo.contains( ".buildinfo" )
117-
assert buildinfo.contains( "mvn.aggregate.artifact-id=ignore-jar" )
118-
119-
// check existence of buildinfo in local repository
120-
File localIgnoreJar = new File( basedir, "../../local-repo/org/apache/maven/plugins/it/ignore-jar/1.0-SNAPSHOT/ignore-jar-1.0-SNAPSHOT.buildinfo")
121-
assert localIgnoreJar.isFile()
122-
123-
// check existence of buildinfo in remote repository
124-
File remoteDir = null
125-
if (mavenVersion.startsWith('4.')) {
126-
remoteDir = new File( basedir, "target/remote-repo/org/apache/maven/plugins/it/ignore-jar/1.0-SNAPSHOT" )
127-
} else {
128-
remoteDir = new File( basedir, "ignore-jar/target/remote-repo/org/apache/maven/plugins/it/ignore-jar/1.0-SNAPSHOT" )
129-
}
130-
131-
assert remoteDir.isDirectory()
132-
133-
for ( File f : remoteDir.listFiles() ) {
134-
// In Maven 4 there is the build-POM and also the new (but with old name) consumer-POM
135-
// The expected ".buildinfo" file is named as the consumer-POM
136-
if ( f.getName().endsWith( ".pom" ) && !f.getName().endsWith( "build.pom" )) {
137-
File b = new File( remoteDir, f.getName().replace( ".pom", ".buildinfo" ) )
138-
println b
139-
assert b.isFile()
140-
return
141-
}
142-
}
143-
144-
// issue: buildinfo not found
117+
assert buildinfo.contains( "mvn.aggregate.artifact-id=ignore-jar" )

src/it/buildinfo-skip-install-deploy/verify.groovy

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,5 @@ if (mavenVersion.startsWith('4.')) {
5151
assert buildinfo.contains( "outputs.2.1.filename=multi-modB-1.0-SNAPSHOT.jar" )
5252
}
5353

54-
5554
assert !buildinfo.contains( ".buildinfo" )
56-
assert !buildinfo.contains( "outputs.3" )
57-
58-
// check existence of buildinfo in local repository
59-
File localModB = new File( basedir, "../../local-repo/org/apache/maven/plugins/it/multi-modB/1.0-SNAPSHOT/multi-modB-1.0-SNAPSHOT.buildinfo")
60-
assert localModB.isFile()
61-
62-
// check existence of buildinfo in remote repository
63-
File remoteDir = null
64-
if (mavenVersion.startsWith('4.')) {
65-
remoteDir = new File( basedir, "target/remote-repo/org/apache/maven/plugins/it/multi-modB/1.0-SNAPSHOT" )
66-
} else {
67-
remoteDir = new File( basedir, "modB/target/remote-repo/org/apache/maven/plugins/it/multi-modB/1.0-SNAPSHOT" )
68-
}
69-
70-
assert remoteDir.isDirectory()
71-
72-
// check if there is a .buildinfo for the first .pom file
73-
for ( File f : remoteDir.listFiles() ) {
74-
// In Maven 4 there is the build-POM and also the new (but with old name) consumer-POM
75-
// The expected ".buildinfo" file is named as the consumer-POM
76-
if ( f.getName().endsWith( ".pom" ) && !f.getName().endsWith( "build.pom" )) {
77-
File b = new File( remoteDir, f.getName().replace( ".pom", ".buildinfo" ) )
78-
println b
79-
assert b.isFile()
80-
return
81-
}
82-
}
83-
84-
// issue: buildinfo not found
55+
assert !buildinfo.contains( "outputs.3" )

src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildinfoMojo.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ public BuildinfoMojo(
6565

6666
@Override
6767
public void execute(Map<Artifact, String> artifacts) throws MojoExecutionException {
68-
// eventually attach
69-
if (attach) {
70-
getLog().info("Attaching buildinfo");
71-
projectHelper.attachArtifact(project, "buildinfo", buildinfoFile);
72-
} else {
73-
getLog().info("NOT adding buildinfo to the list of attached artifacts.");
74-
}
68+
// attach / deploy feature has been removed, see #216
7569
}
7670
}

0 commit comments

Comments
 (0)