Import Upstream version 0.3.5

This commit is contained in:
denghao 2023-03-22 10:58:44 +08:00
commit f34a1c006f
28 changed files with 1643 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
target/
.project
.classpath
.settings/
.idea/
*.iml
*.ipr
*.iws
*.diff
*.patch
*.log
*.swp

1
.pc/.quilt_patches Normal file
View File

@ -0,0 +1 @@
debian/patches

1
.pc/.quilt_series Normal file
View File

@ -0,0 +1 @@
series

1
.pc/.version Normal file
View File

@ -0,0 +1 @@
2

View File

@ -0,0 +1,355 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010, 2015 Sonatype, Inc.
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ which accompanies this distribution, and is available at
~ http://www.eclipse.org/legal/epl-v10.html
~
~ Contributors:
~ Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
-->
<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.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>0.3.5</version>
<packaging>maven-plugin</packaging>
<name>Sisu Maven Plugin</name>
<description>Manage Sisu components and applications</description>
<url>http://www.eclipse.org/sisu/</url>
<inceptionYear>2010</inceptionYear>
<organization>
<name>The Eclipse Foundation</name>
<url>http://www.eclipse.org/</url>
</organization>
<licenses>
<license>
<name>Eclipse Public License, Version 1.0</name>
<url>http://www.eclipse.org/legal/epl-v10.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<mailingLists>
<mailingList>
<name>Sisu Developers List</name>
<subscribe>sisu-dev-subscribe@eclipse.org</subscribe>
<unsubscribe>sisu-dev-unsubscribe@eclipse.org</unsubscribe>
<post>sisu-dev@eclipse.org</post>
<archive>http://dev.eclipse.org/mhonarc/lists/sisu-dev/</archive>
</mailingList>
<mailingList>
<name>Sisu Users List</name>
<subscribe>sisu-users-subscribe@eclipse.org</subscribe>
<unsubscribe>sisu-users-unsubscribe@eclipse.org</unsubscribe>
<post>sisu-users@eclipse.org</post>
<archive>http://dev.eclipse.org/mhonarc/lists/sisu-users/</archive>
</mailingList>
</mailingLists>
<prerequisites>
<maven>3.0.4</maven>
</prerequisites>
<scm>
<connection>scm:git:git://git.eclipse.org/gitroot/sisu/org.eclipse.sisu.mojos.git</connection>
<developerConnection>scm:git:ssh://git.eclipse.org/gitroot/sisu/org.eclipse.sisu.mojos.git</developerConnection>
<url>http://git.eclipse.org/c/sisu/org.eclipse.sisu.mojos.git/tree/</url>
</scm>
<issueManagement>
<system>bugzilla</system>
<url>https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sisu&amp;component=Mojos&amp;format=guided</url>
</issueManagement>
<ciManagement>
<system>Hudson</system>
<url>https://hudson.eclipse.org/sisu/job/sisu-mojos-nightly/</url>
</ciManagement>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<!--
| No need for Guice when indexing, as the scanner works off bytecode
-->
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<version>${project.version}</version>
</dependency>
<!--
| Avoid internal log spam; use -Dsisu.debug to get detailed logging
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.6.4</version>
</dependency>
<!--
| Maven APIs and components used to analyze the project dependencies
-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>1.4</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<configuration>
<goalPrefix>sisu</goalPrefix>
<helpPackageName>org.eclipse.sisu.mojos</helpPackageName>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.11</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.1</version>
</signature>
</configuration>
<executions>
<execution>
<id>check-java6</id>
<phase>package</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>1.6</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<dryRun>true</dryRun> <!-- releases are made using the prepare/perform_milestone.sh scripts -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<!-- ignore various mojos that aren't covered by m2e -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<versionRange>[3.3,)</versionRange>
<goals>
<goal>descriptor</goal>
<goal>helpmojo</goal>
</goals>
</pluginExecutionFilter>
<action><ignore /></action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals><goal>enforce</goal></goals>
</pluginExecutionFilter>
<action><ignore /></action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
<useAgent>true</useAgent>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
</plugin>
<plugin>
<extensions>true</extensions>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.4</version>
<configuration>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<serverId>sonatype-nexus-staging</serverId>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

