mirror of https://github.com/apache/maven.git
fixed errors reported by Checkstyle
This commit is contained in:
parent
71a8427df6
commit
543870467f
|
@ -21,7 +21,6 @@ package org.apache.maven.artifact.repository;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* Describes a set of policies for a repository to use under certain conditions.
|
||||
|
|
|
@ -69,9 +69,9 @@ public class ComparableVersion
|
|||
|
||||
private interface Item
|
||||
{
|
||||
final int INTEGER_ITEM = 0;
|
||||
final int STRING_ITEM = 1;
|
||||
final int LIST_ITEM = 2;
|
||||
int INTEGER_ITEM = 0;
|
||||
int STRING_ITEM = 1;
|
||||
int LIST_ITEM = 2;
|
||||
|
||||
int compareTo( Item item );
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class ComparableVersion
|
|||
private static class IntegerItem
|
||||
implements Item
|
||||
{
|
||||
private static final BigInteger BigInteger_ZERO = new BigInteger( "0" );
|
||||
private static final BigInteger BIG_INTEGER_ZERO = new BigInteger( "0" );
|
||||
|
||||
private final BigInteger value;
|
||||
|
||||
|
@ -94,7 +94,7 @@ public class ComparableVersion
|
|||
|
||||
private IntegerItem()
|
||||
{
|
||||
this.value = BigInteger_ZERO;
|
||||
this.value = BIG_INTEGER_ZERO;
|
||||
}
|
||||
|
||||
public IntegerItem( String str )
|
||||
|
@ -109,14 +109,14 @@ public class ComparableVersion
|
|||
|
||||
public boolean isNull()
|
||||
{
|
||||
return BigInteger_ZERO.equals( value );
|
||||
return BIG_INTEGER_ZERO.equals( value );
|
||||
}
|
||||
|
||||
public int compareTo( Item item )
|
||||
{
|
||||
if ( item == null )
|
||||
{
|
||||
return BigInteger_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
|
||||
return BIG_INTEGER_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
|
||||
}
|
||||
|
||||
switch ( item.getType() )
|
||||
|
@ -266,7 +266,7 @@ public class ComparableVersion
|
|||
|
||||
void normalize()
|
||||
{
|
||||
for( ListIterator<Item> iterator = listIterator( size() ); iterator.hasPrevious(); )
|
||||
for ( ListIterator<Item> iterator = listIterator( size() ); iterator.hasPrevious(); )
|
||||
{
|
||||
Item item = iterator.previous();
|
||||
if ( item.isNull() )
|
||||
|
@ -327,7 +327,7 @@ public class ComparableVersion
|
|||
public String toString()
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder( "(" );
|
||||
for( Iterator<Item> iter = iterator(); iter.hasNext(); )
|
||||
for ( Iterator<Item> iter = iterator(); iter.hasNext(); )
|
||||
{
|
||||
buffer.append( iter.next() );
|
||||
if ( iter.hasNext() )
|
||||
|
|
|
@ -72,7 +72,7 @@ public class DefaultArtifactVersion
|
|||
{
|
||||
if ( otherVersion instanceof DefaultArtifactVersion )
|
||||
{
|
||||
return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion).comparable );
|
||||
return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion ).comparable );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
package org.apache.maven.artifact.repository.metadata;
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
|
@ -47,7 +51,7 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
@Component(role=RepositoryMetadataManager.class)
|
||||
@Component( role = RepositoryMetadataManager.class )
|
||||
public class DefaultRepositoryMetadataManager
|
||||
extends AbstractLogEnabled
|
||||
implements RepositoryMetadataManager
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.io.File;
|
|||
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.sonatype.aether.RepositoryException;
|
||||
import org.sonatype.aether.metadata.MergeableMetadata;
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
package org.apache.maven.artifact.resolver;
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
|
@ -65,7 +69,7 @@ import org.sonatype.aether.resolution.ArtifactResult;
|
|||
/**
|
||||
* @author Jason van Zyl
|
||||
*/
|
||||
@Component(role = ArtifactResolver.class)
|
||||
@Component( role = ArtifactResolver.class )
|
||||
public class DefaultArtifactResolver
|
||||
implements ArtifactResolver
|
||||
{
|
||||
|
@ -111,7 +115,8 @@ public class DefaultArtifactResolver
|
|||
else
|
||||
{
|
||||
executor =
|
||||
new ThreadPoolExecutor( 0, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new DaemonThreadCreator());
|
||||
new ThreadPoolExecutor( 0, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
|
||||
new DaemonThreadCreator() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,19 +156,22 @@ public class DefaultArtifactResolver
|
|||
}
|
||||
}
|
||||
|
||||
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository, TransferListener resolutionListener )
|
||||
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactRepository localRepository, TransferListener resolutionListener )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
resolve( artifact, remoteRepositories, getSession( localRepository ) );
|
||||
}
|
||||
|
||||
public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
|
||||
public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactRepository localRepository )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
resolve( artifact, remoteRepositories, getSession( localRepository ) );
|
||||
}
|
||||
|
||||
private void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, RepositorySystemSession session )
|
||||
private void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
|
||||
RepositorySystemSession session )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
if ( artifact == null )
|
||||
|
@ -249,52 +257,73 @@ public class DefaultArtifactResolver
|
|||
}
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactMetadataSource source, ArtifactFilter filter )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository, remoteRepositories, source, filter );
|
||||
return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
|
||||
remoteRepositories, source, filter );
|
||||
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactMetadataSource source )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, null );
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
|
||||
remoteRepositories, source, null );
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactMetadataSource source, ArtifactFilter filter )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, null );
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
|
||||
remoteRepositories, source, filter, null );
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactRepository localRepository,
|
||||
ArtifactMetadataSource source )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, localRepository, remoteRepositories, source, null );
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
|
||||
ArtifactMetadataSource source, List<ResolutionListener> listeners )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactRepository localRepository,
|
||||
ArtifactMetadataSource source,
|
||||
List<ResolutionListener> listeners )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
|
||||
remoteRepositories, source, null, listeners );
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactMetadataSource source, ArtifactFilter filter,
|
||||
List<ResolutionListener> listeners )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, listeners, null );
|
||||
return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
|
||||
remoteRepositories, source, filter, listeners, null );
|
||||
}
|
||||
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners,
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
ArtifactMetadataSource source, ArtifactFilter filter,
|
||||
List<ResolutionListener> listeners,
|
||||
List<ConflictResolver> conflictResolvers )
|
||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||
{
|
||||
|
@ -336,7 +365,7 @@ public class DefaultArtifactResolver
|
|||
{
|
||||
Artifact rootArtifact = request.getArtifact();
|
||||
Set<Artifact> artifacts = request.getArtifactDependencies();
|
||||
Map managedVersions = request.getManagedVersionMap();
|
||||
Map<String, Artifact> managedVersions = request.getManagedVersionMap();
|
||||
List<ResolutionListener> listeners = request.getListeners();
|
||||
ArtifactFilter collectionFilter = request.getCollectionFilter();
|
||||
ArtifactFilter resolutionFilter = request.getResolutionFilter();
|
||||
|
|
|
@ -283,7 +283,7 @@ public abstract class AbstractStringBasedModelInterpolator
|
|||
pathTranslator ) );
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings( "unchecked" )
|
||||
protected String interpolateInternal( String src, List<ValueSource> valueSources,
|
||||
List<InterpolationPostProcessor> postProcessors, boolean debug )
|
||||
throws ModelInterpolationException
|
||||
|
@ -296,7 +296,7 @@ public abstract class AbstractStringBasedModelInterpolator
|
|||
Logger logger = getLogger();
|
||||
|
||||
String result = src;
|
||||
synchronized( this )
|
||||
synchronized ( this )
|
||||
{
|
||||
|
||||
for ( ValueSource vs : valueSources )
|
||||
|
@ -315,7 +315,7 @@ public abstract class AbstractStringBasedModelInterpolator
|
|||
{
|
||||
result = interpolator.interpolate( result, recursionInterceptor );
|
||||
}
|
||||
catch( InterpolationException e )
|
||||
catch ( InterpolationException e )
|
||||
{
|
||||
throw new ModelInterpolationException( e.getMessage(), e );
|
||||
}
|
||||
|
|
|
@ -19,15 +19,11 @@ package org.apache.maven.project.validation;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.maven.model.InputLocation;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.building.DefaultModelBuildingRequest;
|
||||
import org.apache.maven.model.building.ModelBuildingRequest;
|
||||
import org.apache.maven.model.building.ModelProblem;
|
||||
import org.apache.maven.model.building.ModelProblemCollector;
|
||||
import org.apache.maven.model.building.ModelProblem.Severity;
|
||||
import org.apache.maven.model.building.ModelProblem.Version;
|
||||
import org.apache.maven.model.building.ModelProblemCollectorRequest;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.component.annotations.Requirement;
|
||||
|
|
|
@ -41,8 +41,8 @@ public class MetadataGraphNode
|
|||
|
||||
public MetadataGraphNode()
|
||||
{
|
||||
inNodes = new ArrayList<MetadataGraphNode>(4);
|
||||
exNodes = new ArrayList<MetadataGraphNode>(8);
|
||||
inNodes = new ArrayList<MetadataGraphNode>( 4 );
|
||||
exNodes = new ArrayList<MetadataGraphNode>( 8 );
|
||||
}
|
||||
|
||||
public MetadataGraphNode( MavenArtifactMetadata metadata )
|
||||
|
|
|
@ -43,7 +43,7 @@ public class DefaultArtifactRepositoryFactory
|
|||
private String globalChecksumPolicy;
|
||||
|
||||
@Requirement( role = ArtifactRepositoryLayout.class )
|
||||
private Map<String,ArtifactRepositoryLayout> repositoryLayouts;
|
||||
private Map<String, ArtifactRepositoryLayout> repositoryLayouts;
|
||||
|
||||
public ArtifactRepositoryLayout getLayout( String layoutId )
|
||||
throws UnknownRepositoryLayoutException
|
||||
|
|
|
@ -63,7 +63,7 @@ import org.codehaus.plexus.logging.Logger;
|
|||
public class DefaultLegacyArtifactCollector
|
||||
implements LegacyArtifactCollector
|
||||
{
|
||||
@Requirement(hint="nearest")
|
||||
@Requirement( hint = "nearest" )
|
||||
private ConflictResolver defaultConflictResolver;
|
||||
|
||||
@Requirement
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.apache.maven.artifact.ArtifactScopeEnum;
|
|||
* Artifact Metadata that is resolved independent of Artifact itself.
|
||||
*
|
||||
* @author <a href="oleg@codehaus.org">Oleg Gusakov</a>
|
||||
*
|
||||
*/
|
||||
public class ArtifactMetadata
|
||||
{
|
||||
|
@ -291,7 +290,7 @@ public class ArtifactMetadata
|
|||
return artifactExists;
|
||||
}
|
||||
|
||||
public void setArtifactExists(boolean artifactExists)
|
||||
public void setArtifactExists( boolean artifactExists )
|
||||
{
|
||||
this.artifactExists = artifactExists;
|
||||
}
|
||||
|
@ -302,7 +301,7 @@ public class ArtifactMetadata
|
|||
return dependencies;
|
||||
}
|
||||
|
||||
public void setDependencies(Collection<ArtifactMetadata> dependencies)
|
||||
public void setDependencies( Collection<ArtifactMetadata> dependencies )
|
||||
{
|
||||
this.dependencies = dependencies;
|
||||
}
|
||||
|
@ -312,7 +311,7 @@ public class ArtifactMetadata
|
|||
return artifactUri;
|
||||
}
|
||||
|
||||
public void setArtifactUri(String artifactUri)
|
||||
public void setArtifactUri( String artifactUri )
|
||||
{
|
||||
this.artifactUri = artifactUri;
|
||||
}
|
||||
|
@ -322,23 +321,28 @@ public class ArtifactMetadata
|
|||
{
|
||||
return why;
|
||||
}
|
||||
public void setWhy(String why)
|
||||
|
||||
public void setWhy( String why )
|
||||
{
|
||||
this.why = why;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
public String getError()
|
||||
{
|
||||
return error;
|
||||
}
|
||||
public void setError(String error)
|
||||
|
||||
public void setError( String error )
|
||||
{
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public boolean isError()
|
||||
{
|
||||
return error == null;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
public String getDependencyConflictId()
|
||||
{
|
||||
|
|
|
@ -294,7 +294,7 @@ public class MetadataGraph
|
|||
//------------------------------------------------------------------------
|
||||
public List<MetadataGraphEdge> getEdgesBetween( MetadataGraphVertex vFrom, MetadataGraphVertex vTo )
|
||||
{
|
||||
List<MetadataGraphEdge> edges = getIncidentEdges(vTo);
|
||||
List<MetadataGraphEdge> edges = getIncidentEdges( vTo );
|
||||
if ( edges == null || edges.isEmpty() )
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MetadataResolution
|
|||
return artifactMetadata;
|
||||
}
|
||||
|
||||
public void setArtifactMetadata(ArtifactMetadata artifactMetadata)
|
||||
public void setArtifactMetadata( ArtifactMetadata artifactMetadata )
|
||||
{
|
||||
this.artifactMetadata = artifactMetadata;
|
||||
}
|
||||
|
|
|
@ -97,9 +97,9 @@ class DefaultModelBuildingListener
|
|||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
|
||||
.setMessage( "Invalid plugin repository: " + e.getMessage() )
|
||||
.setException( e ));
|
||||
.setException( e ) );
|
||||
}
|
||||
project.setPluginArtifactRepositories( pluginRepositories );
|
||||
|
||||
|
@ -115,15 +115,15 @@ class DefaultModelBuildingListener
|
|||
}
|
||||
catch ( PluginResolutionException e )
|
||||
{
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
|
||||
.setMessage( "Unresolveable build extension: " + e.getMessage())
|
||||
.setException( e ));
|
||||
.setException( e ) );
|
||||
}
|
||||
catch ( PluginVersionResolutionException e )
|
||||
{
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
|
||||
.setMessage( "Unresolveable build extension: " + e.getMessage() )
|
||||
.setException( e ));
|
||||
.setException( e ) );
|
||||
}
|
||||
|
||||
projectBuildingHelper.selectProjectRealm( project );
|
||||
|
@ -138,9 +138,9 @@ class DefaultModelBuildingListener
|
|||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
|
||||
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
|
||||
.setMessage( "Invalid artifact repository: " + e.getMessage() )
|
||||
.setException( e ));
|
||||
.setException( e ) );
|
||||
}
|
||||
project.setRemoteArtifactRepositories( remoteRepositories );
|
||||
}
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
package org.apache.maven.project;
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import org.apache.maven.RepositoryUtils;
|
||||
|
@ -1477,7 +1481,7 @@ public class MavenProject
|
|||
for ( int ax = 0; ax < attachedArtifacts.size(); ax++ )
|
||||
{
|
||||
Artifact a = attachedArtifacts.get( ax );
|
||||
if ( a.equals( artifact ))
|
||||
if ( a.equals( artifact ) )
|
||||
{
|
||||
if ( logger != null )
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ public interface ProjectBuildingRequest
|
|||
*/
|
||||
Properties getUserProperties();
|
||||
|
||||
void setProject(MavenProject mavenProject);
|
||||
void setProject( MavenProject mavenProject );
|
||||
|
||||
MavenProject getProject();
|
||||
|
||||
|
|
|
@ -42,17 +42,17 @@ import org.sonatype.aether.RepositorySystemSession;
|
|||
*/
|
||||
public interface RepositorySystem
|
||||
{
|
||||
final String DEFAULT_LOCAL_REPO_ID = "local";
|
||||
String DEFAULT_LOCAL_REPO_ID = "local";
|
||||
|
||||
final String userHome = System.getProperty( "user.home" );
|
||||
String userHome = System.getProperty( "user.home" );
|
||||
|
||||
final File userMavenConfigurationHome = new File( userHome, ".m2" );
|
||||
File userMavenConfigurationHome = new File( userHome, ".m2" );
|
||||
|
||||
final File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
|
||||
File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
|
||||
|
||||
final String DEFAULT_REMOTE_REPO_ID = "central";
|
||||
String DEFAULT_REMOTE_REPO_ID = "central";
|
||||
|
||||
final String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
|
||||
String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
|
||||
|
||||
Artifact createArtifact( String groupId, String artifactId, String version, String packaging );
|
||||
|
||||
|
|
|
@ -53,11 +53,15 @@ public final class CLIReportingUtils
|
|||
Properties properties = getBuildProperties();
|
||||
StringBuffer version = new StringBuffer();
|
||||
version.append( createMavenVersionString( properties ) ).append( LS );
|
||||
version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: " + System.getProperty( "maven.home", "<unknown maven home>" ) ) ).append( LS );
|
||||
version.append( "Java version: " + System.getProperty( "java.version", "<unknown java version>" ) + ", vendor: " + System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( LS );
|
||||
version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: "
|
||||
+ System.getProperty( "maven.home", "<unknown maven home>" ) ) ).append( LS );
|
||||
version.append( "Java version: " + System.getProperty( "java.version", "<unknown java version>" )
|
||||
+ ", vendor: " + System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( LS );
|
||||
version.append( "Java home: " + System.getProperty( "java.home", "<unknown java home>" ) ).append( LS );
|
||||
version.append( "Default locale: " + Locale.getDefault() + ", platform encoding: " + System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( LS );
|
||||
version.append( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH + "\", family: \"" + Os.OS_FAMILY + "\"" );
|
||||
version.append( "Default locale: " + Locale.getDefault() + ", platform encoding: "
|
||||
+ System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( LS );
|
||||
version.append( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH
|
||||
+ "\", family: \"" + Os.OS_FAMILY + "\"" );
|
||||
return version.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ public class MavenCli
|
|||
}
|
||||
finally
|
||||
{
|
||||
if (localContainer != null)
|
||||
if ( localContainer != null )
|
||||
{
|
||||
localContainer.dispose();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue