Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 346da1b

Browse files
committed
Reformat code
1 parent 9e10821 commit 346da1b

File tree

407 files changed

+8721
-12259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+8721
-12259
lines changed

plexus-component-annotations/pom.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<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">
43
<modelVersion>4.0.0</modelVersion>
54

@@ -12,8 +11,6 @@
1211
<artifactId>plexus-component-annotations</artifactId>
1312

1413
<name>Plexus :: Component Annotations (deprecated)</name>
15-
<description>
16-
Plexus Component "Java 5" Annotations, to describe plexus components properties in java sources with
17-
standard annotations instead of javadoc annotations.
18-
</description>
14+
<description>Plexus Component "Java 5" Annotations, to describe plexus components properties in java sources with
15+
standard annotations instead of javadoc annotations.</description>
1916
</project>

plexus-component-annotations/src/main/java/org/codehaus/plexus/component/annotations/Component.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
package org.codehaus.plexus.component.annotations;
1818

1919
import java.lang.annotation.Documented;
20-
import static java.lang.annotation.ElementType.TYPE;
2120
import java.lang.annotation.Inherited;
2221
import java.lang.annotation.Retention;
23-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
2422
import java.lang.annotation.Target;
2523

24+
import static java.lang.annotation.ElementType.TYPE;
25+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
26+
2627
/**
2728
* Marks a class as a Plexus component.
2829
*
@@ -34,8 +35,7 @@
3435
@Target(TYPE)
3536
@Inherited
3637
@Deprecated
37-
public @interface Component
38-
{
38+
public @interface Component {
3939
Class<?> role();
4040

4141
String hint() default "";

plexus-component-annotations/src/main/java/org/codehaus/plexus/component/annotations/Configuration.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
package org.codehaus.plexus.component.annotations;
1818

1919
import java.lang.annotation.Documented;
20-
import static java.lang.annotation.ElementType.FIELD;
2120
import java.lang.annotation.Inherited;
2221
import java.lang.annotation.Retention;
23-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
2422
import java.lang.annotation.Target;
2523

24+
import static java.lang.annotation.ElementType.FIELD;
25+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
26+
2627
/**
2728
* Marks a field as a configuration element with a default value.
2829
*
@@ -34,8 +35,7 @@
3435
@Target(FIELD)
3536
@Inherited
3637
@Deprecated
37-
public @interface Configuration
38-
{
38+
public @interface Configuration {
3939
String name() default "";
4040

4141
String value();

plexus-component-annotations/src/main/java/org/codehaus/plexus/component/annotations/Requirement.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
package org.codehaus.plexus.component.annotations;
1818

1919
import java.lang.annotation.Documented;
20-
import static java.lang.annotation.ElementType.FIELD;
21-
import static java.lang.annotation.ElementType.METHOD;
2220
import java.lang.annotation.Inherited;
2321
import java.lang.annotation.Retention;
24-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
2522
import java.lang.annotation.Target;
2623

24+
import static java.lang.annotation.ElementType.FIELD;
25+
import static java.lang.annotation.ElementType.METHOD;
26+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
27+
2728
/**
2829
* Configures a requirement.
2930
*
@@ -32,11 +33,10 @@
3233
*/
3334
@Documented
3435
@Retention(RUNTIME)
35-
@Target({ FIELD, METHOD })
36+
@Target({FIELD, METHOD})
3637
@Inherited
3738
@Deprecated
38-
public @interface Requirement
39-
{
39+
public @interface Requirement {
4040
Class<?> role() default Object.class;
4141

4242
String hint() default "";
@@ -48,5 +48,4 @@
4848
String[] hints() default {};
4949

5050
boolean optional() default false;
51-
5251
}

plexus-component-metadata/pom.xml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- $Id$ -->
2+
<!-- $Id$ -->
33
<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">
44
<modelVersion>4.0.0</modelVersion>
55

@@ -57,7 +57,7 @@
5757
<artifactId>asm</artifactId>
5858
<version>9.5</version>
5959
</dependency>
60-
60+
6161
<dependency>
6262
<groupId>org.apache.maven.plugin-tools</groupId>
6363
<artifactId>maven-plugin-annotations</artifactId>
@@ -95,7 +95,7 @@
9595
<additionalparam>-Xdoclint:none</additionalparam>
9696
<failOnError>false</failOnError>
9797
</configuration>
98-
</plugin>
98+
</plugin>
9999
</plugins>
100100
</reporting>
101101

@@ -135,6 +135,5 @@
135135
</build>
136136
</profile>
137137
</profiles>
138-
139-
138+
140139
</project>

plexus-component-metadata/src/main/java/org/codehaus/plexus/maven/plugin/AbstractDescriptorMojo.java

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
package org.codehaus.plexus.maven.plugin;
22

3-
import java.util.List;
4-
53
/*
64
* The MIT License
7-
*
5+
*
86
* Copyright (c) 2004-2006, The Codehaus
9-
*
7+
*
108
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
119
* associated documentation files (the "Software"), to deal in the Software without restriction,
1210
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
1311
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
1412
* furnished to do so, subject to the following conditions:
15-
*
13+
*
1614
* The above copyright notice and this permission notice shall be included in all copies or
1715
* substantial portions of the Software.
18-
*
16+
*
1917
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
2018
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2119
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2220
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2321
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2422
*/
2523

24+
import java.util.List;
25+
2626
import org.apache.maven.plugin.AbstractMojo;
2727
import org.apache.maven.plugins.annotations.Component;
2828
import org.apache.maven.plugins.annotations.Parameter;
@@ -35,20 +35,18 @@
3535
*
3636
* @author Jason van Zyl
3737
*/
38-
public abstract class AbstractDescriptorMojo
39-
extends AbstractMojo
40-
{
38+
public abstract class AbstractDescriptorMojo extends AbstractMojo {
4139

4240
/**
4341
* Current project
4442
*/
45-
@Parameter( defaultValue = "${project}", required = true, readonly = true )
43+
@Parameter(defaultValue = "${project}", required = true, readonly = true)
4644
protected MavenProject mavenProject;
4745

4846
/**
4947
* The file encoding of the source files.
5048
*/
51-
@Parameter( defaultValue = "${project.build.sourceEncoding}" )
49+
@Parameter(defaultValue = "${project.build.sourceEncoding}")
5250
protected String sourceEncoding;
5351

5452
/**
@@ -61,7 +59,7 @@ public abstract class AbstractDescriptorMojo
6159
*/
6260
@Parameter
6361
protected List<String> extractors;
64-
62+
6563
@Component
6664
protected MavenProjectHelper mavenProjectHelper;
6765

plexus-component-metadata/src/main/java/org/codehaus/plexus/maven/plugin/PlexusDescriptorMojo.java

+19-23
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
/*
44
* Copyright (c) 2004-2005, Codehaus.org
5-
*
5+
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
77
* associated documentation files (the "Software"), to deal in the Software without restriction,
88
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
99
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
1010
* furnished to do so, subject to the following conditions:
11-
*
11+
*
1212
* The above copyright notice and this permission notice shall be included in all copies or
1313
* substantial portions of the Software.
14-
*
14+
*
1515
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
1616
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1717
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
@@ -31,55 +31,51 @@
3131
/**
3232
* Generates a Plexus {@code components.xml} component descriptor file from source (javadoc) or
3333
* class annotations and manually crafted descriptor files.
34-
*
34+
*
3535
* @author Jason van Zyl
3636
* @author Trygve Laugst&oslash;l
3737
*/
38-
@Mojo( name = "generate-metadata", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE )
39-
public class PlexusDescriptorMojo
40-
extends AbstractDescriptorMojo
41-
{
38+
@Mojo(
39+
name = "generate-metadata",
40+
defaultPhase = LifecyclePhase.PROCESS_CLASSES,
41+
requiresDependencyResolution = ResolutionScope.COMPILE)
42+
public class PlexusDescriptorMojo extends AbstractDescriptorMojo {
4243
/**
4344
* The output location for the generated descriptor.
4445
*/
45-
@Parameter( defaultValue = "${project.build.outputDirectory}/META-INF/plexus/components.xml", required = true )
46+
@Parameter(defaultValue = "${project.build.outputDirectory}/META-INF/plexus/components.xml", required = true)
4647
protected File generatedMetadata;
4748

4849
/**
4950
* The location of manually crafted component descriptors. The contents of the descriptor files in this directory is
5051
* merged with the information extracted from the project's sources/classes.
5152
*/
52-
@Parameter( defaultValue = "${basedir}/src/main/resources/META-INF/plexus", required = true )
53+
@Parameter(defaultValue = "${basedir}/src/main/resources/META-INF/plexus", required = true)
5354
protected File staticMetadataDirectory;
5455

5556
/**
5657
* The output location for the intermediary descriptor. This descriptors contains only the information extracted
5758
* from the project's sources/classes.
5859
*/
59-
@Parameter( defaultValue = "${project.build.directory}/components.xml", required = true )
60+
@Parameter(defaultValue = "${project.build.directory}/components.xml", required = true)
6061
protected File intermediaryMetadata;
6162

62-
public void execute()
63-
throws MojoExecutionException
64-
{
63+
public void execute() throws MojoExecutionException {
6564
MetadataGenerationRequest request = new MetadataGenerationRequest();
6665

67-
try
68-
{
66+
try {
6967
request.classpath = mavenProject.getCompileClasspathElements();
70-
request.classesDirectory = new File( mavenProject.getBuild().getOutputDirectory() );
68+
request.classesDirectory = new File(mavenProject.getBuild().getOutputDirectory());
7169
request.sourceDirectories = mavenProject.getCompileSourceRoots();
7270
request.sourceEncoding = sourceEncoding;
7371
request.componentDescriptorDirectory = staticMetadataDirectory;
7472
request.intermediaryFile = intermediaryMetadata;
7573
request.outputFile = generatedMetadata;
7674
request.extractors = extractors;
77-
78-
metadataGenerator.generateDescriptor( request );
79-
}
80-
catch ( Exception e )
81-
{
82-
throw new MojoExecutionException( "Error generating metadata: ", e );
75+
76+
metadataGenerator.generateDescriptor(request);
77+
} catch (Exception e) {
78+
throw new MojoExecutionException("Error generating metadata: ", e);
8379
}
8480
}
8581
}

plexus-component-metadata/src/main/java/org/codehaus/plexus/maven/plugin/PlexusMergeMojo.java

+16-25
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
/*
44
* Copyright (c) 2004-2006, Codehaus.org
5-
*
5+
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
77
* associated documentation files (the "Software"), to deal in the Software without restriction,
88
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
99
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
1010
* furnished to do so, subject to the following conditions:
11-
*
11+
*
1212
* The above copyright notice and this permission notice shall be included in all copies or
1313
* substantial portions of the Software.
14-
*
14+
*
1515
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
1616
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1717
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
@@ -35,18 +35,16 @@
3535

3636
/**
3737
* Merges a set of Plexus descriptors into one descriptor file.
38-
*
38+
*
3939
* @author Jason van Zyl
4040
* @author Trygve Laugst&oslash;l
4141
*/
42-
@Mojo( name = "merge-metadata", defaultPhase = LifecyclePhase.PROCESS_CLASSES )
43-
public class PlexusMergeMojo
44-
extends AbstractMojo
45-
{
42+
@Mojo(name = "merge-metadata", defaultPhase = LifecyclePhase.PROCESS_CLASSES)
43+
public class PlexusMergeMojo extends AbstractMojo {
4644
/**
4745
* The destination for the merged descriptor.
4846
*/
49-
@Parameter( defaultValue = "${project.build.outputDirectory}/META-INF/plexus/components.xml", required = true )
47+
@Parameter(defaultValue = "${project.build.outputDirectory}/META-INF/plexus/components.xml", required = true)
5048
private File output;
5149

5250
/**
@@ -55,31 +53,24 @@ public class PlexusMergeMojo
5553
@Parameter
5654
private File[] descriptors;
5755

58-
@Component( hint = "componentsXml" )
56+
@Component(hint = "componentsXml")
5957
private Merger merger;
6058

61-
public void execute()
62-
throws MojoExecutionException
63-
{
59+
public void execute() throws MojoExecutionException {
6460
List<File> files = new ArrayList<File>();
6561

66-
if ( descriptors != null )
67-
{
68-
files.addAll( Arrays.asList( descriptors ) );
62+
if (descriptors != null) {
63+
files.addAll(Arrays.asList(descriptors));
6964
}
7065

71-
if ( files.isEmpty() )
72-
{
66+
if (files.isEmpty()) {
7367
return;
7468
}
7569

76-
try
77-
{
78-
merger.mergeDescriptors( output, files );
79-
}
80-
catch ( IOException e )
81-
{
82-
throw new MojoExecutionException( "Error while executing component descriptor creator.", e );
70+
try {
71+
merger.mergeDescriptors(output, files);
72+
} catch (IOException e) {
73+
throw new MojoExecutionException("Error while executing component descriptor creator.", e);
8374
}
8475
}
8576
}

0 commit comments

Comments
 (0)