maven-doxia-tools-1.2.1/ 0000755 0001750 0001750 00000000000 11633744576 015037 5 ustar twerner twerner maven-doxia-tools-1.2.1/pom.xml 0000644 0001750 0001750 00000013744 11377556202 016355 0 ustar twerner twerner
4.0.0
org.apache.maven.shared
maven-shared-components
15
org.apache.maven.shared
maven-doxia-tools
1.2.1
Maven Doxia Integration Tools
A collection of tools to help the integration of Doxia in Maven plugins.
2.0.6
scm:svn:http://svn.apache.org/repos/asf/maven/shared/tags/maven-doxia-tools-1.2.1
scm:svn:https://svn.apache.org/repos/asf/maven/shared/tags/maven-doxia-tools-1.2.1
http://svn.apache.org/viewvc/maven/shared/tags/maven-doxia-tools-1.2.1
jira
http://jira.codehaus.org/browse/MSHARED
1.1.3
1.1.3
2.0.6
commons-io
commons-io
1.4
org.apache.maven
maven-artifact
${mavenVersion}
org.apache.maven
maven-artifact-manager
${mavenVersion}
org.apache.maven
maven-model
${mavenVersion}
org.apache.maven
maven-project
${mavenVersion}
org.apache.maven.reporting
maven-reporting-api
${mavenVersion}
org.apache.maven
maven-plugin-api
${mavenVersion}
org.apache.maven.doxia
doxia-logging-api
${doxiaVersion}
org.apache.maven.doxia
doxia-decoration-model
${doxiaSitetoolsVersion}
org.codehaus.plexus
plexus-container-default
1.0-alpha-9
org.codehaus.plexus
plexus-i18n
1.0-beta-7
org.codehaus.plexus
plexus-component-api
org.codehaus.plexus
plexus-utils
1.4.5
org.apache.maven.shared
maven-plugin-testing-harness
1.0
test
org.codehaus.plexus
plexus-maven-plugin
create-component-descriptor
descriptor
org.codehaus.mojo
l10n-maven-plugin
1.0-alpha-2
ca
cs
da
de
es
fr
hu
it
ja
ko
lt
nl
no
pl
pt
pt_BR
sk
sv
tr
zh_CN
zh_TW
maven-doxia-tools-1.2.1/src/ 0000755 0001750 0001750 00000000000 11633744576 015626 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/ 0000755 0001750 0001750 00000000000 11633744576 016605 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/ 0000755 0001750 0001750 00000000000 11633744576 020617 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/ 0000755 0001750 0001750 00000000000 11633744576 021576 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/no-site-test/ 0000755 0001750 0001750 00000000000 11633744576 024131 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/no-site-test/pom.xml 0000644 0001750 0001750 00000002624 11152230410 025417 0 ustar twerner twerner
4.0.0
org.apache.maven.shared
no-site-test
1.0-SNAPSHOT
jar
dummy
junit
junit
3.8.2
test
maven-doxia-tools-1.2.1/src/test/resources/unit/site-tool-test/ 0000755 0001750 0001750 00000000000 11633744576 024472 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/site-tool-test/pom.xml 0000644 0001750 0001750 00000002626 11152230410 025762 0 ustar twerner twerner
4.0.0
org.apache.maven.shared
site-tool-test
1.0-SNAPSHOT
jar
dummy
junit
junit
3.8.1
test
maven-doxia-tools-1.2.1/src/test/resources/unit/site-tool-test/src/ 0000755 0001750 0001750 00000000000 11633744576 025261 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/site-tool-test/src/site/ 0000755 0001750 0001750 00000000000 11633744576 026225 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/resources/unit/site-tool-test/src/site/site.xml 0000644 0001750 0001750 00000002645 11020006575 027676 0 ustar twerner twerner
Maven Site
http://maven.apache.org/images/apache-maven-project.png
http://maven.apache.org/
http://maven.apache.org/images/maven-small.gif
org.apache.maven.skins
maven-stylus-skin
${reports}
maven-doxia-tools-1.2.1/src/test/java/ 0000755 0001750 0001750 00000000000 11633744576 017526 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/ 0000755 0001750 0001750 00000000000 11633744576 020315 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/apache/ 0000755 0001750 0001750 00000000000 11633744576 021536 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/ 0000755 0001750 0001750 00000000000 11633744576 022644 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/ 0000755 0001750 0001750 00000000000 11633744576 023750 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/ 0000755 0001750 0001750 00000000000 11633744576 025110 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/stubs/ 0000755 0001750 0001750 00000000000 11633744576 026250 5 ustar twerner twerner ././@LongLink 0000000 0000000 0000000 00000000147 00000000000 011567 L ustar root root maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/stubs/SiteToolMavenProjectStub.java maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/stubs/SiteToolMavenProjectStub.ja0000644 0001750 0001750 00000007642 11022460222 033462 0 ustar twerner twerner package org.apache.maven.doxia.tools.stubs;
/*
* 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.
*/
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.model.Build;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
/**
* @author Vincent Siveton
* @version $Id: SiteToolMavenProjectStub.java 664309 2008-06-07 10:18:58Z bentmann $
*/
public class SiteToolMavenProjectStub
extends MavenProjectStub
{
private Build build;
private File basedir;
public SiteToolMavenProjectStub( String projectName )
{
basedir = new File( super.getBasedir() + "/src/test/resources/unit/" + projectName );
MavenXpp3Reader pomReader = new MavenXpp3Reader();
Model model = null;
try
{
model = pomReader.read( new FileReader( new File( getBasedir(), "pom.xml" ) ) );
setModel( model );
}
catch ( Exception e )
{
throw new RuntimeException( e );
}
setGroupId( model.getGroupId() );
setArtifactId( model.getArtifactId() );
setVersion( model.getVersion() );
setName( model.getName() );
setUrl( model.getUrl() );
setPackaging( model.getPackaging() );
build = new Build();
build.setFinalName( model.getArtifactId() );
build.setDirectory( super.getBasedir() + "/target/test/unit/" + projectName + "/target" );
build.setSourceDirectory( getBasedir() + "/src/main/java" );
build.setOutputDirectory( build.getDirectory() + "/classes" );
build.setTestSourceDirectory( getBasedir() + "/src/test/java" );
build.setTestOutputDirectory( build.getDirectory() + "/test-classes" );
List compileSourceRoots = new ArrayList();
compileSourceRoots.add( getBasedir() + "/src/main/java" );
setCompileSourceRoots( compileSourceRoots );
List testCompileSourceRoots = new ArrayList();
testCompileSourceRoots.add( getBasedir() + "/src/test/java" );
setTestCompileSourceRoots( testCompileSourceRoots );
}
/** {@inheritDoc} */
public Build getBuild()
{
return build;
}
/** {@inheritDoc} */
public void setBuild( Build build )
{
this.build = build;
}
/** {@inheritDoc} */
public File getBasedir()
{
return basedir;
}
public void setBasedir( File basedir )
{
this.basedir = basedir;
}
/** {@inheritDoc} */
public List getRemoteArtifactRepositories()
{
ArtifactRepository repository = new DefaultArtifactRepository( "central", "http://repo1.maven.org/maven2",
new DefaultRepositoryLayout() );
return Collections.singletonList( repository );
}
}
maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java 0000644 0001750 0001750 00000030006 11022460222 030323 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.Skin;
import org.apache.maven.doxia.tools.stubs.SiteToolMavenProjectStub;
import org.codehaus.plexus.PlexusTestCase;
/**
* @author Vincent Siveton
* @version $Id: SiteToolTest.java 664309 2008-06-07 10:18:58Z bentmann $
*/
public class SiteToolTest
extends PlexusTestCase
{
/** {@inheritDoc} */
protected void setUp()
throws Exception
{
super.setUp();
}
/** {@inheritDoc} */
protected void tearDown()
throws Exception
{
super.tearDown();
}
/**
* @throws Exception
*/
protected ArtifactRepository getLocalRepo()
throws Exception
{
String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy( true, updatePolicyFlag,
checksumPolicyFlag );
ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy( true, updatePolicyFlag,
checksumPolicyFlag );
ArtifactRepositoryFactory artifactRepositoryFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE );
ArtifactRepositoryLayout defaultArtifactRepositoryLayout = (ArtifactRepositoryLayout) lookup(
ArtifactRepositoryLayout.ROLE,
"default" );
return artifactRepositoryFactory.createArtifactRepository( "local", getTestFile( "target/local-repo" ).toURL()
.toString(), defaultArtifactRepositoryLayout, snapshotsPolicy, releasesPolicy );
}
/**
* @throws Exception
*/
protected File getLocalRepoDir()
throws Exception
{
return new File( getLocalRepo().getBasedir() );
}
/**
* @throws Exception
*/
public void testGetDefaultSkinArtifact()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
assertNotNull( tool.getDefaultSkinArtifact( getLocalRepo(), project.getRemoteArtifactRepositories() ) );
}
/**
* @throws Exception
*/
public void testGetSkinArtifactFromRepository()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
DecorationModel decorationModel = new DecorationModel();
Skin skin = new Skin();
skin.setGroupId( "org.apache.maven.skins" );
skin.setArtifactId( "maven-stylus-skin" );
decorationModel.setSkin( skin );
assertNotNull( tool.getSkinArtifactFromRepository( getLocalRepo(), project.getRemoteArtifactRepositories(),
decorationModel ) );
}
/**
* @throws Exception
*/
public void testGetRelativePath()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
String to = "http://maven.apache.org";
String from = "http://maven.apache.org";
assertEquals( tool.getRelativePath( to, from ), "" );
to = "http://maven.apache.org/";
from = "http://maven.apache.org/plugins/maven-site-plugin";
assertEquals( tool.getRelativePath( to, from ), ".." + File.separator + ".." );
to = "http://maven.apache.org";
from = "http://maven.apache.org/plugins/maven-site-plugin/";
assertEquals( tool.getRelativePath( to, from ), ".." + File.separator + ".." );
to = "http://maven.apache.org/";
from = "http://maven.apache.org/plugins/maven-site-plugin/";
assertEquals( tool.getRelativePath( to, from ), ".." + File.separator + ".." );
to = "http://maven.apache.org";
from = "http://maven.apache.org/plugins/maven-site-plugin";
assertEquals( tool.getRelativePath( to, from ), ".." + File.separator + ".." );
to = "http://maven.apache.org/plugins/maven-site-plugin/";
from = "http://maven.apache.org";
assertEquals( tool.getRelativePath( to, from ), "plugins" + File.separator + "maven-site-plugin" );
to = "http://maven.apache.org/plugins/maven-site-plugin/";
from = "http://maven.apache.org/";
assertEquals( tool.getRelativePath( to, from ), "plugins" + File.separator + "maven-site-plugin" );
to = "http://maven.apache.org/plugins/maven-site-plugin";
from = "http://maven.apache.org";
assertEquals( tool.getRelativePath( to, from ), "plugins" + File.separator + "maven-site-plugin" );
to = "http://maven.apache.org/plugins/maven-site-plugin";
from = "http://maven.apache.org/";
assertEquals( tool.getRelativePath( to, from ), "plugins" + File.separator + "maven-site-plugin" );
// Tests between files as described in MIDEA-102
to = "C:/dev/voca/gateway/parser/gateway-parser.iml";
from = "C:/dev/voca/gateway/";
assertEquals( "Child file using Windows drive letter",
"parser" + File.separator + "gateway-parser.iml", tool.getRelativePath( to, from ) );
to = "C:/foo/child";
from = "C:/foo/master";
assertEquals( "Sibling directory using Windows drive letter",
".." + File.separator + "child", tool.getRelativePath( to, from ) );
to = "/myproject/myproject-module1";
from = "/myproject/myproject";
assertEquals( "Sibling directory with similar name",
".." + File.separator + "myproject-module1", tool.getRelativePath( to, from ) );
// Normalized paths as described in MSITE-284
assertEquals( ".." + File.separator + "project-module-1" + File.separator + "src" + File.separator + "site",
tool.getRelativePath( "Z:\\dir\\project\\project-module-1\\src\\site",
"Z:\\dir\\project\\project-module-1\\..\\project-parent" ) );
assertEquals( ".." + File.separator + ".." + File.separator + ".." + File.separator + "project-parent",
tool.getRelativePath( "Z:\\dir\\project\\project-module-1\\..\\project-parent",
"Z:\\dir\\project\\project-module-1\\src\\site" ) );
assertEquals( ".." + File.separator + "foo", tool.getRelativePath( "../../foo/foo", "../../foo/bar" ) );
}
/**
* @throws Exception
*/
public void testGetSiteDescriptorFromBasedir()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
assertEquals( tool.getSiteDescriptorFromBasedir( null, project.getBasedir(), null ).toString(),
project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
assertEquals( tool.getSiteDescriptorFromBasedir( null, project.getBasedir(), Locale.ENGLISH ).toString(),
project.getBasedir() + File.separator + "src" + File.separator + "site" + File.separator + "site.xml" );
String siteDir = "src/blabla";
assertEquals( tool.getSiteDescriptorFromBasedir( siteDir, project.getBasedir(), null ).toString(),
project.getBasedir() + File.separator + "src" + File.separator + "blabla" + File.separator + "site.xml" );
}
/**
* @throws Exception
*/
public void testGetSiteDescriptorFromRepository()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
project.setGroupId( "org.apache.maven" );
project.setArtifactId( "maven-site" );
project.setVersion( "1.0" );
String result = getLocalRepoDir() + File.separator + "org" + File.separator + "apache" + File.separator
+ "maven" + File.separator + "maven-site" + File.separator + "1.0" + File.separator
+ "maven-site-1.0-site.xml";
assertEquals( tool.getSiteDescriptorFromRepository( project, getLocalRepo(),
project.getRemoteArtifactRepositories(), Locale.ENGLISH )
.toString(), result );
}
/**
* @throws Exception
*/
public void testGetDecorationModel()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "site-tool-test" );
project.setGroupId( "org.apache.maven" );
project.setArtifactId( "maven-site" );
project.setVersion( "1.0" );
String siteDirectory = "src/site";
List reactorProjects = new ArrayList();
project.setBasedir( null ); // get it from repo
DecorationModel model = tool.getDecorationModel( project, reactorProjects, getLocalRepo(), project
.getRemoteArtifactRepositories(), siteDirectory, Locale.getDefault(), "ISO-8859-1", "ISO-8859-1" );
assertNotNull( model );
assertNotNull( model.getBannerLeft() );
assertEquals( "Maven", model.getBannerLeft().getName() );
assertEquals( "images/apache-maven-project-2.png", model.getBannerLeft().getSrc() );
assertEquals( "http://maven.apache.org/", model.getBannerLeft().getHref() );
assertNotNull( model.getBannerRight() );
assertNull( model.getBannerRight().getName() );
assertEquals( "images/maven-logo-2.gif", model.getBannerRight().getSrc() );
assertNull( model.getBannerRight().getHref() );
}
/**
* @throws Exception
*/
public void testGetDefaultDecorationModel()
throws Exception
{
SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
assertNotNull( tool );
SiteToolMavenProjectStub project = new SiteToolMavenProjectStub( "no-site-test" );
String siteDirectory = "src/site";
List reactorProjects = new ArrayList();
DecorationModel model =
tool.getDecorationModel( project, reactorProjects, getLocalRepo(), project.getRemoteArtifactRepositories(),
siteDirectory, Locale.getDefault(), "UTF-8", "UTF-8" );
assertNotNull( model );
}
}
maven-doxia-tools-1.2.1/src/test/java/org/apache/maven/doxia/tools/DefaultSiteToolTest.java 0000644 0001750 0001750 00000004312 11005075354 031642 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
import junit.framework.TestCase;
/**
* @author Vincent Siveton
* @version $Id: DefaultSiteToolTest.java 651940 2008-04-27 13:09:00Z vsiveton $
*/
public class DefaultSiteToolTest
extends TestCase
{
/** {@inheritDoc} */
protected void setUp()
throws Exception
{
super.setUp();
}
/** {@inheritDoc} */
protected void tearDown()
throws Exception
{
super.tearDown();
}
/**
* @throws Exception
*/
public void testGetNormalizedPath()
throws Exception
{
assertEquals( null, DefaultSiteTool.getNormalizedPath( null ) );
assertEquals( "", DefaultSiteTool.getNormalizedPath( "" ) );
assertEquals( "foo", DefaultSiteTool.getNormalizedPath( "foo" ) );
assertEquals( "foo/bar", DefaultSiteTool.getNormalizedPath( "foo/bar" ) );
assertEquals( "foo/bar", DefaultSiteTool.getNormalizedPath( "foo\\bar" ) );
assertEquals( "foo/bar", DefaultSiteTool.getNormalizedPath( "foo/./bar" ) );
assertEquals( "bar", DefaultSiteTool.getNormalizedPath( "foo/../bar" ) );
assertEquals( "foo", DefaultSiteTool.getNormalizedPath( "./foo" ) );
assertEquals( "../foo", DefaultSiteTool.getNormalizedPath( "../foo" ) );
assertEquals( "../../foo", DefaultSiteTool.getNormalizedPath( "../../foo" ) );
}
}
maven-doxia-tools-1.2.1/src/site/ 0000755 0001750 0001750 00000000000 11633744576 016572 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/site/apt/ 0000755 0001750 0001750 00000000000 11633744576 017356 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/site/apt/index.apt 0000644 0001750 0001750 00000002561 11020006575 021153 0 ustar twerner twerner ------
Introduction
------
Dennis Lundberg
------
2008-04-27
------
~~ 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.
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
Maven Doxia Tools
This shared component has some utilities that are useful when integrating Doxia in Maven,
mainly for site generation and report creation. The main entry point is the
{{{apidocs/org/apache/maven/doxia/tools/SiteTool.html}SiteTool}} Plexus component.
* Usage
Instructions on how to use the integration of Doxia in Maven can be found {{{usage.html}here}}.
maven-doxia-tools-1.2.1/src/site/apt/usage.apt 0000644 0001750 0001750 00000003212 11005077274 021151 0 ustar twerner twerner ------
Usage
------
Dennis Lundberg
Vincent Siveton
------
2008-04-27
------
~~ 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.
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
Using the SiteTool in a Mojo
+-----
...
import org.apache.maven.doxia.tools.SiteTool;
...
/**
* Your own mojo.
*/
public class YourOwnMojo extends AbstractMojo
{
...
/**
* SiteTool.
*
* @component
*/
protected SiteTool siteTool;
...
public someMethod()
{
List localesList = siteTool.getAvailableLocales( locales );
String relativePath = siteTool.getRelativePath( "C:/foo/child",
"C:/foo/master" );
...
}
...
}
+-----
* References
[[1]] {{{apidocs/org/apache/maven/doxia/tools/SiteTool.html}SiteTool API}}
[] maven-doxia-tools-1.2.1/src/site/site.xml 0000644 0001750 0001750 00000002315 11252711123 020234 0 ustar twerner twerner
maven-doxia-tools-1.2.1/src/main/ 0000755 0001750 0001750 00000000000 11633744576 016552 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/resources/ 0000755 0001750 0001750 00000000000 11633744576 020564 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/resources/site-tool_cs.properties 0000644 0001750 0001750 00000002126 11020006575 025263 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Nad\u0159azen\u00fd projekt
decorationModel.menu.projectdocumentation = Dokumentace projektu
decorationModel.menu.projectinformation = Informace o projektu
decorationModel.menu.projectmodules = Moduly
decorationModel.menu.projectreports = Souhrny projektu
maven-doxia-tools-1.2.1/src/main/resources/site-tool_sv.properties 0000644 0001750 0001750 00000002122 11033525423 025304 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = F\u00f6r\u00e4ldraprojekt
decorationModel.menu.projectdocumentation = Projektdokumentation
decorationModel.menu.projectinformation = Projektinformation
decorationModel.menu.projectmodules = Moduler
decorationModel.menu.projectreports = Projektrapporter maven-doxia-tools-1.2.1/src/main/resources/site-tool_ja.properties 0000644 0001750 0001750 00000002341 11020006575 025247 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = \u89aa\u30d7\u30ed\u30b8\u30a7\u30af\u30c8
decorationModel.menu.projectdocumentation = \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u6587\u66f8
decorationModel.menu.projectinformation = \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u60c5\u5831
decorationModel.menu.projectmodules = \u30e2\u30b8\u30e5\u30fc\u30eb
decorationModel.menu.projectreports = \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30ec\u30dd\u30fc\u30c8
maven-doxia-tools-1.2.1/src/main/resources/site-tool_pt.properties 0000644 0001750 0001750 00000002157 11060457365 025320 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Projecto Pai
decorationModel.menu.projectdocumentation = Documenta\u00e7\u00e3o do Projeto
decorationModel.menu.projectinformation = Informa\u00e7\u00e3o do Projeto
decorationModel.menu.projectmodules = M\u00f3dulos
decorationModel.menu.projectreports = Relat\u00f3rios do Projeto
maven-doxia-tools-1.2.1/src/main/resources/site-tool_pt_BR.properties 0000644 0001750 0001750 00000002163 11020006575 025665 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Projeto Pai
decorationModel.menu.projectdocumentation = Documenta\u00e7\u00e3o do Projeto
decorationModel.menu.projectinformation = Informa\u00e7\u00f5es sobre o Projeto
decorationModel.menu.projectmodules = M\u00f3dulo
decorationModel.menu.projectreports = Relat\u00f3rios do Projeto
maven-doxia-tools-1.2.1/src/main/resources/default-site.xml 0000644 0001750 0001750 00000002123 10747102534 023655 0 ustar twerner twerner
${project.name}
maven-doxia-tools-1.2.1/src/main/resources/site-tool_sk.properties 0000644 0001750 0001750 00000002153 11020006575 025273 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Nadraden\u00fd projekt
decorationModel.menu.projectdocumentation = Projektov\u00e1 dokument\u00e1cia
decorationModel.menu.projectinformation = Inform\u00e1cie o projekte
decorationModel.menu.projectmodules = Moduly
decorationModel.menu.projectreports = Projektov\u00e9 zostavy
maven-doxia-tools-1.2.1/src/main/resources/site-tool_no.properties 0000644 0001750 0001750 00000002115 11020006575 025270 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Hovedprosjekt
decorationModel.menu.projectdocumentation = Prosjekt dokumentasjon
decorationModel.menu.projectinformation = Prosjekt informasjon
decorationModel.menu.projectmodules = Moduler
decorationModel.menu.projectreports = Prosjekt rapporter
maven-doxia-tools-1.2.1/src/main/resources/site-tool_fr.properties 0000644 0001750 0001750 00000002106 11020006575 025263 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Projet parent
decorationModel.menu.projectdocumentation = Documentation sur le projet
decorationModel.menu.projectinformation = Info Projet
decorationModel.menu.projectmodules = Modules
decorationModel.menu.projectreports = Rapports Projet
maven-doxia-tools-1.2.1/src/main/resources/site-tool_en.properties 0000644 0001750 0001750 00000002275 11020006575 025265 0 ustar twerner twerner # 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.
# NOTE:
# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
# JVM's default locale (which need not be "en"). See the method javadoc about
# ResourceBundle.getBundle(String, Locale, ClassLoader)
# for a full description of the lookup strategy.
maven-doxia-tools-1.2.1/src/main/resources/site-tool_pl.properties 0000644 0001750 0001750 00000002131 11020006575 025265 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Projekt nadrz\u0119dny
decorationModel.menu.projectdocumentation = Dokumentacja projektu
decorationModel.menu.projectinformation = Informacja o projekcie
decorationModel.menu.projectmodules = Modu\u0142y
decorationModel.menu.projectreports = Raporty projektu
maven-doxia-tools-1.2.1/src/main/resources/site-tool_tr.properties 0000644 0001750 0001750 00000002117 11033525423 025305 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Ana Proje
decorationModel.menu.projectdocumentation = Proje Dok\u00fcmantasyonu
decorationModel.menu.projectinformation = Proje Bilgileri
decorationModel.menu.projectmodules = Mod\u00fcller
decorationModel.menu.projectreports = Proje Raporlar\u00fd
maven-doxia-tools-1.2.1/src/main/resources/site-tool_ko.properties 0000644 0001750 0001750 00000002251 11020006575 025266 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = \ubd80\ubaa8 \ud504\ub85c\uc81d\ud2b8
decorationModel.menu.projectdocumentation = \ud504\ub85c\uc81d\ud2b8 \ubb38\uc11c\ud654
decorationModel.menu.projectinformation = \ud504\ub85c\uc81d\ud2b8 \uc815\ubcf4
decorationModel.menu.projectmodules = \ubaa8\ub4c8
decorationModel.menu.projectreports = \ud504\ub85c\uc81d\ud2b8 \ubcf4\uace0\uc11c
maven-doxia-tools-1.2.1/src/main/resources/site-tool_hu.properties 0000644 0001750 0001750 00000002145 11020006575 025273 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Sz\u00fcl\u0151 projekt
decorationModel.menu.projectdocumentation = Projekt dokument\u00e1ci\u00f3
decorationModel.menu.projectinformation = Projekt inform\u00e1ci\u00f3
decorationModel.menu.projectmodules = Modulok
decorationModel.menu.projectreports = Projekt riportok
maven-doxia-tools-1.2.1/src/main/resources/site-tool_nl.properties 0000644 0001750 0001750 00000002114 11020006575 025264 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Bevattend project
decorationModel.menu.projectdocumentation = Project documentatie
decorationModel.menu.projectinformation = Project informatie
decorationModel.menu.projectmodules = Modulen
decorationModel.menu.projectreports = Project rapporten
maven-doxia-tools-1.2.1/src/main/resources/site-tool_zh_TW.properties 0000644 0001750 0001750 00000002276 11143653364 025731 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = \u7236\u5c08\u6848 (Parent Project)
decorationModel.menu.projectdocumentation = \u5c08\u6848\u6587\u4ef6 (Project Documentation)
decorationModel.menu.projectinformation = \u5c08\u6848\u8cc7\u8a0a (Project Information)
decorationModel.menu.projectmodules = \u6a21\u7d44 (Modules)
decorationModel.menu.projectreports = \u5c08\u6848\u5831\u8868 (Project Reports)
maven-doxia-tools-1.2.1/src/main/resources/site-tool_ca.properties 0000644 0001750 0001750 00000002144 11033525423 025243 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Projecte pare
decorationModel.menu.projectdocumentation = Documentaci\u00f3 del projecte
decorationModel.menu.projectinformation = Informaci\u00f3 del projecte
decorationModel.menu.projectmodules = M\u00f2duls
decorationModel.menu.projectreports = Informes del projecte
maven-doxia-tools-1.2.1/src/main/resources/site-tool_it.properties 0000644 0001750 0001750 00000002132 11020006575 025267 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Progetto Padre
decorationModel.menu.projectdocumentation = Documentazione del Progetto
decorationModel.menu.projectinformation = Informazioni sul Progetto
decorationModel.menu.projectmodules = Moduli
decorationModel.menu.projectreports = Rapporti del Progetto
maven-doxia-tools-1.2.1/src/main/resources/site-tool_da.properties 0000644 0001750 0001750 00000002116 11042310402 025230 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Overordnet Projekt
decorationModel.menu.projectdocumentation = Projekt Dokumentation
decorationModel.menu.projectinformation = Projekt Information
decorationModel.menu.projectmodules = Moduler
decorationModel.menu.projectreports = Projekt Rapporter maven-doxia-tools-1.2.1/src/main/resources/site-tool.properties 0000644 0001750 0001750 00000002110 11020006575 024567 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Parent Project
decorationModel.menu.projectdocumentation = Project Documentation
decorationModel.menu.projectinformation = Project Information
decorationModel.menu.projectmodules = Modules
decorationModel.menu.projectreports = Project Reports maven-doxia-tools-1.2.1/src/main/resources/site-tool_de.properties 0000644 0001750 0001750 00000002125 11020006575 025245 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = \u00fcbergeordnetes Projekt
decorationModel.menu.projectdocumentation = Projektdokumentation
decorationModel.menu.projectinformation = Projektinformationen
decorationModel.menu.projectmodules = Module
decorationModel.menu.projectreports = Projektberichte
maven-doxia-tools-1.2.1/src/main/resources/site-tool_zh_CN.properties 0000644 0001750 0001750 00000002143 11020006575 025656 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = \u7236\u9879\u76ee
decorationModel.menu.projectdocumentation = \u9879\u76ee\u6587\u6863
decorationModel.menu.projectinformation = \u9879\u76ee\u4fe1\u606f
decorationModel.menu.projectmodules = \u6a21\u5757
decorationModel.menu.projectreports = \u9879\u76ee\u62a5\u8868
maven-doxia-tools-1.2.1/src/main/resources/site-tool_es.properties 0000644 0001750 0001750 00000002150 11020006575 025262 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = Proyecto padre
decorationModel.menu.projectdocumentation = Documentaci\u00f3n del proyecto
decorationModel.menu.projectinformation = Informaci\u00f3n del proyecto
decorationModel.menu.projectmodules = M\u00f3dulos
decorationModel.menu.projectreports = Informes del proyecto
maven-doxia-tools-1.2.1/src/main/resources/site-tool_lt.properties 0000644 0001750 0001750 00000002135 11344744153 025307 0 ustar twerner twerner # 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.
decorationModel.menu.parentproject = T\u0117vinis projektas
decorationModel.menu.projectdocumentation = Projekt\u0173 dokumentacija
decorationModel.menu.projectinformation = Projekto informacija
decorationModel.menu.projectmodules = Moduliai
decorationModel.menu.projectreports = Projekto ataskaitos
maven-doxia-tools-1.2.1/src/main/java/ 0000755 0001750 0001750 00000000000 11633744576 017473 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/ 0000755 0001750 0001750 00000000000 11633744576 020262 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/apache/ 0000755 0001750 0001750 00000000000 11633744576 021503 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/ 0000755 0001750 0001750 00000000000 11633744576 022611 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/ 0000755 0001750 0001750 00000000000 11633744576 023715 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/tools/ 0000755 0001750 0001750 00000000000 11633744576 025055 5 ustar twerner twerner maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/tools/MojoLogWrapper.java 0000644 0001750 0001750 00000007510 11234112216 030603 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
import org.apache.maven.doxia.logging.Log;
/**
* Wrap a Mojo logger into a Doxia logger.
*
* @author Vincent Siveton
* @version $Id: MojoLogWrapper.java 799000 2009-07-29 18:27:26Z ltheussl $
* @since 1.1
* @see org.apache.maven.plugin.logging.Log
*/
public class MojoLogWrapper
implements Log
{
private final org.apache.maven.plugin.logging.Log mojoLog;
/**
* @param log a Mojo log
*/
public MojoLogWrapper( org.apache.maven.plugin.logging.Log log )
{
this.mojoLog = log;
}
/** {@inheritDoc} */
public void setLogLevel( int level )
{
// nop
}
/** {@inheritDoc} */
public void debug( CharSequence content )
{
mojoLog.debug( toString( content ) );
}
/** {@inheritDoc} */
public void debug( CharSequence content, Throwable error )
{
mojoLog.debug( toString( content ), error );
}
/** {@inheritDoc} */
public void debug( Throwable error )
{
mojoLog.debug( "", error );
}
/** {@inheritDoc} */
public void info( CharSequence content )
{
mojoLog.info( toString( content ) );
}
/** {@inheritDoc} */
public void info( CharSequence content, Throwable error )
{
mojoLog.info( toString( content ), error );
}
/** {@inheritDoc} */
public void info( Throwable error )
{
mojoLog.info( "", error );
}
/** {@inheritDoc} */
public void warn( CharSequence content )
{
mojoLog.warn( toString( content ) );
}
/** {@inheritDoc} */
public void warn( CharSequence content, Throwable error )
{
mojoLog.warn( toString( content ), error );
}
/** {@inheritDoc} */
public void warn( Throwable error )
{
mojoLog.warn( "", error );
}
/** {@inheritDoc} */
public void error( CharSequence content )
{
mojoLog.error( toString( content ) );
}
/** {@inheritDoc} */
public void error( CharSequence content, Throwable error )
{
mojoLog.error( toString( content ), error );
}
/** {@inheritDoc} */
public void error( Throwable error )
{
mojoLog.error( "", error );
}
/** {@inheritDoc} */
public boolean isDebugEnabled()
{
return mojoLog.isDebugEnabled();
}
/** {@inheritDoc} */
public boolean isInfoEnabled()
{
return mojoLog.isInfoEnabled();
}
/** {@inheritDoc} */
public boolean isWarnEnabled()
{
return mojoLog.isWarnEnabled();
}
/** {@inheritDoc} */
public boolean isErrorEnabled()
{
return mojoLog.isErrorEnabled();
}
// ----------------------------------------------------------------------
// Private methods
// ----------------------------------------------------------------------
private String toString( CharSequence content )
{
if ( content == null )
{
return "";
}
return content.toString();
}
}
maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java 0000644 0001750 0001750 00000153002 11344467361 030761 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
import org.apache.commons.io.FilenameUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.doxia.site.decoration.Banner;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.Menu;
import org.apache.maven.doxia.site.decoration.MenuItem;
import org.apache.maven.doxia.site.decoration.Skin;
import org.apache.maven.doxia.site.decoration.inheritance.DecorationModelInheritanceAssembler;
import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader;
import org.apache.maven.model.Model;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.reporting.MavenReport;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.interpolation.EnvarBasedValueSource;
import org.codehaus.plexus.util.interpolation.MapBasedValueSource;
import org.codehaus.plexus.util.interpolation.ObjectBasedValueSource;
import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
/**
* Default implementation of the site tool.
*
* @author Vincent Siveton
* @version $Id: DefaultSiteTool.java 919780 2010-03-06 15:04:17Z hboutemy $
*
* @plexus.component role="org.apache.maven.doxia.tools.SiteTool" role-hint="default"
*/
public class DefaultSiteTool
extends AbstractLogEnabled
implements SiteTool
{
// ----------------------------------------------------------------------
// Components
// ----------------------------------------------------------------------
/**
* The component that is used to resolve additional artifacts required.
*
* @plexus.requirement
*/
private ArtifactResolver artifactResolver;
/**
* The component used for creating artifact instances.
*
* @plexus.requirement
*/
private ArtifactFactory artifactFactory;
/**
* Internationalization.
*
* @plexus.requirement
*/
protected I18N i18n;
/**
* The component for assembling inheritance.
*
* @plexus.requirement
*/
protected DecorationModelInheritanceAssembler assembler;
/**
* Project builder.
*
* @plexus.requirement
*/
protected MavenProjectBuilder mavenProjectBuilder;
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
/** {@inheritDoc} */
public Artifact getSkinArtifactFromRepository( ArtifactRepository localRepository, List remoteArtifactRepositories,
DecorationModel decoration )
throws SiteToolException
{
if ( localRepository == null )
{
throw new IllegalArgumentException( "The parameter 'localRepository' can not be null" );
}
if ( remoteArtifactRepositories == null )
{
throw new IllegalArgumentException( "The parameter 'remoteArtifactRepositories' can not be null" );
}
if ( decoration == null )
{
throw new IllegalArgumentException( "The parameter 'decoration' can not be null" );
}
Skin skin = decoration.getSkin();
if ( skin == null )
{
skin = Skin.getDefaultSkin();
}
String version = skin.getVersion();
Artifact artifact;
try
{
if ( version == null )
{
version = Artifact.RELEASE_VERSION;
}
VersionRange versionSpec = VersionRange.createFromVersionSpec( version );
artifact = artifactFactory.createDependencyArtifact( skin.getGroupId(), skin.getArtifactId(), versionSpec,
"jar", null, null );
artifactResolver.resolve( artifact, remoteArtifactRepositories, localRepository );
}
catch ( InvalidVersionSpecificationException e )
{
throw new SiteToolException( "InvalidVersionSpecificationException: The skin version '" + version
+ "' is not valid: " + e.getMessage() );
}
catch ( ArtifactResolutionException e )
{
throw new SiteToolException( "ArtifactResolutionException: Unable to find skin", e );
}
catch ( ArtifactNotFoundException e )
{
throw new SiteToolException( "ArtifactNotFoundException: The skin does not exist: " + e.getMessage() );
}
return artifact;
}
/** {@inheritDoc} */
public Artifact getDefaultSkinArtifact( ArtifactRepository localRepository, List remoteArtifactRepositories )
throws SiteToolException
{
return getSkinArtifactFromRepository( localRepository, remoteArtifactRepositories, new DecorationModel() );
}
/** {@inheritDoc} */
public String getRelativePath( String to, String from )
{
if ( to == null )
{
throw new IllegalArgumentException( "The parameter 'to' can not be null" );
}
if ( from == null )
{
throw new IllegalArgumentException( "The parameter 'from' can not be null" );
}
URL toUrl = null;
URL fromUrl = null;
String toPath = to;
String fromPath = from;
try
{
toUrl = new URL( to );
}
catch ( MalformedURLException e )
{
try
{
toUrl = new File( getNormalizedPath( to ) ).toURI().toURL();
}
catch ( MalformedURLException e1 )
{
getLogger().warn( "Unable to load a URL for '" + to + "': " + e.getMessage() );
}
}
try
{
fromUrl = new URL( from );
}
catch ( MalformedURLException e )
{
try
{
fromUrl = new File( getNormalizedPath( from ) ).toURI().toURL();
}
catch ( MalformedURLException e1 )
{
getLogger().warn( "Unable to load a URL for '" + from + "': " + e.getMessage() );
}
}
if ( toUrl != null && fromUrl != null )
{
// URLs, determine if they share protocol and domain info
if ( ( toUrl.getProtocol().equalsIgnoreCase( fromUrl.getProtocol() ) )
&& ( toUrl.getHost().equalsIgnoreCase( fromUrl.getHost() ) )
&& ( toUrl.getPort() == fromUrl.getPort() ) )
{
// shared URL domain details, use URI to determine relative path
toPath = toUrl.getFile();
fromPath = fromUrl.getFile();
}
else
{
// don't share basic URL information, no relative available
return to;
}
}
else if ( ( toUrl != null && fromUrl == null ) || ( toUrl == null && fromUrl != null ) )
{
// one is a URL and the other isnt, no relative available.
return to;
}
// either the two locations are not URLs or if they are they
// share the common protocol and domain info and we are left
// with their URI information
// normalize the path delimiters
toPath = new File( toPath ).getPath();
fromPath = new File( fromPath ).getPath();
// strip any leading slashes if its a windows path
if ( toPath.matches( "^\\[a-zA-Z]:" ) )
{
toPath = toPath.substring( 1 );
}
if ( fromPath.matches( "^\\[a-zA-Z]:" ) )
{
fromPath = fromPath.substring( 1 );
}
// lowercase windows drive letters.
if ( toPath.startsWith( ":", 1 ) )
{
toPath = toPath.substring( 0, 1 ).toLowerCase() + toPath.substring( 1 );
}
if ( fromPath.startsWith( ":", 1 ) )
{
fromPath = fromPath.substring( 0, 1 ).toLowerCase() + fromPath.substring( 1 );
}
// check for the presence of windows drives. No relative way of
// traversing from one to the other.
if ( ( toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) )
&& ( !toPath.substring( 0, 1 ).equals( fromPath.substring( 0, 1 ) ) ) )
{
// they both have drive path element but they don't match, no
// relative path
return to;
}
if ( ( toPath.startsWith( ":", 1 ) && !fromPath.startsWith( ":", 1 ) )
|| ( !toPath.startsWith( ":", 1 ) && fromPath.startsWith( ":", 1 ) ) )
{
// one has a drive path element and the other doesn't, no relative
// path.
return to;
}
// use tokenizer to traverse paths and for lazy checking
StringTokenizer toTokeniser = new StringTokenizer( toPath, File.separator );
StringTokenizer fromTokeniser = new StringTokenizer( fromPath, File.separator );
int count = 0;
// walk along the to path looking for divergence from the from path
while ( toTokeniser.hasMoreTokens() && fromTokeniser.hasMoreTokens() )
{
if ( File.separatorChar == '\\' )
{
if ( !fromTokeniser.nextToken().equalsIgnoreCase( toTokeniser.nextToken() ) )
{
break;
}
}
else
{
if ( !fromTokeniser.nextToken().equals( toTokeniser.nextToken() ) )
{
break;
}
}
count++;
}
// reinitialize the tokenizers to count positions to retrieve the
// gobbled token
toTokeniser = new StringTokenizer( toPath, File.separator );
fromTokeniser = new StringTokenizer( fromPath, File.separator );
while ( count-- > 0 )
{
fromTokeniser.nextToken();
toTokeniser.nextToken();
}
String relativePath = "";
// add back refs for the rest of from location.
while ( fromTokeniser.hasMoreTokens() )
{
fromTokeniser.nextToken();
relativePath += "..";
if ( fromTokeniser.hasMoreTokens() )
{
relativePath += File.separatorChar;
}
}
if ( relativePath.length() != 0 && toTokeniser.hasMoreTokens() )
{
relativePath += File.separatorChar;
}
// add fwd fills for whatever's left of to.
while ( toTokeniser.hasMoreTokens() )
{
relativePath += toTokeniser.nextToken();
if ( toTokeniser.hasMoreTokens() )
{
relativePath += File.separatorChar;
}
}
if ( !relativePath.equals( to ) )
{
getLogger().debug( "Mapped url: " + to + " to relative path: " + relativePath );
}
return relativePath;
}
/** {@inheritDoc} */
public File getSiteDescriptorFromBasedir( String siteDirectory, File basedir, Locale locale )
{
if ( basedir == null )
{
throw new IllegalArgumentException( "The parameter 'basedir' can not be null" );
}
if ( siteDirectory == null )
{
// TODO need to be more dynamic
siteDirectory = "src/site";
}
if ( locale == null )
{
locale = new Locale( "" );
}
File siteDir = new File( basedir, siteDirectory );
File siteDescriptor = new File( siteDir, "site_" + locale.getLanguage() + ".xml" );
if ( !siteDescriptor.isFile() )
{
siteDescriptor = new File( siteDir, "site.xml" );
}
return siteDescriptor;
}
/** {@inheritDoc} */
public File getSiteDescriptorFromRepository( MavenProject project, ArtifactRepository localRepository,
List repositories, Locale locale )
throws SiteToolException
{
if ( project == null )
{
throw new IllegalArgumentException( "The parameter 'project' can not be null" );
}
if ( localRepository == null )
{
throw new IllegalArgumentException( "The parameter 'localRepository' can not be null" );
}
if ( repositories == null )
{
throw new IllegalArgumentException( "The parameter 'remoteArtifactRepositories' can not be null" );
}
if ( locale == null )
{
locale = new Locale( "" );
}
try
{
return resolveSiteDescriptor( project, localRepository, repositories, locale );
}
catch ( ArtifactNotFoundException e )
{
getLogger().debug( "ArtifactNotFoundException: Unable to locate site descriptor: " + e );
return null;
}
catch ( ArtifactResolutionException e )
{
throw new SiteToolException( "ArtifactResolutionException: Unable to locate site descriptor: "
+ e.getMessage() );
}
catch ( IOException e )
{
throw new SiteToolException( "IOException: Unable to locate site descriptor: " + e.getMessage() );
}
}
/** {@inheritDoc} */
public DecorationModel getDecorationModel( MavenProject project, List reactorProjects,
ArtifactRepository localRepository, List repositories,
String siteDirectory, Locale locale, String inputEncoding,
String outputEncoding )
throws SiteToolException
{
if ( project == null )
{
throw new IllegalArgumentException( "The parameter 'project' can not be null" );
}
if ( reactorProjects == null )
{
throw new IllegalArgumentException( "The parameter 'reactorProjects' can not be null" );
}
if ( localRepository == null )
{
throw new IllegalArgumentException( "The parameter 'localRepository' can not be null" );
}
if ( repositories == null )
{
throw new IllegalArgumentException( "The parameter 'repositories' can not be null" );
}
if ( inputEncoding == null )
{
throw new IllegalArgumentException( "The parameter 'inputEncoding' can not be null" );
}
if ( outputEncoding == null )
{
throw new IllegalArgumentException( "The parameter 'outputEncoding' can not be null" );
}
if ( locale == null )
{
locale = Locale.getDefault();
}
Map props = new HashMap();
// This is to support the deprecated ${reports} and ${modules} tags.
props.put( "reports", "
* - to = "http://maven.apache.org" and from = "http://maven.apache.org"
* - return ""
* - to = "http://maven.apache.org" and from = "http://maven.apache.org/plugins/maven-site-plugin/"
* - return "../.."
* - to = "http://maven.apache.org/plugins/maven-site-plugin/" and from = "http://maven.apache.org"
* - return "plugins/maven-site-plugin"
* - to = "/myproject/myproject-module1" and from = "/myproject/myproject"
* - return "../myproject-module1"
*
* Note: The file separator depends on the system.
*
* @param to the to
url of file as string
* @param from the from
url of file as string
* @return a relative path from from
to to
.
*/
String getRelativePath( String to, String from );
/**
* Get a site descriptor from the project's base direcory.
*
* @param siteDirectory The path to the directory containing the site.xml
file, relative to the
* project base directory. If null, using by default "src/site".
* @param basedir not null.
* @param locale the locale wanted for the site descriptor. If not null, searching for
* site_localeLanguage.xml
, otherwise searching for site.xml
.
* @return the site descriptor relative file, i.e. src/site/site.xml
, depending on parameter values.
*/
File getSiteDescriptorFromBasedir( String siteDirectory, File basedir, Locale locale );
/**
* Get a site descriptor from one of the repositories.
*
* @param project the Maven project, not null.
* @param localRepository the Maven local repository, not null.
* @param repositories the Maven remote repositories, not null.
* @param locale the locale wanted for the site descriptor. If not null, searching for
* site_localeLanguage.xml
, otherwise searching for site.xml
.
* @return the site descriptor into the local repository after download of it from repositories or null if not
* found in repositories.
* @throws SiteToolException if any
*/
File getSiteDescriptorFromRepository( MavenProject project, ArtifactRepository localRepository, List repositories,
Locale locale )
throws SiteToolException;
/**
* Get a decoration model for a project.
*
* @param project the Maven project, not null.
* @param reactorProjects the Maven reactor projects, not null.
* @param localRepository the Maven local repository, not null.
* @param repositories the Maven remote repositories, not null.
* @param siteDirectory The path to the directory containing the site.xml
file, relative to the
* project base directory. If null, using by default "src/site".
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param inputEncoding the input encoding of the site descriptor, not null.
* @param outputEncoding the output encoding wanted, not null.
* @return the DecorationModel
object corresponding to the site.xml
file with some
* interpolations.
* @throws SiteToolException if any
*/
DecorationModel getDecorationModel( MavenProject project, List reactorProjects, ArtifactRepository localRepository,
List repositories, String siteDirectory, Locale locale, String inputEncoding,
String outputEncoding )
throws SiteToolException;
/**
* Populate the reports menu part of the decoration model.
*
* @param decorationModel the Doxia DecorationModel, not null.
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param categories a map to put on the decoration model, not null.
*/
void populateReportsMenu( DecorationModel decorationModel, Locale locale, Map categories );
/**
* Interpolating several expressions in the site descriptor content. Actually, the expressions can be in
* the project, the environment variables and the specific properties like encoding
.
*
* For instance:
*
* - ${project.name}
* - The value from the POM of:
*
* <project>
* <name>myProjectName</name>
* </project>
*
* - ${my.value}
* - The value from the POM of:
*
* <properties>
* <my.value>hello</my.value>
* </properties>
*
* - ${JAVA_HOME}
* - The value of JAVA_HOME in the environment variables
*
*
* @param props a map used for interpolation, not null.
* @param aProject a Maven project, not null.
* @param inputEncoding the input encoding of the site descriptor, not null.
* @param outputEncoding the output encoding wanted, not null.
* @param siteDescriptorContent the site descriptor file, not null.
* @return the site descriptor content based on the site.xml
file with interpolated strings.
* @throws SiteToolException if errors happened during the interpolation.
*/
String getInterpolatedSiteDescriptorContent( Map props, MavenProject aProject, String siteDescriptorContent,
String inputEncoding, String outputEncoding )
throws SiteToolException;
/**
* Returns the parent POM with interpolated URLs. Attempts to source this value from the
* reactorProjects
parameters if available (reactor env model attributes
* are interpolated), or if the reactor is unavailable (-N) resorts to the
* project.getParent().getUrl()
value which will NOT have been interpolated.
*
* TODO: once bug is fixed in Maven proper, remove this.
*
* @param aProject a Maven project, not null.
* @param reactorProjects the Maven reactor projects, not null.
* @param localRepository the Maven local repository, not null.
* @return the parent project with interpolated URLs.
*/
MavenProject getParentProject( MavenProject aProject, List reactorProjects, ArtifactRepository localRepository );
/**
* Populate the parent menu part of the decoration model.
*
* @param decorationModel the Doxia DecorationModel, not null.
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param project a Maven project, not null.
* @param parentProject a Maven parent project, not null.
* @param keepInheritedRefs used for inherited references.
*/
void populateParentMenu( DecorationModel decorationModel, Locale locale, MavenProject project,
MavenProject parentProject, boolean keepInheritedRefs );
/**
* Populate the parent menu part of the decoration model.
*
* @param decorationModel the Doxia DecorationModel, not null.
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param project a Maven project, not null.
* @param parentProject a Maven parent project, not null.
* @param keepInheritedRefs used for inherited references.
* @deprecated Please use
* {@link #populateParentMenu(DecorationModel, Locale, MavenProject, MavenProject, boolean)} instead
*/
void populateProjectParentMenu( DecorationModel decorationModel, Locale locale, MavenProject project,
MavenProject parentProject, boolean keepInheritedRefs );
/**
* Populate the modules menu part of the decoration model.
*
* @param project a Maven project, not null.
* @param reactorProjects the Maven reactor projects, not null.
* @param localRepository the Maven local repository, not null.
* @param decorationModel the Doxia site descriptor model, not null.
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param keepInheritedRefs used for inherited references.
* @throws SiteToolException if any
* @deprecated Please use
* {@link #populateModulesMenu(MavenProject, List, ArtifactRepository, DecorationModel, Locale, boolean)}
* instead
*/
void populateModules( MavenProject project, List reactorProjects, ArtifactRepository localRepository,
DecorationModel decorationModel, Locale locale, boolean keepInheritedRefs )
throws SiteToolException;
/**
* Populate the modules menu part of the decoration model.
*
* @param project a Maven project, not null.
* @param reactorProjects the Maven reactor projects, not null.
* @param localRepository the Maven local repository, not null.
* @param decorationModel the Doxia site descriptor model, not null.
* @param locale the locale used for the i18n in DecorationModel. If null, using the default locale in the jvm.
* @param keepInheritedRefs used for inherited references.
* @throws SiteToolException if any
*/
void populateModulesMenu( MavenProject project, List reactorProjects, ArtifactRepository localRepository,
DecorationModel decorationModel, Locale locale, boolean keepInheritedRefs )
throws SiteToolException;
/**
* Init the localesList
variable.
* If the locales
variable is available, the first valid token will be the
* defaultLocale
for this instance of the Java Virtual Machine.
*
* @param locales A comma separated list of locales supported by Maven. The first valid token will be the
* default Locale for this instance of the Java Virtual Machine.
* @return a list of Locale
*/
List getAvailableLocales( String locales );
/**
* Converts a locale code like "en", "en_US" or "en_US_win" to a java.util.Locale
* object.
* If localeCode = default
, return the current value of the default locale for this instance
* of the Java Virtual Machine.
*
* @param localeCode the locale code string.
* @return a java.util.Locale object instancied or null if errors occurred
* @see java.util.Locale#getDefault()
*/
Locale codeToLocale( String localeCode );
}
maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/tools/SiteToolException.java 0000644 0001750 0001750 00000004204 11020006575 031315 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
/**
* An exception occurring during the execution of this tool.
*
* @author Vincent Siveton
* @version $Id: SiteToolException.java 661727 2008-05-30 14:21:49Z bentmann $
*/
public class SiteToolException
extends Exception
{
/** serialVersionUID */
static final long serialVersionUID = 2331441332996055959L;
/**
* Construct a new SiteToolException
exception wrapping an underlying Exception
* and providing a message
.
*
* @param message could be null
* @param cause could be null
*/
public SiteToolException( String message, Exception cause )
{
super( message, cause );
}
/**
* Construct a new SiteToolException
exception wrapping an underlying Throwable
* and providing a message
.
*
* @param message could be null
* @param cause could be null
*/
public SiteToolException( String message, Throwable cause )
{
super( message, cause );
}
/**
* Construct a new SiteToolException
exception providing a message
.
*
* @param message could be null
*/
public SiteToolException( String message )
{
super( message );
}
}
maven-doxia-tools-1.2.1/src/main/java/org/apache/maven/doxia/tools/ReportComparator.java 0000644 0001750 0001750 00000003654 11004716073 031212 0 ustar twerner twerner package org.apache.maven.doxia.tools;
/*
* 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.
*/
import org.apache.maven.reporting.MavenReport;
import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;
/**
* Sorts reports.
*
* @author Brett Porter
* @version $Id: ReportComparator.java 651860 2008-04-26 21:18:51Z dennisl $
* @todo move to reporting API?
* @todo allow reports to define their order in some other way?
*/
public class ReportComparator
implements Comparator
{
/** the local */
private final Locale locale;
/**
* Default constructor.
*
* @param locale not null
*/
public ReportComparator( Locale locale )
{
if ( locale == null )
{
throw new IllegalArgumentException( "locale should be defined" );
}
this.locale = locale;
}
/** {@inheritDoc} */
public int compare( Object o1, Object o2 )
{
MavenReport r1 = (MavenReport) o1;
MavenReport r2 = (MavenReport) o2;
Collator collator = Collator.getInstance( locale );
return collator.compare( r1.getName( locale ), r2.getName( locale ) );
}
}