svn commit: r1801772 [9/11] - in /maven/plugins/trunk/maven-javadoc-plugin: ./ src/main/java/org/apache/maven/plugin/ src/main/java/org/apache/maven/plugins/ src/main/java/org/apache/maven/plugins/javadoc/ src/main/java/org/apache/maven/plugins/javadoc...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit: r1801772 [9/11] - in /maven/plugins/trunk/maven-javadoc-plugin: ./ src/main/java/org/apache/maven/plugin/ src/main/java/org/apache/maven/plugins/ src/main/java/org/apache/maven/plugins/javadoc/ src/main/java/org/apache/maven/plugins/javadoc...

rfscholte
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/ProxyServer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/ProxyServer.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/ProxyServer.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/ProxyServer.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,242 @@
+package org.apache.maven.plugins.javadoc;
+
+/*
+ * 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.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.bio.SocketConnector;
+import org.mortbay.jetty.security.B64Code;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+import org.mortbay.proxy.AsyncProxyServlet;
+
+/**
+ * A Proxy server.
+ *
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: ProxyServer.java 1517906 2013-08-27 18:25:03Z krosenvold $
+ * @since 2.6
+ */
+class ProxyServer
+{
+    private Server proxyServer;
+
+    /**
+     * @param proxyServlet the wanted auth proxy servlet
+     */
+    public ProxyServer( AuthAsyncProxyServlet proxyServlet )
+    {
+        this( null, 0, proxyServlet );
+    }
+
+    /**
+     * @param hostName the server name
+     * @param port the server port
+     * @param debug true to display System.err, false otherwise.
+     * @param proxyServlet the wanted auth proxy servlet
+     */
+    public ProxyServer( String hostName, int port, AuthAsyncProxyServlet proxyServlet )
+    {
+        proxyServer = new Server();
+
+        proxyServer.addConnector( getDefaultConnector( hostName, port ) );
+
+        Context context = new Context( proxyServer, "/", 0 );
+
+        context.addServlet( new ServletHolder( proxyServlet ), "/" );
+    }
+
+    /**
+     * @return the host name
+     */
+    public String getHostName()
+    {
+        Connector connector = proxyServer.getConnectors()[0];
+        return connector.getHost();
+    }
+
+    /**
+     * @return the host port
+     */
+    public int getPort()
+    {
+        Connector connector = proxyServer.getConnectors()[0];
+        return ( connector.getLocalPort() <= 0 ? connector.getPort() : connector.getLocalPort() );
+    }
+
+    /**
+     * @throws Exception if any
+     */
+    public void start()
+        throws Exception
+    {
+        if ( proxyServer != null )
+        {
+            proxyServer.start();
+        }
+    }
+
+    /**
+     * @throws Exception if any
+     */
+    public void stop()
+        throws Exception
+    {
+        if ( proxyServer != null )
+        {
+            proxyServer.stop();
+        }
+        proxyServer = null;
+    }
+
+    private Connector getDefaultConnector( String hostName, int port )
+    {
+        Connector connector = new SocketConnector();
+        if ( hostName != null )
+        {
+            connector.setHost( hostName );
+        }
+        else
+        {
+            try
+            {
+                connector.setHost( InetAddress.getLocalHost().getCanonicalHostName() );
+            }
+            catch ( UnknownHostException e )
+            {
+                // nop
+            }
+        }
+        if ( port > 0 )
+        {
+            connector.setPort( port );
+        }
+
+        return connector;
+    }
+
+    /**
+     * A proxy servlet with authentication support.
+     */
+    static class AuthAsyncProxyServlet
+        extends AsyncProxyServlet
+    {
+        private Map<String, String> authentications;
+
+        private long sleepTime = 0;
+
+        /**
+         * Constructor for non authentication servlet.
+         */
+        public AuthAsyncProxyServlet()
+        {
+            super();
+        }
+
+        /**
+         * Constructor for authentication servlet.
+         *
+         * @param authentications a map of user/password
+         */
+        public AuthAsyncProxyServlet( Map<String, String> authentications )
+        {
+            this();
+
+            this.authentications = authentications;
+        }
+
+        /**
+         * Constructor for authentication servlet.
+         *
+         * @param authentications a map of user/password
+         * @param sleepTime a positive time to sleep the service thread (for timeout)
+         */
+        public AuthAsyncProxyServlet( Map<String, String> authentications, long sleepTime )
+        {
+            this();
+
+            this.authentications = authentications;
+            this.sleepTime = sleepTime;
+        }
+
+        /** {@inheritDoc} */
+        public void service( ServletRequest req, ServletResponse res )
+            throws ServletException, IOException
+        {
+            final HttpServletRequest request = (HttpServletRequest) req;
+            final HttpServletResponse response = (HttpServletResponse) res;
+
+            if ( this.authentications != null && !this.authentications.isEmpty() )
+            {
+                String proxyAuthorization = request.getHeader( "Proxy-Authorization" );
+                if ( proxyAuthorization != null && proxyAuthorization.startsWith( "Basic " ) )
+                {
+                    String proxyAuth = proxyAuthorization.substring( 6 );
+                    String authorization = B64Code.decode( proxyAuth );
+                    String[] authTokens = authorization.split( ":" );
+                    String user = authTokens[0];
+                    String password = authTokens[1];
+
+                    if ( this.authentications.get( user ) == null )
+                    {
+                        throw new IllegalArgumentException( user + " not found in the map!" );
+                    }
+
+                    if ( sleepTime > 0 )
+                    {
+                        try
+                        {
+                            Thread.sleep( sleepTime );
+                        }
+                        catch ( InterruptedException e )
+                        {
+                            // nop
+                        }
+                    }
+                    String authPass = this.authentications.get(user);
+                    if ( password.equals( authPass ) )
+                    {
+                        // could throw exceptions...
+                        super.service( req, res );
+                        return;
+                    }
+                }
+
+                // Proxy-Authenticate Basic realm="CCProxy Authorization"
+                response.addHeader( "Proxy-Authenticate", "Basic realm=\"Jetty Proxy Authorization\"" );
+                response.setStatus( HttpServletResponse.SC_PROXY_AUTHENTICATION_REQUIRED );
+                return;
+            }
+
+            super.service( req, res );
+        }
+    }
+}
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,60 @@
+package org.apache.maven.plugins.javadoc;
+
+/*
+ * 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 org.apache.maven.model.Plugin;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.plugins.javadoc.TestJavadocReport;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ */
+public class TestJavadocReportTest
+    extends AbstractMojoTestCase
+{
+    /**
+     * Test the test-javadoc configuration for the plugin
+     *
+     * @throws Exception if any
+     */
+    public void testTestJavadoc()
+        throws Exception
+    {
+        File testPom =
+            new File( getBasedir(),
+                      "src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml" );
+        TestJavadocReport mojo = (TestJavadocReport) lookupMojo( "test-javadoc", testPom );
+        
+        PluginDescriptor pluginDescriptor = new PluginDescriptor();
+        pluginDescriptor.setPlugin( new Plugin() );
+        
+        setVariableValueToObject( mojo, "plugin", pluginDescriptor );
+        
+        mojo.execute();
+
+        File generatedFile =
+            new File( getBasedir(), "target/test/unit/test-javadoc-test/target/site/apidocs/maven/AppTest.html" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject1TestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,72 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: AggregateProject1TestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateProject1TestMavenProjectStub
+    extends MavenProjectStub
+{
+    public AggregateProject1TestMavenProjectStub()
+    {
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "aggregate-test-project1" );
+        setVersion( "1.0-SNAPSHOT" );
+        setPackaging( "jar" );
+        setExecutionRoot( true );
+
+        Artifact artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( "aggregate-test-project1" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-test/target" );
+        setBuild( build );
+
+        String basedir = getBasedir().getAbsolutePath();
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( basedir + "/aggregate/test/project1" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-test/project1" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateProject2TestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,72 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: AggregateProject2TestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateProject2TestMavenProjectStub
+    extends MavenProjectStub
+{
+    public AggregateProject2TestMavenProjectStub()
+    {
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "aggregate-test-project2" );
+        setVersion( "1.0-SNAPSHOT" );
+        setPackaging( "jar" );
+        setExecutionRoot( true );
+
+        Artifact artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( "aggregate-test-project2" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-test/target" );
+        setBuild( build );
+
+        String basedir = getBasedir().getAbsolutePath();
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( basedir + "/aggregate/test/project2" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-test/project2" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject1TestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject1TestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject1TestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject1TestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,77 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: AggregateResourcesProject1TestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateResourcesProject1TestMavenProjectStub
+    extends MavenProjectStub
+{
+    public AggregateResourcesProject1TestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        setExecutionRoot( true );
+
+        Artifact artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-resources-test/project1/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir().getAbsolutePath() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-resources-test/project1" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject2TestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject2TestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject2TestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesProject2TestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,77 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: AggregateResourcesProject2TestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateResourcesProject2TestMavenProjectStub
+    extends MavenProjectStub
+{
+    public AggregateResourcesProject2TestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        setExecutionRoot( true );
+
+        Artifact artifact = new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-resources-test/project2/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-resources-test/project2" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateResourcesTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,71 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: AggregateResourcesTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateResourcesTestMavenProjectStub
+    extends MavenProjectStub
+{
+    public AggregateResourcesTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "aggregate-resources-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        setExecutionRoot( true );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-resources-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-resources-test" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/AggregateTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,83 @@
+package org.apache.maven.plugins.javadoc.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.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: AggregateTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class AggregateTestMavenProjectStub
+    extends MavenProjectStub
+{
+    private Build build;
+
+    public AggregateTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "aggregate-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+        setExecutionRoot( true );
+
+        build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/aggregate-test/target" );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Build getBuild()
+    {
+        return build;
+    }
+
+    /** {@inheritDoc} */
+    public void setBuild( Build build )
+    {
+        this.build = build;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/aggregate-test" );
+    }
+
+    /** {@inheritDoc} */
+    public MavenProject getExecutionProject()
+    {
+        return this;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/CustomConfigurationMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/CustomConfigurationMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/CustomConfigurationMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/CustomConfigurationMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,103 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: CustomConfigurationMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class CustomConfigurationMavenProjectStub
+    extends MavenProjectStub
+{
+
+    private Scm scm;
+
+    private Build build;
+
+    public CustomConfigurationMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "custom-configuration-plugin-config.xml" ) );
+
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "custom-configuration" );
+        setVersion( "1.0-SNAPSHOT" );
+        setName( "Maven Javadoc Plugin Custom configuration Test" );
+        setUrl( "http://maven.apache.org" );
+        setPackaging( "jar" );
+        //setExecutionRoot( true );
+        //setDescription( "Sample Maven Project" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( "default-configuration" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/custom-configuration/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        String temp =  getBasedir().getAbsolutePath();
+        if( !temp.startsWith( "/" ) )
+        {
+            temp = temp.replace( '/', '\\' );
+        }
+        compileSourceRoots.add( temp );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public Build getBuild()
+    {
+        return build;
+    }
+
+    /** {@inheritDoc} */
+    public void setBuild( Build build )
+    {
+        this.build = build;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/custom-configuration/" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultArtifactHandlerStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultArtifactHandlerStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultArtifactHandlerStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultArtifactHandlerStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,51 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.artifact.handler.DefaultArtifactHandler;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: DefaultArtifactHandlerStub.java 791101 2009-07-04 10:58:24Z vsiveton $
+ */
+public class DefaultArtifactHandlerStub
+    extends DefaultArtifactHandler
+{
+    private String language;
+
+    /** {@inheritDoc} */
+    public String getLanguage()
+    {
+        if ( language == null )
+        {
+            language = "java";
+        }
+
+        return language;
+    }
+
+    /**
+     * @param language
+     */
+    public void setLanguage( String language )
+    {
+        this.language = language;
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultConfigurationMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultConfigurationMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultConfigurationMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DefaultConfigurationMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,81 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: DefaultConfigurationMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class DefaultConfigurationMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public DefaultConfigurationMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "default-configuration-plugin-config.xml" ) );
+
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "default-configuration" );
+        setVersion( "1.0-SNAPSHOT" );
+        setName( "Maven Javadoc Plugin Default configuration Test" );
+        setUrl( "http://maven.apache.org" );
+        setPackaging( "jar" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( "default-configuration" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/default-configuration/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/def/configuration" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/default-configuration/" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,82 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: DocfilesTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class DocfilesTestMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public DocfilesTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "docfiles-test-plugin-config.xml" ) );
+
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "docfiles-test" );
+        setVersion( "1.0-SNAPSHOT" );
+        setName( "Maven Javadoc Plugin Docfiles Test" );
+        setUrl( "http://maven.apache.org" );
+        setPackaging( "jar" );
+        //setDescription( "Sample Maven Project" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( "docfiles-test" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/docfiles-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/docfiles/test" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/docfiles-test/" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesWithJavaTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesWithJavaTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesWithJavaTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocfilesWithJavaTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,60 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: DocfilesWithJavaTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class DocfilesWithJavaTestMavenProjectStub
+    extends MavenProjectStub
+{
+    public DocfilesWithJavaTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "docfiles-with-java-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setPackaging( "jar" );
+
+        Build build = new Build();
+        build.setFinalName( "docfiles-with-java-test" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/docfiles-with-java-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/docfiles-with-java-test/src/main" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir(), "/src/test/resources/unit/docfiles-with-java-test" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletPathTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletPathTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletPathTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletPathTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,81 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: DocletPathTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class DocletPathTestMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public DocletPathTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "doclet-path-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/doclet-path-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/doclet/test" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/doclet-path-test" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/DocletTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,82 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: DocletTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class DocletTestMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public DocletTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "doclet-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+        //setDescription( "Sample Maven Project" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/doclet-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/doclet/test" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/doclet-test" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,100 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: FixJdk5MavenProjectStub.java 797039 2009-07-23 12:30:42Z vsiveton $
+ */
+public class FixJdk5MavenProjectStub
+    extends MavenProjectStub
+{
+    public FixJdk5MavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/target/classes" );
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/src/main/java" );
+
+        Build build = new Build();
+        build.setDirectory( getBasedir().getAbsolutePath() + "/target" );
+        build.setSourceDirectory( getBasedir().getAbsolutePath() + "/src/main/java" );
+        build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" );
+        build.setTestSourceDirectory( getBasedir().getAbsolutePath() + "/src/test/java" );
+        build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" );
+        setBuild( build );
+    }
+
+    /** {@inheritDoc} */
+    public String getArtifactId()
+    {
+        return getModel().getArtifactId();
+    }
+
+    /** {@inheritDoc} */
+    public String getGroupId()
+    {
+        String groupId = getModel().getGroupId();
+
+        if ( ( groupId == null ) && ( getModel().getParent() != null ) )
+        {
+            groupId = getModel().getParent().getGroupId();
+        }
+
+        return groupId;
+    }
+
+    /** {@inheritDoc} */
+    public String getVersion()
+    {
+        String version = getModel().getVersion();
+
+        if ( ( version == null ) && ( getModel().getParent() != null ) )
+        {
+            version = getModel().getParent().getVersion();
+        }
+
+        return version;
+    }
+
+    /** {@inheritDoc} */
+    public String getPackaging()
+    {
+        return getModel().getPackaging();
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        // Using unit test dir
+        return new File( super.getBasedir() + "/target/test/unit/fix-jdk5-test/" );
+    }
+
+    /** {@inheritDoc} */
+    public File getFile()
+    {
+        return new File( getBasedir(), "pom.xml" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,100 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: FixJdk6MavenProjectStub.java 797039 2009-07-23 12:30:42Z vsiveton $
+ */
+public class FixJdk6MavenProjectStub
+    extends MavenProjectStub
+{
+    public FixJdk6MavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/target/classes" );
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/src/main/java" );
+
+        Build build = new Build();
+        build.setDirectory( getBasedir().getAbsolutePath() + "/target" );
+        build.setSourceDirectory( getBasedir().getAbsolutePath() + "/src/main/java" );
+        build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" );
+        build.setTestSourceDirectory( getBasedir().getAbsolutePath() + "/src/test/java" );
+        build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" );
+        setBuild( build );
+    }
+
+    /** {@inheritDoc} */
+    public String getArtifactId()
+    {
+        return getModel().getArtifactId();
+    }
+
+    /** {@inheritDoc} */
+    public String getGroupId()
+    {
+        String groupId = getModel().getGroupId();
+
+        if ( ( groupId == null ) && ( getModel().getParent() != null ) )
+        {
+            groupId = getModel().getParent().getGroupId();
+        }
+
+        return groupId;
+    }
+
+    /** {@inheritDoc} */
+    public String getVersion()
+    {
+        String version = getModel().getVersion();
+
+        if ( ( version == null ) && ( getModel().getParent() != null ) )
+        {
+            version = getModel().getParent().getVersion();
+        }
+
+        return version;
+    }
+
+    /** {@inheritDoc} */
+    public String getPackaging()
+    {
+        return getModel().getPackaging();
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        // Using unit test dir
+        return new File( super.getBasedir() + "/target/test/unit/fix-jdk6-test/" );
+    }
+
+    /** {@inheritDoc} */
+    public File getFile()
+    {
+        return new File( getBasedir(), "pom.xml" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,100 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: FixMavenProjectStub.java 797039 2009-07-23 12:30:42Z vsiveton $
+ */
+public class FixMavenProjectStub
+    extends MavenProjectStub
+{
+    public FixMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/target/classes" );
+        addCompileSourceRoot( getBasedir().getAbsolutePath() + "/src/main/java" );
+
+        Build build = new Build();
+        build.setDirectory( getBasedir().getAbsolutePath() + "/target" );
+        build.setSourceDirectory( getBasedir().getAbsolutePath() + "/src/main/java" );
+        build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" );
+        build.setTestSourceDirectory( getBasedir().getAbsolutePath() + "/src/test/java" );
+        build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" );
+        setBuild( build );
+    }
+
+    /** {@inheritDoc} */
+    public String getArtifactId()
+    {
+        return getModel().getArtifactId();
+    }
+
+    /** {@inheritDoc} */
+    public String getGroupId()
+    {
+        String groupId = getModel().getGroupId();
+
+        if ( ( groupId == null ) && ( getModel().getParent() != null ) )
+        {
+            groupId = getModel().getParent().getGroupId();
+        }
+
+        return groupId;
+    }
+
+    /** {@inheritDoc} */
+    public String getVersion()
+    {
+        String version = getModel().getVersion();
+
+        if ( ( version == null ) && ( getModel().getParent() != null ) )
+        {
+            version = getModel().getParent().getVersion();
+        }
+
+        return version;
+    }
+
+    /** {@inheritDoc} */
+    public String getPackaging()
+    {
+        return getModel().getPackaging();
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        // Using unit test dir
+        return new File( super.getBasedir() + "/target/test/unit/fix-test/" );
+    }
+
+    /** {@inheritDoc} */
+    public File getFile()
+    {
+        return new File( getBasedir(), "pom.xml" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HeaderFooterTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HeaderFooterTestMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HeaderFooterTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HeaderFooterTestMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,62 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: HeaderFooterTestMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class HeaderFooterTestMavenProjectStub extends MavenProjectStub
+{
+    public HeaderFooterTestMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "header-footer-test-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/header-footer-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/header-footer-test" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HelpFileMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HelpFileMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HelpFileMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/HelpFileMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,82 @@
+package org.apache.maven.plugins.javadoc.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 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.Resource;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Vincent Siveton</a>
+ * @version $Id: HelpFileMavenProjectStub.java 1385163 2012-09-15 20:29:11Z hboutemy $
+ */
+public class HelpFileMavenProjectStub extends MavenProjectStub
+{
+    public HelpFileMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/helpfile-test/target" );
+        Resource resource = new Resource();
+        resource.setDirectory( getBasedir() + "/src/main/resources" );
+        build.addResource( resource );
+
+        build.setPlugins( getModel().getBuild().getPlugins() );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/helpfile-test" );
+    }
+
+    /** {@inheritDoc} */
+    public List<ArtifactRepository> getRemoteArtifactRepositories()
+    {
+        ArtifactRepository repository =
+            new DefaultArtifactRepository( "central", "http://repo.maven.apache.org/maven2",
+                                           new DefaultRepositoryLayout() );
+
+        return Collections.singletonList( repository );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarArchiveConfigProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarArchiveConfigProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarArchiveConfigProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarArchiveConfigProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,96 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Project stub for testing archive configuration.
+ */
+public class JavadocJarArchiveConfigProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public JavadocJarArchiveConfigProjectStub()
+    {
+        File projectFile = new File( getBasedir(), "javadocjar-archive-config.xml" );
+        readModel( new File( getBasedir(), "javadocjar-archive-config.xml" ) );
+
+        setFile( projectFile );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        JavadocPluginArtifactStub artifact =
+                new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        artifact.setType( "jar" );
+        artifact.setBaseVersion( "1.0-SNAPSHOT" );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( "javadocjar-archive-config" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/javadocjar-archive-config/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/javadocjar/def" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setScm(Scm scm)
+    {
+        this.scm = scm;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/javadocjar-archive-config" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarDefaultMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarDefaultMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarDefaultMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarDefaultMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,88 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id: JavadocJarDefaultMavenProjectStub.java 985765 2010-08-15 21:37:47Z hboutemy $
+ */
+public class JavadocJarDefaultMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public JavadocJarDefaultMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "javadocjar-default-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        JavadocPluginArtifactStub artifact =
+            new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        artifact.setType( "jar" );
+        artifact.setBaseVersion( "1.0-SNAPSHOT" );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( "javadocjar-default" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/javadocjar-default/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/javadocjar/def" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/javadocjar-default" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarFailOnErrorMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarFailOnErrorMavenProjectStub.java?rev=1801772&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarFailOnErrorMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/stubs/JavadocJarFailOnErrorMavenProjectStub.java Wed Jul 12 19:59:51 2017
@@ -0,0 +1,88 @@
+package org.apache.maven.plugins.javadoc.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 org.apache.maven.model.Build;
+import org.apache.maven.model.Scm;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:[hidden email]">Maria Odea Ching</a>
+ * @version $Id$
+ */
+public class JavadocJarFailOnErrorMavenProjectStub
+    extends MavenProjectStub
+{
+    private Scm scm;
+
+    public JavadocJarFailOnErrorMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "javadocjar-failonerror-plugin-config.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        JavadocPluginArtifactStub artifact =
+            new JavadocPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+        artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+        artifact.setType( "jar" );
+        artifact.setBaseVersion( "1.0-SNAPSHOT" );
+        setArtifact( artifact );
+
+        Build build = new Build();
+        build.setFinalName( "javadocjar-failonerror" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/javadocjar-failonerror/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<String>();
+        compileSourceRoots.add( getBasedir() + "/javadocjar/def" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/javadocjar-failonerror" );
+    }
+}


Loading...