Skip to content
Permalink
Browse files
Formatting code
  • Loading branch information
effrafax committed Nov 21, 2019
1 parent 2a2f51a commit d31c492c2ac204bb955ae4e9a818801634ecbefe
Showing 54 changed files with 716 additions and 730 deletions.
@@ -111,7 +111,7 @@ ij_java_for_statement_wrap = off
ij_java_generate_final_locals = false
ij_java_generate_final_parameters = false
ij_java_if_brace_force = never
ij_java_imports_layout = *,|,javax.**,java.**,|,$*
ij_java_imports_layout = *, |, javax.**, java.**, |, $*
ij_java_indent_case_from_switch = true
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
@@ -142,7 +142,7 @@ ij_java_method_parameters_right_paren_on_new_line = false
ij_java_method_parameters_wrap = off
ij_java_modifier_list_wrap = false
ij_java_names_count_to_use_import_on_demand = 3
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
ij_java_packages_to_use_import_on_demand = java.awt.*, javax.swing.*
ij_java_parameter_annotation_wrap = off
ij_java_parentheses_expression_new_line_after_left_paren = false
ij_java_parentheses_expression_right_paren_on_new_line = false
@@ -256,7 +256,7 @@ ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false


[{*.cjs,*.js}]
[{*.cjs, *.js}]
ij_continuation_indent_size = 2
ij_javascript_align_imports = false
ij_javascript_align_multiline_array_initializer_expression = false
@@ -276,7 +276,7 @@ ij_javascript_array_initializer_wrap = off
ij_javascript_assignment_wrap = off
ij_javascript_binary_operation_sign_on_next_line = false
ij_javascript_binary_operation_wrap = off
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**/*,@angular/material,@angular/material/typings/**
ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/**
ij_javascript_blank_lines_after_imports = 1
ij_javascript_blank_lines_around_class = 1
ij_javascript_blank_lines_around_field = 0
@@ -418,17 +418,17 @@ ij_javascript_while_brace_force = never
ij_javascript_while_on_new_line = false
ij_javascript_wrap_comments = false

[{*.zsh,*.bash,*.sh}]
[{*.zsh, *.bash, *.sh}]
ij_shell_binary_ops_start_line = false
ij_shell_keep_column_alignment_padding = false
ij_shell_minify_program = false
ij_shell_redirect_followed_by_space = false
ij_shell_switch_cases_indented = false

[{.asciidoctorconfig,*.ad,*.adoc,*.asciidoc}]
[{.asciidoctorconfig, *.ad, *.adoc, *.asciidoc}]
ij_asciidoc_formatting_enabled = true
ij_asciidoc_one_sentence_per_line = true
ij_asciidoc_one_sentence_per_line = false

[pom.xml]
tab_width = 2
indent_size = 2
indent_size = 2
@@ -1,9 +1,10 @@
Archiva Documentation - Component Documentation

=======================================================
== Licensing information
Archiva Compontents is developed under the Apache License Version 2.0
Archiva Compontents is developed under the Apache License Version 2.0
:toc:
@@ -19,41 +20,39 @@ Users with questions may mail to users@archiva.apache.org.
== How to build and publish the pages for the archiva web content
This module and the children contain web content and project reports that can be published to the
This module and the children contain web content and project reports that can be published to the
archiva web site: https://archiva.apache.org
The web content parts of this module and submodules are published to the path
The web content parts of this module and submodules are published to the path
/components/
=== Use the script
There is a shell script +deploySite.sh+ which you can run to generate the site check and publish to
There is a shell script +deploySite.sh+ which you can run to generate the site check and publish to
the remote repository. It works only on Linux, on other platforms you have to go the next section.
The script is interactive, it asks you to confirm the publish after generation of the staging part.
.Execute

./deploySite.sh
./deploySite.sh
All arguments are appended to the mvn calls.
=== Run the mvn steps manually
==== Building the pages
You need enough free disk space to publish the web content. The archiva web site repository is big,
You need enough free disk space to publish the web content. The archiva web site repository is big,
but the maven build will only checkout the necessary directories for this build (sparse checkout).
For all the commands you have to change to this site directory:
.The following creates the site to the staging folder

mvn clean site
mvn clean site
mvn site:stage
The result can be checked in
The result can be checked in
site/target/staging/components/
@@ -66,13 +65,12 @@ to the remote repository, you may add this parameter:
where +${path-to-your-local-archiva}+ is the path where a bare clone of the archiva-web-content.git is stored.
NOTE: You cannot use +mvn site:run+ because this will place the submodules into the same folder and
overwrite each other.
NOTE: You cannot use +mvn site:run+ because this will place the submodules into the same folder and
overwrite each other.
==== Publish the pages
.This command publishes to the git repository

mvn scm-publish:publish-scm
After publishing to the git repository the gitpubsub mechanism is transferring it to the HTTP server.
@@ -82,10 +80,9 @@ to the remote repository, you may add this parameter:
-DsiteRepositoryUrl=scm:git:file:///${path-to-your-local-archiva}/archiva-web-content.git

=== Some notes about the build process
A sparse checkout of the git repository will be created in
A sparse checkout of the git repository will be created in
.site-content
@@ -17,7 +17,8 @@
~ 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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

@@ -28,19 +28,18 @@
import java.util.regex.Pattern;

/**
* DefaultExpressionEvaluator
* DefaultExpressionEvaluator
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*/
public class DefaultExpressionEvaluator
implements ExpressionEvaluator
{
private List<ExpressionSource> expressionSources;

public DefaultExpressionEvaluator()
public DefaultExpressionEvaluator( )
{
expressionSources = new ArrayList<>();
expressionSources = new ArrayList<>( );
}

public void addExpressionSource( ExpressionSource source )
@@ -51,7 +50,7 @@ public void addExpressionSource( ExpressionSource source )
public String expand( String str )
throws EvaluatorException
{
return recursiveExpand( str, new ArrayList<String>() );
return recursiveExpand( str, new ArrayList<String>( ) );
}

private String recursiveExpand( String str, List<String> seenExpressions )
@@ -69,7 +68,7 @@ private String recursiveExpand( String str, List<String> seenExpressions )
return str;
}

