Skip to content
Commits on Source (8)
language: java
jdk:
- oraclejdk6
- oraclejdk7
- openjdk7
- oraclejdk8
- openjdk9
- openjdk10
- openjdk11
# No need for preliminary install step.
install: true
#
# Run all integration tests.
script:
- "mvn --show-version --errors --batch-mode clean verify"
- "mvn --show-version --errors --batch-mode clean verify -Prun-its"
#
cache:
directories:
......@@ -17,6 +19,4 @@ cache:
branches:
except:
- gh-pages
notifications:
email:
- olamy@apache.org
Plexus Containers
============
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-containers.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.codehaus.plexus%22%20a%3A%plexus-containers%22)
[![Build Status](https://travis-ci.org/codehaus-plexus/plexus-containers.svg?branch=master)](https://travis-ci.org/codehaus-plexus/plexus-containers)
Plexus IoC Container core with companion tools.
## Attention
We have changed the default branch in GitHub repository from `plexus-containers-1.x` to `master`
## Release Notes
You can find details about the different releases in the [Release Notes](https://github.com/codehaus-plexus/plexus-containers/blob/master/ReleaseNotes.md).
* [Release 2.0.0](https://github.com/codehaus-plexus/plexus-containers/blob/master/ReleaseNotes.md#plexus-containers-200).
## Site publishing
For publishing [the site](https://codehaus-plexus.github.io/plexus-containers/) do the following:
```
mvn -Preporting verify site site:stage scm-publish:publish-scm
```
Plexus Containers Release Notes
=========================
Plexus Containers 2.0.0
---------------------
Plexus Containers 2.0.0 requires Java 6 and Maven 3.0+
### Improvements
* [Issue #23][issue-23] - Remove the PlexusMetadataGeneratorCLI
* [Issue #19][issue-19] - Removed the plexus-component-javadoc module
* [Pull Request #6][pr-6] - compatibility with latest versions of Qdox.
* [Pull Request #7][pr-7] - Reproducible metadata ([Issue #8][issue-8]).
### Upgrades
* [Issue #15][issue-15] - Migrate to Maven 3.0+ api
* [Issue #20][issue-20] - Upgrade qdox to 2.0-M10
* [Issue #21][issue-21] - Upgrade plexus-utils 3.1.1
* [Issue #22][issue-22] - Upgrade classworlds 2.6.0
### Tasks
* [Issue #13][issue-13] - Move default development back to master.
[issue-8]: https://github.com/codehaus-plexus/plexus-containers/issues/8
[issue-13]: https://github.com/codehaus-plexus/plexus-containers/issues/13
[issue-15]: https://github.com/codehaus-plexus/plexus-containers/issues/15
[issue-19]: https://github.com/codehaus-plexus/plexus-containers/issues/19
[issue-20]: https://github.com/codehaus-plexus/plexus-containers/issues/20
[issue-21]: https://github.com/codehaus-plexus/plexus-containers/issues/21
[issue-22]: https://github.com/codehaus-plexus/plexus-containers/issues/22
[issue-23]: https://github.com/codehaus-plexus/plexus-containers/issues/23
[pr-7]: https://github.com/codehaus-plexus/plexus-containers/pull/7
[pr-6]: https://github.com/codehaus-plexus/plexus-containers/pull/6
plexus-containers (2.0.0-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Removed the patches (fixed upstream)
- Depend on libasm-java (>= 7.0)
- No longer ignore the removed plexus-component-javadoc module
* Standards-Version updated to 4.4.0
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Mon, 15 Jul 2019 16:16:10 +0200
plexus-containers (1.7.1-7) unstable; urgency=medium
* Team upload.
......
......@@ -7,7 +7,7 @@ Build-Depends:
debhelper (>= 10),
default-jdk,
junit4,
libasm-java (>= 5.0),
libasm-java (>= 7.0),
libcommons-cli-java,
libguava-java,
libjdom2-java,
......@@ -18,9 +18,9 @@ Build-Depends:
libqdox2-java,
libxbean-reflect-java,
maven-debian-helper
Standards-Version: 4.1.1
Vcs-Git: https://anonscm.debian.org/git/pkg-java/plexus-containers.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/plexus-containers.git
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/plexus-containers.git
Vcs-Browser: https://salsa.debian.org/java-team/plexus-containers
Homepage: https://github.com/codehaus-plexus/plexus-containers
Package: libplexus-container-default-java
......@@ -67,7 +67,7 @@ Description: Plexus Component Annotations
Package: libplexus-component-metadata-java
Architecture: all
Depends:
libasm-java (>= 5.0),
libasm-java (>= 7.0),
libcommons-cli-java,
libjdom2-java,
libmaven3-core-java,
......
......@@ -28,5 +28,4 @@
pom.xml --no-parent --has-package-version --package=libplexus-container-default-java
plexus-component-annotations/pom.xml --no-parent --has-package-version --package=libplexus-component-annotations-java --relocate=org.codehaus.plexus:plexus-component-annotations:1.5.5
plexus-component-metadata/pom.xml --has-package-version --package=libplexus-component-metadata-java --relocate=org.codehaus.plexus:plexus-component-metadata:1.5.5
plexus-component-javadoc/pom.xml --ignore
plexus-container-default/pom.xml --has-package-version --package=libplexus-container-default-java --relocate=org.codehaus.plexus:plexus-container-default:1.5.5
......@@ -16,12 +16,10 @@
# and version starting with 3., replacing the version with 3.x
# junit junit jar s/3\\..*/3.x/
s/jdom/org.jdom/ jdom jar s/.*/debian/ * *
junit junit jar s/.*/4.x/ * *
com.thoughtworks.qdox qdox * s/.*/2.x/ * *
s/com.google.collections/com.google.guava/ s/google-collections/guava/ * s/.*/debian/ * *
org.codehaus.plexus plexus-utils jar s/.*/2.x/ * *
org.apache.maven s/maven-project/maven-core/ * s/.*/3.x/ * *
org.apache.maven maven-* * s/.*/3.x/ * *
Description: Sort the components to make the metadata reproducible
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://github.com/codehaus-plexus/plexus-containers/pull/7
--- a/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/DefaultMetadataGenerator.java
+++ b/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/DefaultMetadataGenerator.java
@@ -101,6 +101,12 @@
}
}
+ Collections.sort(descriptors, new java.util.Comparator<ComponentDescriptor>() {
+ public int compare(ComponentDescriptor d1, ComponentDescriptor d2) {
+ return d1.getHumanReadableKey().compareTo(d2.getHumanReadableKey());
+ }
+ });
+
List<File> componentDescriptors = new ArrayList<File>();
//
Description: Fixes the compatibility with the version of Qdox in Debian
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/gleaner/QDoxComponentGleaner.java
+++ b/plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/gleaner/QDoxComponentGleaner.java
@@ -244,7 +244,7 @@
// Remove any Plexus specific interfaces from the calculation
// ----------------------------------------------------------------------
- List<JavaClass> interfaces = new ArrayList<JavaClass>( javaClass.getImplementedInterfaces() );
+ List<JavaClass> interfaces = new ArrayList<JavaClass>( javaClass.getInterfaces() );
for ( Iterator<JavaClass> it = interfaces.iterator(); it.hasNext(); )
{
03-reproducible-metadata.patch
05-qdox-compatibility.patch
......@@ -7,7 +7,7 @@
<parent>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-containers</artifactId>
<version>1.7.1</version>
<version>2.0.0</version>
</parent>
<artifactId>plexus-component-annotations</artifactId>
......
......@@ -27,7 +27,6 @@ import java.lang.annotation.Target;
* Marks a class as a Plexus component.
*
* @since 1.0-alpha-33
* @version $Id$
*/
@Documented
@Retention(RUNTIME)
......
......@@ -27,7 +27,6 @@ import java.lang.annotation.Target;
* Marks a field as a configuration element with a default value.
*
* @since 1.0-alpha-33
* @version $Id$
*/
@Documented
@Retention(RUNTIME)
......
......@@ -28,7 +28,6 @@ import java.lang.annotation.Target;
* Configures a requirement.
*
* @since 1.0-alpha-33
* @version $Id$
*/
@Documented
@Retention(RUNTIME)
......
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-containers</artifactId>
<version>1.7.1</version>
</parent>
<artifactId>plexus-component-javadoc</artifactId>
<name>Plexus :: Javadoc Taglets</name>
<description>
Plexus Javadoc Taglets to generate additional documentation for plexus components' javadoc from plexus javadoc annotations.
</description>
<inceptionYear>2007</inceptionYear>
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<jdk>(,9)</jdk>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>J7-default-tools.jar</id>
<activation>
<jdk>(,9)</jdk>
<property>
<name>java.vendor</name>
<value>Oracle Corporation</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>run-its</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<debug>true</debug>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>javadoc:javadoc</goal>
</goals>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.plexus.plexus-javadoc</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<inceptionYear>2008</inceptionYear>
<name>Test Plexus Tags</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<outputDirectory>${basedir}/target/site/apidocs</outputDirectory>
<debug>true</debug>
<show>private</show>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<charset>UTF-8</charset>
<taglets>
<taglet>
<tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
</taglet>
<taglet>
<tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
</taglet>
<taglet>
<tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
</taglet>
</taglets>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-javadoc</artifactId>
<version>@project.version@</version>
</tagletArtifact>
</configuration>
</plugin>
</plugins>
</build>
</project>
package plexus.test;
/*
* 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.
*/
/**
* App class
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version 1.0
* @plexus.component role="org.codehaus.plexus.test.App" role-hint="app"
*/
public class App
{
/**
* @plexus.configuration default-value="someone"
*/
private String name;
/**
* @plexus.requirement
* role-hint="foo"
*/
private App app;
/**
* The main method
*
* @param args an array of strings that contains the arguments
*/
public static void main( String[] args )
{
System.out.println( "Sample Application." );
}
/**
* Sample method that prints out the parameter string.
*
* @param str The string value to be printed.
*/
protected void sampleMethod( String str )
{
System.out.println( str );
}
}
import java.io.*;
import java.util.*;
import java.util.regex.*;
import org.codehaus.plexus.util.*;
setAccessibility( true );
File docsDir = new File( basedir, "target/site/apidocs" );
System.out.println( "Checking for existence of: " + docsDir );
if ( !docsDir.exists() )
{
throw new FileNotFoundException( docsDir + " was not created" );
}
File docFile = new File( docsDir, "plexus/test/App.html" );
System.out.println( "Checking for existence of: " + docFile );
if ( !docFile.isFile() )
{
throw new FileNotFoundException( docFile + " was not created" );
}
String html = FileUtils.fileRead( docFile, "UTF-8" ).replaceAll( "(\r\n)|(\r)|(\n)", "" );
System.out.println( "Checking for documentation of Plexus component" );
String plexusComponent = "<dt><b>plexus component:</b></dt><dd>"
+ "<table cellpadding=\"2\" cellspacing=\"0\"><tr><td>" + "<dl>"
+ "<dt><b>role:</b></dt>"
+ "<dd>\"org.codehaus.plexus.test.app\"</dd>"
+ "<dt><b>role-hint:</b></dt>" + "<dd>\"app\"</dd>"
+ "</dl></td></tr></table></dd>";
if ( html.toLowerCase( Locale.ENGLISH ).indexOf( ( plexusComponent ).toLowerCase( Locale.ENGLISH ) ) < 0 )
{
throw new IllegalStateException( "Plexus component doc wrong" );
}
System.out.println( "Checking for documentation of Plexus configuration" );
String plexusConfig = "<dt><b>plexus configuration:</b></dt><dd>"
+ "<table cellpadding=\"2\" cellspacing=\"0\"><tr><td><dl>"
+ "<dt><b>default-value:</b></dt>"
+ "<dd>\"someone\"</dd></dl></td></tr></table></dd></dl>";
if ( html.toLowerCase( Locale.ENGLISH ).indexOf( ( plexusConfig ).toLowerCase( Locale.ENGLISH ) ) < 0 )
{
throw new IllegalStateException( "Plexus configuration doc wrong" );
}
System.out.println( "Checking for documentation of Plexus requirement" );
String plexusRequirement = "<dt><b>plexus requirement:</b></dt><dd>"
+ "<table cellpadding=\"2\" cellspacing=\"0\"><tr><td><dl>"
+ "<dt><b>role-hint:</b></dt><dd>\"foo\"</dd>"
+ "</dl></td></tr></table></dd></dl>";
if ( html.toLowerCase( Locale.ENGLISH ).indexOf( ( plexusRequirement ).toLowerCase( Locale.ENGLISH ) ) < 0 )
{
throw new IllegalStateException( "Plexus requirement doc wrong" );
}
return true;
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<profiles>
<profile>
<id>it-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
package org.codehaus.plexus.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.util.Enumeration;
import java.util.StringTokenizer;
import javax.swing.text.AttributeSet;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import com.sun.javadoc.Tag;
import com.sun.tools.doclets.Taglet;
/**
* Abstract <code>Taglet</code> for <a href="http://plexus.codehaus.org/"/>Plexus</a> tags.
*
* @see <a href="http://plexus.codehaus.org/guides/developer-guide/appendices/javadoc-tags-reference.html">
* http://plexus.codehaus.org/guides/developer-guide/appendices/javadoc-tags-reference.html</a>
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
*/
public abstract class AbstractPlexusTaglet
implements Taglet
{
/** {@inheritDoc} */
public String toString( Tag tag )
{
if ( tag == null )
{
return null;
}
String tagText = tag.text();
MutableAttributeSet att = getAttributes( tagText );
StringBuffer sb = new StringBuffer();
if ( ( att == null ) || ( att.getAttributeCount() == 0 ) )
{
sb.append( "<DT><B>" ).append( getHeader() ).append( "</B></DT><DD></DD>" );
}
else
{
sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
sb.append( "<DD><TABLE CELLPADDING=\"2\" CELLSPACING=\"0\"><TR><TD>" );
appendPlexusTag( sb, att );
sb.append( "</TD></TR></TABLE></DD>" );
}
return sb.toString();
}
/** {@inheritDoc} */
public String toString( Tag[] tags )
{
if ( tags.length == 0 )
{
return null;
}
boolean hasParameters = false;
for (Tag tag : tags) {
String tagText = tag.text();
MutableAttributeSet att = getAttributes(tagText);
if (att != null) {
hasParameters = att.getAttributeCount() > 0;
}
}
StringBuffer sb = new StringBuffer();
sb.append( "<DT><B>" ).append( getHeader() ).append( ( hasParameters ? ":" : "" ) ).append( "</B></DT>" );
sb.append( "<DD><TABLE CELLPADDING=\"2\" CELLSPACING=\"0\"><TR><TD>" );
for ( int i = 0; i < tags.length; i++ )
{
if ( i > 0 )
{
sb.append( ", " );
}
String tagText = tags[i].text();
appendPlexusTag( sb, getAttributes( tagText ) );
}
sb.append( "</TD></TR></TABLE></DD>" );
return sb.toString();
}
/**
* @return the header to display
*/
public abstract String getHeader();
/**
* @param text the Tag text returned by {@link Tag#text()}
* @return a MutableAttributeSet or null if text was null
*/
private MutableAttributeSet getAttributes( String text )
{
if ( text == null || text.trim().length() == 0 )
{
return null;
}
MutableAttributeSet att = new SimpleAttributeSet();
StringTokenizer token = new StringTokenizer( text, " " );
while ( token.hasMoreTokens() )
{
String nextToken = token.nextToken();
StringTokenizer token2 = new StringTokenizer( nextToken, "=" );
if ( token2.countTokens() != 2 )
{
System.err.println( "The annotation '" + getName() + "' has a wrong Plexus annotations: " + text );
continue;
}
String name = token2.nextToken();
String value = token2.nextToken();
att.addAttribute( name, value );
}
return att;
}
/**
* Append the wanted display in the javadoc.
*
* @param sb
* @param att
*/
private static void appendPlexusTag( StringBuffer sb, MutableAttributeSet att )
{
if ( att == null )
{
return;
}
if ( att.getAttributeCount() > 0 )
{
sb.append( "<DL>" );
Enumeration names = att.getAttributeNames();
while ( names.hasMoreElements() )
{
Object key = names.nextElement();
Object value = att.getAttribute( key );
if ( value instanceof AttributeSet )
{
// ignored
}
else
{
sb.append( "<DT><B>" ).append( key ).append( ":</B></DT>" );
sb.append( "<DD>" ).append( value ).append( "</DD>" );
}
}
sb.append( "</DL>" );
}
}
}