Skip to content

Commit

Permalink
Fix missing javadoc; update maven so that it generates javadocs and d…
Browse files Browse the repository at this point in the history
…eploys a site to github

Resolves: https://jira.duraspace.org/browse/FCREPO-1351
  • Loading branch information
acoburn authored and Andrew Woods committed Feb 19, 2015
1 parent 5634f48 commit b0e85d5
Show file tree
Hide file tree
Showing 10 changed files with 270 additions and 43 deletions.
115 changes: 102 additions & 13 deletions pom.xml
Expand Up @@ -63,6 +63,9 @@
<clerezza.rdf.jena.commons.version>0.7</clerezza.rdf.jena.commons.version>
<!-- plugins -->
<checkstyle.plugin.version>2.12.1</checkstyle.plugin.version>
<doxia.plugin.version>1.3</doxia.plugin.version>
<github.site.plugin.version>0.9</github.site.plugin.version>
<maven.site.plugin.version>3.4</maven.site.plugin.version>
<!-- values -->
<project.copyrightYear>2015</project.copyrightYear>
<jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
Expand Down Expand Up @@ -100,6 +103,14 @@
</repository>
</repositories>

<distributionManagement>
<site>
<id>gh-pages</id>
<name>Deployment through GitHub's site deployment plugin</name>
<url>site/${project.version}</url>
</site>
</distributionManagement>

<pluginRepositories>
<pluginRepository>
<id>sonatype-nexus-snapshots</id>
Expand Down Expand Up @@ -709,6 +720,77 @@
<plugin>
<artifactId>maven-release-plugin</artifactId>
</plugin>

<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
</configuration>
</plugin>

<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>${github.site.plugin.version}</version>
<!--<version>${github.site.plugin.version}</version>-->
<configuration>
<message>Creating site for ${project.artifactId}, ${project.version}</message>
<!-- this does the trick to place every module in the correct
subfolder -->
<path>${project.distributionManagement.site.url}</path>
<merge>true</merge>
<excludes>
<exclude>xref-test/**</exclude>
<exclude>testapidocs/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>github</id>
<goals>
<goal>site</goal>
</goals>
<phase>site-deploy</phase>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.site.plugin.version}</version>
<configuration>
<skipDeploy>true</skipDeploy>
</configuration>
<dependencies>
<dependency>
<!--allows markdown syntax for site generation. To use it
place files below src/site/markdown/[filename].md -->
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>${doxia.plugin.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<linksource>true</linksource>
</configuration>
<executions>
<execution>
<goals>
<goal>javadoc</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -723,19 +805,6 @@
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
Expand Down Expand Up @@ -777,4 +846,24 @@
</build>
</profile>
</profiles>

<mailingLists>
<mailingList>
<name>ff-tech</name>
<subscribe>ff-tech+subscribe@googlegroups.com</subscribe>
<unsubscribe>ff-tech+unsubscribe@googlegroups.com</unsubscribe>
<post>ff-tech@googlegroups.com</post>
<archive>https://groups.google.com/d/forum/ff-tech</archive>
</mailingList>
</mailingLists>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/fcrepo4/fcrepo-camel/issues</url>
</issueManagement>

<ciManagement>
<system>Jenkins</system>
<url>http://jenkins.fcrepo.org/job/fcrepo-camel/</url>
</ciManagement>
</project>
13 changes: 13 additions & 0 deletions src/main/java/org/fcrepo/camel/FcrepoClient.java
Expand Up @@ -100,6 +100,8 @@ public FcrepoClient(final String username, final String password, final String h
/**
* Make a HEAD response
* @param url the URL of the resource to check
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse head(final URI url)
throws FcrepoOperationFailedException {
Expand Down Expand Up @@ -129,6 +131,8 @@ public FcrepoResponse head(final URI url)
* @param url the URL of the resource to PUT
* @param body the contents of the resource to send
* @param contentType the MIMEType of the resource
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse put(final URI url, final InputStream body, final String contentType)
throws FcrepoOperationFailedException {
Expand Down Expand Up @@ -156,6 +160,8 @@ public FcrepoResponse put(final URI url, final InputStream body, final String co
* Please note: the body should have an application/sparql-update content-type
* @param url the URL of the resource to PATCH
* @param body the body to be sent to the repository
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse patch(final URI url, final InputStream body)
throws FcrepoOperationFailedException {
Expand All @@ -179,6 +185,8 @@ public FcrepoResponse patch(final URI url, final InputStream body)
* @param url the URL of the resource to which to POST
* @param body the content to be sent to the server
* @param contentType the Content-Type of the body
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse post(final URI url, final InputStream body, final String contentType)
throws FcrepoOperationFailedException {
Expand All @@ -204,6 +212,8 @@ public FcrepoResponse post(final URI url, final InputStream body, final String c
/**
* Make a DELETE request
* @param url the URL of the resource to delete
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse delete(final URI url)
throws FcrepoOperationFailedException {
Expand All @@ -221,6 +231,9 @@ public FcrepoResponse delete(final URI url)
* Make a GET request
* @param url the URL of the resource to fetch
* @param accept the requested MIMEType of the resource to be retrieved
* @param prefer the value for a prefer header sent in the request
* @return the repository response
* @throws FcrepoOperationFailedException when the underlying HTTP request results in an error
*/
public FcrepoResponse get(final URI url, final String accept, final String prefer)
throws FcrepoOperationFailedException {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/org/fcrepo/camel/FcrepoComponent.java
Expand Up @@ -44,15 +44,15 @@ public FcrepoComponent() {

/**
* Given a CamelContext, create a FcrepoComponent instance.
* @param context the CamelContext
* @param context the camel context for the component.
*/
public FcrepoComponent(final CamelContext context) {
super(context, FcrepoEndpoint.class);
}

/**
* Given a FcrepoConfiguration, create a FcrepoComponent instance.
* @param config the FcrepoConfiguration
* @param config the component-wide configuration.
*/
public FcrepoComponent(final FcrepoConfiguration config) {
super(FcrepoEndpoint.class);
Expand All @@ -61,6 +61,7 @@ public FcrepoComponent(final FcrepoConfiguration config) {

/**
* Get the component's configuration.
* @return the configuration for the component.
*/
public FcrepoConfiguration getConfiguration() {
if (configuration == null) {
Expand All @@ -71,6 +72,7 @@ public FcrepoConfiguration getConfiguration() {

/**
* Set the component's configuration.
* @param config the configuration settings for the component.
*/
public void setConfiguration(final FcrepoConfiguration config) {
this.configuration = config;
Expand Down Expand Up @@ -105,6 +107,7 @@ public void setAuthHost(final String host) {
* @param uri the fcrepo uri identifying the repository hostname and port
* @param remaining the string identifying the repository path
* @param parameters any optional attributes added to the endpoint
* @return the camel endpoint
*/
@Override
protected Endpoint createEndpoint(final String uri, final String remaining, final Map<String, Object> parameters) {
Expand Down

0 comments on commit b0e85d5

Please sign in to comment.