1
.pc/applied-patches Normal file
View File

@ -0,0 +1 @@
01-missing-maven-dependency.patch

70
LICENSE.txt Normal file
View File

@ -0,0 +1,70 @@
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

18
README.md Normal file
View File

@ -0,0 +1,18 @@
Homepage
========
<http://www.eclipse.org/sisu/>
Contribution
============
As required by the Eclipse IP process, all contributions need to be submitted in form of patches attached to a
[Bugzilla entry](https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sisu), thereby being subject to the
[Eclipse Terms of Use](http://www.eclipse.org/legal/termsofuse.php). For clarity, patches should be provided as
standalone files attached to the issue, not as text embedded in the issue description or a comment.
When submitting patches, please follow the existing code style. The corresponding formatter settings for some IDEs can
be taken from the [Maven Code Style](http://maven.apache.org/developers/committer-environment.html#Maven_Code_Style)
page.
License
=======
- [Eclipse Public License, v1.0](http://www.eclipse.org/legal/epl-v10.html)

View File

@ -0,0 +1,9 @@
Information about sisu-mojos
----------------------------
This package was debianized using the mh_make command
from the maven-debian-helper package.
The build system uses Maven but prevents it from downloading
anything from the Internet, making the build compliant with
the Debian policy.

20
debian-orig/changelog Normal file
View File

@ -0,0 +1,20 @@
sisu-mojos (0.3.5-1) unstable; urgency=medium
* New upstream release
* Fixed the build failure with maven-common-artifact-filters 3.3
(Closes: #1028855)
* Standards-Version updated to 4.6.2
-- Emmanuel Bourg <ebourg@apache.org> Sun, 15 Jan 2023 17:25:07 +0100
sisu-mojos (0.3.4-2) unstable; urgency=medium
* Source only upload
-- Emmanuel Bourg <ebourg@apache.org> Wed, 03 Feb 2021 22:40:05 +0100
sisu-mojos (0.3.4-1) unstable; urgency=medium
* Initial release (Closes: #980533)
-- Emmanuel Bourg <ebourg@apache.org> Wed, 20 Jan 2021 09:53:00 +0100

32
debian-orig/control Normal file
View File

@ -0,0 +1,32 @@
Source: sisu-mojos
Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Emmanuel Bourg <ebourg@apache.org>
Build-Depends:
debhelper-compat (= 13),
default-jdk,
libmaven-common-artifact-filters-java (>= 1.4),
libmaven-plugin-tools-java (>= 3.6.0),
libmaven3-core-java (>= 3.0),
libplexus-utils2-java (>= 3.0.17),
libsisu-inject-java (>= 0.3.4),
libslf4j-java (>= 1.6.4),
maven-debian-helper (>= 2.1)
Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/java-team/sisu-mojos.git
Vcs-Browser: https://salsa.debian.org/java-team/sisu-mojos
Homepage: https://www.eclipse.org/sisu/
Package: libeclipse-sisu-maven-plugin-java
Architecture: all
Depends: ${maven:Depends}, ${misc:Depends}
Suggests: ${maven:OptionalDepends}
Description: Manage Sisu components and applications
Sisu is a modular JSR330-based container that supports classpath scanning,
auto-binding, and dynamic auto-wiring.
.
sisu-maven-plugin indexes the JSR-330 components to be made available
to Maven. It creates an index in META-INF/sisu/javax.inject.Named enumerating
the components. This means that no classpath scanning is required at runtime
to find them, which keeps Maven's startup time fast.

229
debian-orig/copyright Normal file
View File

@ -0,0 +1,229 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Sisu Maven Plugin
Source: https://github.com/eclipse/sisu.mojos
Files: *
Copyright: 2011-2013, Sonatype, Inc.
2013-2019, The Eclipse Foundation
License: EPL-1.0
Files: debian/*
Copyright: 2021, Emmanuel Bourg
License: EPL-1.0
License: EPL-1.0
Eclipse Public License - v 1.0
.
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE
PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
.
1. DEFINITIONS
.
"Contribution" means:
.
a) in the case of the initial Contributor, the initial code and documentation
distributed under this Agreement, and
b) in the case of each subsequent Contributor:
.
i) changes to the Program, and
.
ii) additions to the Program;
.
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates'
from a Contributor if it was added to the Program by such Contributor itself
or anyone acting on such Contributor's behalf. Contributions do not include
additions to the Program which: (i) are separate modules of software
distributed in conjunction with the Program under their own license
agreement, and (ii) are not derivative works of the Program.
.
"Contributor" means any person or entity that distributes the Program.
.
"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
.
"Program" means the Contributions distributed in accordance with this
Agreement.
.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
.
2. GRANT OF RIGHTS
.
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any,
and such derivative works, in source code and object code form.
.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under
Licensed Patents to make, use, sell, offer to sell, import and otherwise
transfer the Contribution of such Contributor, if any, in source code and
object code form. This patent license shall apply to the combination of
the Contribution and the Program if, at the time the Contribution is added
by the Contributor, such addition of the Contribution causes such
combination to be covered by the Licensed Patents. The patent license shall
not apply to any other combinations which include the Contribution. No
hardware per se is licensed hereunder.
.
c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other
intellectual property rights of any other entity. Each Contributor disclaims
any liability to Recipient for claims brought by any other entity based on
infringement of intellectual property rights or otherwise. As a condition to
exercising the rights and licenses granted hereunder, each Recipient hereby
assumes sole responsibility to secure any other intellectual property rights
needed, if any. For example, if a third party patent license is required to
allow Recipient to distribute the Program, it is Recipient's responsibility
to acquire that license before distributing the Program.
.
d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license
set forth in this Agreement.
.
3. REQUIREMENTS
.
A Contributor may choose to distribute the Program in object code form under
its own license agreement, provided that:
.
a) it complies with the terms and conditions of this Agreement; and
.
b) its license agreement:
.
i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title
and non-infringement, and implied warranties or conditions of merchantability
and fitness for a particular purpose;
.
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
.
iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
.
iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on
or through a medium customarily used for software exchange.
.
When the Program is made available in source code form:
.
a) it must be made available under this Agreement; and
.
b) a copy of this Agreement must be included with each copy of the Program.
.
Contributors may not remove or alter any copyright notices contained within
the Program.
.
Each Contributor must identify itself as the originator of its Contribution,
if any, in a manner that reasonably allows subsequent Recipients to identify
the originator of the Contribution.
.
4. COMMERCIAL DISTRIBUTION
.
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore,
if a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses,
damages and costs (collectively "Losses") arising from claims, lawsuits and
other legal actions brought by a third party against the Indemnified
Contributor to the extent caused by the acts or omissions of such Commercial
Contributor in connection with its distribution of the Program in a commercial
product offering. The obligations in this section do not apply to any claims
or Losses relating to any actual or alleged intellectual property
infringement. In order to qualify, an Indemnified Contributor must:
a) promptly notify the Commercial Contributor in writing of such claim, and
b) allow the Commercial Contributor to control, and cooperate with the
Commercial Contributor in, the defense and any related settlement
negotiations. The Indemnified Contributor may participate in any such claim
at its own expense.
.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If
that Commercial Contributor then makes performance claims, or offers
warranties related to Product X, those performance claims and warranties are
such Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a
court requires any other Contributor to pay any damages as a result, the
Commercial Contributor must pay those damages.
.
5. NO WARRANTY
.
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the
appropriateness of using and distributing the Program and assumes all
risks associated with its exercise of rights under this Agreement ,
including but not limited to the risks and costs of program errors,
compliance with applicable laws, damage to or loss of data, programs or
equipment, and unavailability or interruption of operations.
.
6. DISCLAIMER OF LIABILITY
.
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
.
7. GENERAL
.
If any provision of this Agreement is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of the
remainder of the terms of this Agreement, and without further action by
the parties hereto, such provision shall be reformed to the minimum extent
necessary to make such provision valid and enforceable.
.
If Recipient institutes patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
(excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted
under Section 2(b) shall terminate as of the date such litigation is filed.
.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and
does not cure such failure in a reasonable period of time after becoming
aware of such noncompliance. If all Recipient's rights under this Agreement
terminate, Recipient agrees to cease use and distribution of the Program as
soon as reasonably practicable. However, Recipient's obligations under this
Agreement and any licenses granted by Recipient relating to the Program
shall continue and survive.
.
Everyone is permitted to copy and distribute copies of this Agreement, but
in order to avoid inconsistency the Agreement is copyrighted and may only
be modified in the following manner. The Agreement Steward reserves the
right to publish new versions (including revisions) of this Agreement from
time to time. No one other than the Agreement Steward has the right to
modify this Agreement. The Eclipse Foundation is the initial Agreement
Steward. The Eclipse Foundation may assign the responsibility to serve as
the Agreement Steward to a suitable separate entity. Each new version of
the Agreement will be given a distinguishing version number. The Program
(including Contributions) may always be distributed subject to the version
of the Agreement under which it was received. In addition, after a new
version of the Agreement is published, Contributor may elect to distribute
the Program (including its Contributions) under the new version. Except as
expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
rights or licenses to the intellectual property of any Contributor under
this Agreement, whether expressly, by implication, estoppel or otherwise.
All rights in the Program not expressly granted under this Agreement are
reserved.
.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to
this Agreement will bring a legal action under this Agreement more than
one year after the cause of action arose. Each party waives its rights to
a jury trial in any resulting litigation.

View File

@ -0,0 +1,28 @@
# List of POM files for the package
# Format of this file is:
# <path to pom file> [option]*
# where option can be:
# --ignore: ignore this POM and its artifact if any
# --ignore-pom: don't install the POM. To use on POM files that are created
# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
# --no-parent: remove the <parent> tag from the POM
# --package=<package>: an alternative package to use when installing this POM
# and its artifact
# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
# of the version for the package.
# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
# during a clean operation with mh_cleanpom or mh_installpom
# --artifact=<path>: path to the build artifact associated with this POM,
# it will be installed when using the command mh_install. [mh_install]
# --java-lib: install the jar into /usr/share/java to comply with Debian
# packaging guidelines
# --usj-name=<name>: name to use when installing the library in /usr/share/java
# --usj-version=<version>: version to use when installing the library in /usr/share/java
# --no-usj-versionless: don't install the versionless link in /usr/share/java
# --dest-jar=<path>: the destination for the real jar.
# It will be installed with mh_install. [mh_install]
# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
# Empty by default. [mh_install]
#
pom.xml --no-parent --has-package-version

View File

@ -0,0 +1,7 @@
org.apache.maven.plugins maven-deploy-plugin
org.apache.maven.plugins maven-enforcer-plugin
org.apache.maven.plugins maven-project-info-reports-plugin
org.apache.maven.plugins maven-release-plugin
org.codehaus.mojo animal-sniffer-maven-plugin
junit junit

View File

@ -0,0 +1,5 @@
# Include here properties to pass to Maven during the build.
# For example:
# maven.test.skip=true
# project.build.sourceEncoding=UTF-8

5
debian-orig/maven.rules Normal file
View File

@ -0,0 +1,5 @@
junit junit jar s/4\..*/4.x/ * *
org.codehaus.plexus plexus-utils jar s/.*/2.x/ * *
org.codehaus.plexus plexus-container-default * * * *
org.apache.maven maven* * s/.*/3.x/ * *

View File

@ -0,0 +1,17 @@
Description: Adds the missing dependency on maven-core
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://github.com/eclipse/sisu.mojos/issues/9
--- a/pom.xml
+++ b/pom.xml
@@ -103,6 +103,11 @@
-->
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0</version>
<exclusions>

View File

@ -0,0 +1 @@
01-missing-maven-dependency.patch

4
debian-orig/rules Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/make -f
%:
dh $@

View File

@ -0,0 +1 @@
3.0 (quilt)

3
debian-orig/watch Normal file
View File

@ -0,0 +1,3 @@
version=4
opts="repack,compression=xz" \
https://github.com/eclipse/sisu.mojos/tags .*/releases/([\d\.]+).tar.gz

360
pom.xml Normal file
View File

@ -0,0 +1,360 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010, 2015 Sonatype, Inc.
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ which accompanies this distribution, and is available at
~ http://www.eclipse.org/legal/epl-v10.html
~
~ Contributors:
~ Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
-->
<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.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>0.3.5</version>
<packaging>maven-plugin</packaging>
<name>Sisu Maven Plugin</name>
<description>Manage Sisu components and applications</description>
<url>http://www.eclipse.org/sisu/</url>
<inceptionYear>2010</inceptionYear>
<organization>
<name>The Eclipse Foundation</name>
<url>http://www.eclipse.org/</url>
</organization>
<licenses>
<license>
<name>Eclipse Public License, Version 1.0</name>
<url>http://www.eclipse.org/legal/epl-v10.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<mailingLists>
<mailingList>
<name>Sisu Developers List</name>
<subscribe>sisu-dev-subscribe@eclipse.org</subscribe>
<unsubscribe>sisu-dev-unsubscribe@eclipse.org</unsubscribe>
<post>sisu-dev@eclipse.org</post>
<archive>http://dev.eclipse.org/mhonarc/lists/sisu-dev/</archive>
</mailingList>
<mailingList>
<name>Sisu Users List</name>
<subscribe>sisu-users-subscribe@eclipse.org</subscribe>
<unsubscribe>sisu-users-unsubscribe@eclipse.org</unsubscribe>
<post>sisu-users@eclipse.org</post>
<archive>http://dev.eclipse.org/mhonarc/lists/sisu-users/</archive>
</mailingList>
</mailingLists>
<prerequisites>
<maven>3.0.4</maven>
</prerequisites>
<scm>
<connection>scm:git:git://git.eclipse.org/gitroot/sisu/org.eclipse.sisu.mojos.git</connection>
<developerConnection>scm:git:ssh://git.eclipse.org/gitroot/sisu/org.eclipse.sisu.mojos.git</developerConnection>
<url>http://git.eclipse.org/c/sisu/org.eclipse.sisu.mojos.git/tree/</url>
</scm>
<issueManagement>
<system>bugzilla</system>
<url>https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sisu&amp;component=Mojos&amp;format=guided</url>
</issueManagement>
<ciManagement>
<system>Hudson</system>
<url>https://hudson.eclipse.org/sisu/job/sisu-mojos-nightly/</url>
</ciManagement>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<!--
| No need for Guice when indexing, as the scanner works off bytecode
-->
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<version>${project.version}</version>
</dependency>
<!--
| Avoid internal log spam; use -Dsisu.debug to get detailed logging
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.6.4</version>
</dependency>
<!--
| Maven APIs and components used to analyze the project dependencies
-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>debian</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>1.4</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<configuration>
<goalPrefix>sisu</goalPrefix>
<helpPackageName>org.eclipse.sisu.mojos</helpPackageName>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.11</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.1</version>
</signature>
</configuration>
<executions>
<execution>
<id>check-java6</id>
<phase>package</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>1.6</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<dryRun>true</dryRun> <!-- releases are made using the prepare/perform_milestone.sh scripts -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<!-- ignore various mojos that aren't covered by m2e -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<versionRange>[3.3,)</versionRange>
<goals>
<goal>descriptor</goal>
<goal>helpmojo</goal>
</goals>
</pluginExecutionFilter>
<action><ignore /></action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals><goal>enforce</goal></goals>
</pluginExecutionFilter>
<action><ignore /></action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
<useAgent>true</useAgent>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
</plugin>
<plugin>
<extensions>true</extensions>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.4</version>
<configuration>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<serverId>sonatype-nexus-staging</serverId>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,237 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
*******************************************************************************/
package org.eclipse.sisu.mojos;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
import org.apache.maven.shared.artifact.filter.collection.ArtifactIdFilter;
import org.apache.maven.shared.artifact.filter.collection.ClassifierFilter;
import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
import org.apache.maven.shared.artifact.filter.collection.GroupIdFilter;
import org.apache.maven.shared.artifact.filter.collection.ProjectTransitivityFilter;
import org.apache.maven.shared.artifact.filter.collection.ScopeFilter;
import org.apache.maven.shared.artifact.filter.collection.TypeFilter;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.sisu.space.SisuIndex;
import org.eclipse.sisu.space.URLClassSpace;
/**
* Generates a qualified class index for the current project and its dependencies.
*/
@Mojo( name = "index", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
public class IndexMojo
extends AbstractMojo
{
// ----------------------------------------------------------------------
// Configurable parameters
// ----------------------------------------------------------------------
/**
* The output directory.
*/
@Parameter( property = "outputDirectory", defaultValue = "${project.build.outputDirectory}" )
protected File outputDirectory;
/**
* If we should include project dependencies when indexing.
*/
@Parameter( property = "includeDependencies", defaultValue = "true" )
protected boolean includeDependencies;
/**
* Comma separated list of GroupIds to exclude when indexing.
*/
@Parameter( property = "excludeGroupIds", defaultValue = "" )
protected String excludeGroupIds;
/**
* Comma separated list of GroupIds to include when indexing.
*/
@Parameter( property = "includeGroupIds", defaultValue = "" )
protected String includeGroupIds;
/**
* Comma separated list of ArtifactIds to exclude when indexing.
*/
@Parameter( property = "excludeArtifactIds", defaultValue = "" )
protected String excludeArtifactIds;
/**
* Comma separated list of ArtifactIds to include when indexing.
*/
@Parameter( property = "includeArtifactIds", defaultValue = "" )
protected String includeArtifactIds;
/**
* Comma Separated list of Classifiers to exclude when indexing.
*/
@Parameter( property = "excludeClassifiers", defaultValue = "" )
protected String excludeClassifiers;
/**
* Comma Separated list of Classifiers to include when indexing.
*/
@Parameter( property = "includeClassifiers", defaultValue = "" )
protected String includeClassifiers;
/**
* Comma Separated list of Types to exclude when indexing.
*/
@Parameter( property = "excludeTypes", defaultValue = "" )
protected String excludeTypes;
/**
* Comma Separated list of Types to include when indexing.
*/
@Parameter( property = "includeTypes", defaultValue = "" )
protected String includeTypes;
/**
* Scope to exclude. Empty string indicates no scopes (default).
*/
@Parameter( property = "excludeScope", defaultValue = "" )
protected String excludeScope;
/**
* Scope to include. Empty string indicates all scopes (default).
*/
@Parameter( property = "includeScope", defaultValue = "" )
protected String includeScope;
/**
* If we should exclude transitive dependencies when indexing.
*/
@Parameter( property = "excludeTransitive", defaultValue = "false" )
protected boolean excludeTransitive;
// ----------------------------------------------------------------------
// Implementation fields
// ----------------------------------------------------------------------
/**
* The Maven project to index.
*/
@Parameter( property = "project", required = true, readonly = true )
private MavenProject project;
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
public void setProject( final MavenProject project )
{
this.project = project;
}
public void setOutputDirectory( final File outputDirectory )
{
this.outputDirectory = outputDirectory;
}
public void execute()
{
synchronized ( project )
{
new SisuIndex( outputDirectory )
{
@Override
protected void info( final String message )
{
getLog().info( message );
}
@Override
protected void warn( final String message )
{
getLog().warn( message );
}
}.index( new URLClassSpace( getProjectClassLoader(), getIndexPath() ) );
}
}
// ----------------------------------------------------------------------
// Implementation methods
// ----------------------------------------------------------------------
private ClassLoader getProjectClassLoader()
{
final List<URL> classPath = new ArrayList<URL>();
appendToClassPath( classPath, outputDirectory );
appendToClassPath( classPath, new File( project.getBuild().getOutputDirectory() ) );
for ( final Object artifact : project.getArtifacts() )
{
appendToClassPath( classPath, ( (Artifact) artifact ).getFile() );
}
return URLClassLoader.newInstance( classPath.toArray( new URL[classPath.size()] ) );
}
private URL[] getIndexPath()
{
final List<URL> indexPath = new ArrayList<URL>();
appendToClassPath( indexPath, outputDirectory );
if ( includeDependencies )
{
final FilterArtifacts filter = new FilterArtifacts();
filter.addFilter( new ProjectTransitivityFilter( project.getDependencyArtifacts(), excludeTransitive ) );
filter.addFilter( new ScopeFilter( cleanList( includeScope ), cleanList( excludeScope ) ) );
filter.addFilter( new TypeFilter( cleanList( includeTypes ), cleanList( excludeTypes ) ) );
filter.addFilter( new ClassifierFilter( cleanList( includeClassifiers ), cleanList( excludeClassifiers ) ) );
filter.addFilter( new GroupIdFilter( cleanList( includeGroupIds ), cleanList( excludeGroupIds ) ) );
filter.addFilter( new ArtifactIdFilter( cleanList( includeArtifactIds ), cleanList( excludeArtifactIds ) ) );
try
{
for ( final Object artifact : filter.filter( project.getArtifacts() ) )
{
appendToClassPath( indexPath, ( (Artifact) artifact ).getFile() );
}
}
catch ( final ArtifactFilterException e )
{
getLog().warn( e.getLocalizedMessage() );
}
}
return indexPath.toArray( new URL[indexPath.size()] );
}
private void appendToClassPath( final List<URL> urls, final File file )
{
if ( null != file )
{
try
{
urls.add( file.toURI().toURL() );
}
catch ( final MalformedURLException e )
{
getLog().warn( e.getLocalizedMessage() );
}
}
}
private static String cleanList( final String list )
{
return StringUtils.isEmpty( list ) ? "" : StringUtils.join( StringUtils.split( list ), "," );
}
}

View File

@ -0,0 +1,51 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
*******************************************************************************/
package org.eclipse.sisu.mojos;
import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
/**
* Generates a qualified class index for classes compiled by the current project.
*/
@Mojo( name = "main-index", defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true )
public class MainIndexMojo
extends AbstractMojo
{
// ----------------------------------------------------------------------
// Implementation fields
// ----------------------------------------------------------------------
/**
* The Maven project to index.
*/
@Parameter( property = "project", required = true, readonly = true )
private MavenProject project;
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
public void execute()
{
final IndexMojo mojo = new IndexMojo();
mojo.setLog( getLog() );
mojo.setProject( project );
mojo.setOutputDirectory( new File( project.getBuild().getOutputDirectory() ) );
mojo.execute();
}
}

View File

@ -0,0 +1,51 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stuart McCulloch (Sonatype, Inc.) - initial API and implementation
*******************************************************************************/
package org.eclipse.sisu.mojos;
import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
/**
* Generates a qualified class index for test classes compiled by the current project.
*/
@Mojo( name = "test-index", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES, requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
public class TestIndexMojo
extends AbstractMojo
{
// ----------------------------------------------------------------------
// Implementation fields
// ----------------------------------------------------------------------
/**
* The Maven project to index.
*/
@Parameter( property = "project", required = true, readonly = true )
private MavenProject project;
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
public void execute()
{
final IndexMojo mojo = new IndexMojo();
mojo.setLog( getLog() );
mojo.setProject( project );
mojo.setOutputDirectory( new File( project.getBuild().getTestOutputDirectory() ) );
mojo.execute();
}
}

View File

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About sisu-maven-plugin</title>
</head>
<body lang="EN-US">
<h2>About sisu-maven-plugin</h2>
<p>November 5, 2013</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html>

69
src/site/apt/index.apt Normal file
View File

@ -0,0 +1,69 @@
---
Sisu Plugin for Maven
---
Stuart McCulloch
---
March 10, 2011
---
Introduction
The Sisu Plugin for Maven provides mojos to generate <<<META-INF/sisu/javax.inject.Named>>> index files for the {{{http://eclipse.org/sisu/}Sisu container}}.
Usage
* Indexing individual projects
+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>main-index</goal>
<goal>test-index</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>
+---+
* Indexing assembled applications
+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<executions>
<execution>
<id>index-dependencies</id>
<phase>package</phase>
<goals>
<goal>index</goal>
</goals>
<configuration>
<!-- same include/exclude settings as maven-dependency-plugin -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

27
src/site/site.xml Normal file
View File

@ -0,0 +1,27 @@
<project name="${project.name}">
<publishDate position="left"/>
<version position="left"/>
<body>
<links>
<item name="Sisu" href="http://eclipse.org/sisu/"/>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
</menu>
<menu ref="reports"/>
</body>
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.3.0</version>
</skin>
<custom>
<fluidoSkin>
<topBarEnabled>true</topBarEnabled>
<sideBarEnabled>false</sideBarEnabled>
</fluidoSkin>
</custom>
</project>