-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa0a666
commit 8edeca7
Showing
8 changed files
with
316 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...rg/apache/maven/plugins/javadoc/stubs/SubpackagesExcludePackagesTestMavenProjectStub.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* 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. | ||
*/ | ||
package org.apache.maven.plugins.javadoc.stubs; | ||
|
||
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; | ||
|
||
/** */ | ||
public class SubpackagesExcludePackagesTestMavenProjectStub extends MavenProjectStub { | ||
public SubpackagesExcludePackagesTestMavenProjectStub() { | ||
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(getName()); | ||
build.setDirectory(super.getBasedir() + "/target/test/unit/subpackages-exclude-packages-test/target"); | ||
setBuild(build); | ||
|
||
List<String> compileSourceRoots = new ArrayList<>(); | ||
compileSourceRoots.add(getBasedir() + "/src/main/java"); | ||
setCompileSourceRoots(compileSourceRoots); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public File getBasedir() { | ||
return new File(super.getBasedir() + "/src/test/resources/unit/subpackages-exclude-packages-test"); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
src/test/resources/unit/subpackages-exclude-packages-test/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId> | ||
<artifactId>subpackages-exclude-packages-test</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
|
||
<configuration> | ||
<project implementation="org.apache.maven.plugins.javadoc.stubs.SubpackagesExcludePackagesTestMavenProjectStub"/> | ||
|
||
<outputDirectory>${basedir}/target/test/unit/subpackages-exclude-packages-test/target/site/apidocs</outputDirectory> | ||
<javadocOptionsDir>${basedir}/target/test/unit/subpackages-exclude-packages-test/target/javadoc-bundle-options</javadocOptionsDir> | ||
|
||
<!-- Comment the next line, and javadoc will skip all subpackages under "internal" package --> | ||
<subpackages>org.apache</subpackages> | ||
|
||
<excludePackageNames> | ||
org.apache.internal | ||
:org.apache.internal.* | ||
</excludePackageNames> | ||
|
||
<debug>true</debug> | ||
|
||
<reactorProjects> | ||
<project implementation="org.apache.maven.plugins.javadoc.stubs.SubpackagesExcludePackagesTestMavenProjectStub"/> | ||
</reactorProjects> | ||
|
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
36 changes: 36 additions & 0 deletions
36
...est/resources/unit/subpackages-exclude-packages-test/src/main/java/io/ExcludeIoClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io; | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Class to be excluded. | ||
*/ | ||
public class ExcludeIoClass | ||
{ | ||
/** | ||
* Sample method that prints out the parameter string. | ||
* | ||
* @param str The string value to be printed. | ||
*/ | ||
public void sampleMethod( String str ) | ||
{ | ||
System.out.println( str ); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...ackages-exclude-packages-test/src/main/java/org/apache/internal/ExcludeInternalClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.apache.internal; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
/** | ||
* Class to be excluded. | ||
*/ | ||
public class ExcludeInternalClass | ||
{ | ||
/** | ||
* Sample method that prints out the parameter string. | ||
* | ||
* @param str The string value to be printed. | ||
*/ | ||
public void sampleMethod( String str ) | ||
{ | ||
System.out.println( str ); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...e-packages-test/src/main/java/org/apache/internal/subpackage/ExcludeInternalSubClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.apache.internal.subpackage; | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Class to be excluded. | ||
*/ | ||
public class ExcludeInternalSubClass | ||
{ | ||
/** | ||
* Sample method that prints out the parameter string. | ||
* | ||
* @param str The string value to be printed. | ||
*/ | ||
public void sampleMethod( String str ) | ||
{ | ||
System.out.println( str ); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...rc/main/java/org/apache/internal/subpackage/subsubpackage/ExcludeInternalSubSubClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.apache.internal.subpackage.subsubpackage; | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Class to be excluded. | ||
*/ | ||
public class ExcludeInternalSubSubClass | ||
{ | ||
/** | ||
* Sample method that prints out the parameter string. | ||
* | ||
* @param str The string value to be printed. | ||
*/ | ||
public void sampleMethod( String str ) | ||
{ | ||
System.out.println( str ); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...unit/subpackages-exclude-packages-test/src/main/java/org/apache/project/IncludeClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.apache.project; | ||
|
||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Class to be included. | ||
*/ | ||
public class IncludeClass | ||
{ | ||
/** | ||
* Sample method that prints out the parameter string. | ||
* | ||
* @param str The string value to be printed. | ||
*/ | ||
public void sampleMethod( String str ) | ||
{ | ||
System.out.println( str ); | ||
} | ||
} |