Author: michaelo Date: Mon Dec 28 20:42:55 2015 New Revision: 1721997 URL: http://svn.apache.org/viewvc?rev=1721997&view=rev Log: [MPIR-251] Artifact ###### has no file error regression
Add an IT with a sealed JAR dependency from Maven Central which verifies that all dependencies are properly resolved. Contributed by: Hervé Boutemy <hbout...@apache.org> Added: maven/plugins/branches/MPIR-251/src/it/MPIR-251/ maven/plugins/branches/MPIR-251/src/it/MPIR-251/invoker.properties maven/plugins/branches/MPIR-251/src/it/MPIR-251/pom.xml maven/plugins/branches/MPIR-251/src/it/MPIR-251/verify.groovy Modified: maven/plugins/branches/MPIR-251/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java Added: maven/plugins/branches/MPIR-251/src/it/MPIR-251/invoker.properties URL: http://svn.apache.org/viewvc/maven/plugins/branches/MPIR-251/src/it/MPIR-251/invoker.properties?rev=1721997&view=auto ============================================================================== --- maven/plugins/branches/MPIR-251/src/it/MPIR-251/invoker.properties (added) +++ maven/plugins/branches/MPIR-251/src/it/MPIR-251/invoker.properties Mon Dec 28 20:42:55 2015 @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:dependencies Added: maven/plugins/branches/MPIR-251/src/it/MPIR-251/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/branches/MPIR-251/src/it/MPIR-251/pom.xml?rev=1721997&view=auto ============================================================================== --- maven/plugins/branches/MPIR-251/src/it/MPIR-251/pom.xml (added) +++ maven/plugins/branches/MPIR-251/src/it/MPIR-251/pom.xml Mon Dec 28 20:42:55 2015 @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.plugins.project-info-reports</groupId> + <artifactId>MPIR-251</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>MPIR-251 IT test: Artifact has no file</name> + <description> + When a JAR is sealed, there was a warning "Artifact xxx has no file and won't be listed in dependency files details.". + </description> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-fate</artifactId> + <version>1.7.0</version> + </dependency> + </dependencies> +</project> Added: maven/plugins/branches/MPIR-251/src/it/MPIR-251/verify.groovy URL: http://svn.apache.org/viewvc/maven/plugins/branches/MPIR-251/src/it/MPIR-251/verify.groovy?rev=1721997&view=auto ============================================================================== --- maven/plugins/branches/MPIR-251/src/it/MPIR-251/verify.groovy (added) +++ maven/plugins/branches/MPIR-251/src/it/MPIR-251/verify.groovy Mon Dec 28 20:42:55 2015 @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +File log = new File( basedir, 'build.log' ) +assert !( log.text =~ /\[WARNING\] Artifact .+ has no file and won't be listed in dependency files details\./ ) Modified: maven/plugins/branches/MPIR-251/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java URL: http://svn.apache.org/viewvc/maven/plugins/branches/MPIR-251/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java?rev=1721997&r1=1721996&r2=1721997&view=diff ============================================================================== --- maven/plugins/branches/MPIR-251/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java (original) +++ maven/plugins/branches/MPIR-251/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java Mon Dec 28 20:42:55 2015 @@ -559,8 +559,8 @@ public class DependenciesRenderer { if ( artifact.getFile() == null ) { - log.warn( "Artifact " + artifact.getId() + " has no file," - + " won't be listed in dependency files details." ); + log.warn( "Artifact " + artifact.getId() + " has no file" + + " and won't be listed in dependency files details." ); continue; } @@ -1537,7 +1537,7 @@ public class DependenciesRenderer } catch ( IOException e ) { - log.error( "Artifact: " + artifact.getId() + " caused IOException: " + e.getMessage(), e ); + log.error( "Artifact " + artifact.getId() + " caused IOException: " + e.getMessage(), e ); } } }