if ( this.expressionSources.isEmpty() )
if ( this.expressionSources.isEmpty( ) )
{
throw new EvaluatorException( "Unable to expand expressions with empty ExpressionSource list." );
}
@@ -79,7 +78,7 @@ private String recursiveExpand( String str, List<String> seenExpressions )
int offset = 0;
String expression;
String value;
StringBuilder expanded = new StringBuilder();
StringBuilder expanded = new StringBuilder( );

while ( mat.find( offset ) )
{
@@ -111,21 +110,21 @@ private String recursiveExpand( String str, List<String> seenExpressions )
if ( expanded.indexOf( "$$" ) >= 0 )
{
// Special case for escaped content.
return expanded.toString().replaceAll( "\\$\\$", "\\$" );
return expanded.toString( ).replaceAll( "\\$\\$", "\\$" );
}
else
{
// return expanded
return expanded.toString();
return expanded.toString( );
}
}

private String findValue( String expression )
{
String newExpression = expression.trim();
String newExpression = expression.trim( );
if ( newExpression.startsWith( "${" ) && newExpression.endsWith( "}" ) )
{
newExpression = newExpression.substring( 2, newExpression.length() - 1 );
newExpression = newExpression.substring( 2, newExpression.length( ) - 1 );
}

if ( StringUtils.isEmpty( newExpression ) )
@@ -134,10 +133,10 @@ private String findValue( String expression )
}

String value = null;
Iterator it = this.expressionSources.iterator();
while ( it.hasNext() )
Iterator it = this.expressionSources.iterator( );
while ( it.hasNext( ) )
{
ExpressionSource source = (ExpressionSource) it.next();
ExpressionSource source = (ExpressionSource) it.next( );
value = source.getExpressionValue( newExpression );
if ( value != null )
{
@@ -147,7 +146,7 @@ private String findValue( String expression )
return null;
}

public List getExpressionSourceList()
public List getExpressionSourceList( )
{
return this.expressionSources;
}
@@ -20,17 +20,16 @@
*/

/**
* EvaluatorException
* EvaluatorException
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*/
public class EvaluatorException
extends Exception
{
public EvaluatorException()
public EvaluatorException( )
{
super();
super( );
}

public EvaluatorException( String message, Throwable cause )
@@ -25,7 +25,6 @@
* ExpressionEvaluator
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*/
public interface ExpressionEvaluator
{
@@ -51,7 +50,7 @@ String expand( String str )
*
* @return the list of expression sources.
*/
List getExpressionSourceList();
List getExpressionSourceList( );

/**
* Remove a specific expression source.
@@ -23,7 +23,6 @@
* ExpressionSource
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*/
public interface ExpressionSource
{
@@ -24,11 +24,9 @@
import java.util.Properties;

/**
* PropertiesExpressionSource
* PropertiesExpressionSource
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*
*/
public class PropertiesExpressionSource
implements ExpressionSource
@@ -52,7 +50,7 @@ public String getExpressionValue( String expression )
}
}

public Properties getProperties()
public Properties getProperties( )
{
return properties;
}
@@ -22,10 +22,9 @@
import org.apache.archiva.components.evaluator.ExpressionSource;

/**
* SystemPropertyExpressionSource
* SystemPropertyExpressionSource
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*/
public class SystemPropertyExpressionSource
implements ExpressionSource
@@ -18,17 +18,17 @@
~ under the License.
-->

<project name="Expression Evaluator" >
<project name="Expression Evaluator">

<publishDate format="yyyy-MM-dd" position="none" />
<publishDate format="yyyy-MM-dd" position="none"/>

<body>
<menu ref="modules" />
<menu ref="reports" />
<menu ref="ASF" />
<breadcrumbs>
<item name="Archiva Components" href="../index.html" />
<item name="Expression Evaluator" href="index.html" />
</breadcrumbs>
</body>
<body>
<menu ref="modules"/>
<menu ref="reports"/>
<menu ref="ASF"/>
<breadcrumbs>
<item name="Archiva Components" href="../index.html"/>
<item name="Expression Evaluator" href="index.html"/>
</breadcrumbs>
</body>
</project>

0 comments on commit d31c492

Please sign in to comment.