You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by hu...@apache.org on 2009/10/01 19:19:21 UTC
svn commit: r820722 [1/8] - in /incubator/aries/contrib: ./ ibm/
ibm/aries.image/ ibm/build/ ibm/build/buildtasks/ ibm/build/buildtasks/src/
ibm/build/buildtasks/src/com/ ibm/build/buildtasks/src/com/ibm/
ibm/build/buildtasks/src/com/ibm/aries/ ibm/bui...
Author: hughesj
Date: Thu Oct 1 17:19:13 2009
New Revision: 820722
URL: http://svn.apache.org/viewvc?rev=820722&view=rev
Log:
Initial contribution to Apache Aries from IBM. Please see contrib/ibm/README for details.
Added:
incubator/aries/contrib/
incubator/aries/contrib/ibm/
incubator/aries/contrib/ibm/LICENSE
incubator/aries/contrib/ibm/README
incubator/aries/contrib/ibm/aries.image/
incubator/aries/contrib/ibm/aries.image/.aries
incubator/aries/contrib/ibm/aries.image/.project
incubator/aries/contrib/ibm/aries.image/build.xml
incubator/aries/contrib/ibm/build/
incubator/aries/contrib/ibm/build/.aries
incubator/aries/contrib/ibm/build/.classpath
incubator/aries/contrib/ibm/build/.project
incubator/aries/contrib/ibm/build/build-aries.xml
incubator/aries/contrib/ibm/build/build-common.xml
incubator/aries/contrib/ibm/build/build-findbugs.xml
incubator/aries/contrib/ibm/build/build-unittest.xml
incubator/aries/contrib/ibm/build/buildtasks/
incubator/aries/contrib/ibm/build/buildtasks/build.xml
incubator/aries/contrib/ibm/build/buildtasks/src/
incubator/aries/contrib/ibm/build/buildtasks/src/com/
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/BuildProjects.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/FindImage.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ForEach.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/GenerateClassPath.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/If.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/RegExp.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ValidateClassPath.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ValidateProject.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/buildtasks.properties
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/AbstractDependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/Dependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/DirectoryDependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/IgnoreList.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/JarDependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/OSGiDependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/ProjectClassPath.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/ProjectClassPathManager.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/ProjectDependency.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/Version.java
incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/classpath/VersionMatch.java
incubator/aries/contrib/ibm/build/imports/
incubator/aries/contrib/ibm/build/imports/begin.xml
incubator/aries/contrib/ibm/build/imports/clean.xml
incubator/aries/contrib/ibm/build/imports/compile.xml
incubator/aries/contrib/ibm/build/imports/download.xml
incubator/aries/contrib/ibm/build/imports/findbugs.xml
incubator/aries/contrib/ibm/build/imports/package.xml
incubator/aries/contrib/ibm/build/imports/publish.xml
incubator/aries/contrib/ibm/build/imports/standard_imports.xml
incubator/aries/contrib/ibm/build/imports/standard_properties.xml
incubator/aries/contrib/ibm/build/imports/standard_targets.xml
incubator/aries/contrib/ibm/build/imports/unittest.xml
incubator/aries/contrib/ibm/build/imports/unittest_std_props.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/.aries
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/.classpath
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/.project
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/build.properties
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/build.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/services/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/services/ServiceHelper.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/Activator.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/OsgiURLContextFactory.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/ServiceRegistryContext.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/ServiceRegistryName.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/url/ServiceRegistryNameParser.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/url/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/url/ServiceHelperTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/url/ServiceRegistryContextTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/url/ServiceRegistryNameParserTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/.aries
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/.classpath
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/.fbprefs
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/.project
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/build.properties
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/build.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/findbugs.exclude.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/Constants.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/ContextHelper.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/DelegateContext.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/DelegateContextFactory.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/OSGiInitialContextFactoryBuilder.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/OSGiObjectFactoryBuilder.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/startup/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/startup/Activator.java
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/
incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/ObjectFactoryTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/.aries
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/.classpath
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/.project
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/build.properties
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/build.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/provider/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/provider/PersistenceProviderFactory.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/provider/PersistenceProviderManager.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/start/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/start/Activator.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/PersistenceBundleManager.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/PersistenceUnitImpl.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/parsing/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/parsing/EarlyParserReturn.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/parsing/JPAHandler.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/unit/parsing/SchemaLocatingHandler.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/util/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/util/PersistenceBundleHelper.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/com/ibm/osgi/jpa/util/PersistenceLocationData.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/org/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/org/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/org/osgi/service/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/org/osgi/service/jpa/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/src/org/osgi/service/jpa/PersistenceUnitInfoService.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/test/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/test/ProviderFactoryTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/test/ProviderManagerTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/unit/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/unit/manager/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/unit/manager/test/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/unit/manager/test/PersistenceBundleLifecycleTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/com/ibm/osgi/jpa/unit/manager/test/PersistenceXMLParsingTest.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/no/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/no/such/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/no/such/Provider.java
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/MockProvider/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/MockProvider/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/MockProvider/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/MockProvider/META-INF/services/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/MockProvider/META-INF/services/javax.persistence.spi.PersistenceProvider
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file1/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file1/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file1/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file10/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file10/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file10/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file11/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file11/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file11/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file12/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file12/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file12/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file13/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file13/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file13/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file14/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file14/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file14/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file15/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file15/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file15/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file16/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file16/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file16/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file17/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file17/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file17/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file18/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file18/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file18/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file19/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file19/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file19/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file2/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file2/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file2/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file20/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file20/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file20/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file3/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file3/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file3/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file4/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file4/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file4/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file5/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file5/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file5/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file6/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file6/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file6/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file7/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file7/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file7/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file8/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file8/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file8/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file9/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file9/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/file9/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/jarfile/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/jarfile/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.jpa.unit.manager/unittest/resources/jarfile/META-INF/persistence.xml
incubator/aries/contrib/ibm/com.ibm.osgi.utils/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/.aries
incubator/aries/contrib/ibm/com.ibm.osgi.utils/.classpath
incubator/aries/contrib/ibm/com.ibm.osgi.utils/.project
incubator/aries/contrib/ibm/com.ibm.osgi.utils/META-INF/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/com.ibm.osgi.utils/build.properties
incubator/aries/contrib/ibm/com.ibm.osgi.utils/build.xml
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/com/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/com/ibm/osgi/util/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/src/com/ibm/osgi/util/FragmentBuilder.java
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/com/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/com/ibm/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/com/ibm/osgi/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/com/ibm/osgi/util/
incubator/aries/contrib/ibm/com.ibm.osgi.utils/unittest/com/ibm/osgi/util/FragmentUtilsTest.java
incubator/aries/contrib/ibm/prereqs/
incubator/aries/contrib/ibm/prereqs/.aries
incubator/aries/contrib/ibm/prereqs/.classpath
incubator/aries/contrib/ibm/prereqs/.project
incubator/aries/contrib/ibm/prereqs/ant/
incubator/aries/contrib/ibm/prereqs/ant/build.xml
incubator/aries/contrib/ibm/prereqs/build.xml
incubator/aries/contrib/ibm/prereqs/findbugs/
incubator/aries/contrib/ibm/prereqs/findbugs/build.xml
incubator/aries/contrib/ibm/prereqs/junit/
incubator/aries/contrib/ibm/prereqs/junit/build.xml
incubator/aries/contrib/ibm/prereqs/objectweb/
incubator/aries/contrib/ibm/prereqs/objectweb/build.xml
incubator/aries/contrib/ibm/prereqs/osgi/
incubator/aries/contrib/ibm/prereqs/osgi/build.xml
incubator/aries/contrib/ibm/prereqs/persistence/
incubator/aries/contrib/ibm/prereqs/persistence/build.xml
incubator/aries/contrib/ibm/unittest.framework/
incubator/aries/contrib/ibm/unittest.framework/.aries
incubator/aries/contrib/ibm/unittest.framework/.classpath
incubator/aries/contrib/ibm/unittest.framework/.fbprefs
incubator/aries/contrib/ibm/unittest.framework/.project
incubator/aries/contrib/ibm/unittest.framework/META-INF/
incubator/aries/contrib/ibm/unittest.framework/META-INF/MANIFEST.MF
incubator/aries/contrib/ibm/unittest.framework/build.xml
incubator/aries/contrib/ibm/unittest.framework/findbugs.exclude.xml
incubator/aries/contrib/ibm/unittest.framework/src/
incubator/aries/contrib/ibm/unittest.framework/src/com/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/junit/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/junit/Assert.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/DefaultInvocationHandler.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/DefaultMethodCallHandlers.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/DefaultReturnTypeHandlers.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/ExceptionListener.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/MethodCall.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/MethodCallHandler.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/ReturnTypeHandler.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/Skeleton.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/annotations/
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/annotations/InjectSkeleton.java
incubator/aries/contrib/ibm/unittest.framework/src/com/ibm/aries/unittest/mocks/annotations/Singleton.java
incubator/aries/contrib/ibm/unittest.framework/src/mocks/
incubator/aries/contrib/ibm/unittest.framework/src/mocks/BundleContextMock.java
incubator/aries/contrib/ibm/unittest.framework/src/mocks/BundleMock.java
incubator/aries/contrib/ibm/unittest.framework/src/mocks/MockInitialContextFactoryBuilder.java
Added: incubator/aries/contrib/ibm/LICENSE
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/LICENSE?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/LICENSE (added)
+++ incubator/aries/contrib/ibm/LICENSE Thu Oct 1 17:19:13 2009
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) 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. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
Added: incubator/aries/contrib/ibm/README
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/README?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/README (added)
+++ incubator/aries/contrib/ibm/README Thu Oct 1 17:19:13 2009
@@ -0,0 +1,147 @@
+Understanding the packages and how to build them
+------------------------------------------------
+
+Note: at the time of writing these packages are named 'com.ibm.*'. This naming
+needs to be changed and this file should be updated at the same time.
+
+Quickstart
+----------
+
+Ensure you are using a Java 6 JDK.
+
+To build the code without running the unit tests:
+ cd build
+ ant -DbuildLabel=SNAPSHOT -f build-aries.xml
+
+To subsequently run the unit tests and findbugs, do:
+ cd ../unittest.framework
+ ant
+ cd ../build
+ ant -DbuildLabel=SNAPSHOT -f build-aries.xml build-aries-full
+
+
+Build system
+------------
+
+1) aries.image
+2) build
+3) prereqs
+
+These three projects comprise the build system used to compile, test & package
+the other components included.
+
+The prereqs project is responsible for obtaining the prereq libraries required
+for the build. It checks if a download is required, and if so obtains the
+appropriate archive, unpacks it, transforms it if required.
+
+The build project provides a number of custom ant tasks, and a top level
+'build-aries.xml'. The build uses the custom ant tasks to enable ant to build
+using the metadata managed by eclipse for each project. In addition,
+they coordinate the execution of the unit-tests, and the execution of findbugs.
+
+If developing using eclipse, set a java6 jdk, import all the projects, run
+the prereqs/build.xml as an ant task, set the Plug-in Development Target
+Platform to be the prereqs/osgi/lib directory (should show 3 plugins), after
+which all projects should be showing without errors, (if not sometimes an
+eclipse clean/rebuild is required).
+Then build/build-aries.xml can be run as an ant task, or run with the modified
+target build-aries-full to perform unit tests and findbugs.
+
+Unittest & findbug reports can be found per project within
+{project}/build/reports.
+
+For a successful build, output is stored within aries.image/output
+
+
+
+Unit test
+---------
+
+1) unittest.framework
+
+A collection of related unit test code, to allow construction of various Mock
+objects during unit testing.
+
+
+
+RFC142 implementation
+---------------------
+
+1) com.ibm.osgi.jndi
+
+This bundle provides the integration layer between JNDI and the service
+registry. At runtime it installs an InitialContextFactoryBuilder and an
+ObjectFactoryBuilder that, through appropriate proxying, will trap all requests
+for InitialContext, URLContext and ObjectFactory objects.
+This allows other bundles to publish InitialContextFactory,
+InitialContextFactoryBuilder, ObjectFactory and ObjectFactory in the service
+registry for them to be used to serve JNDI requests.
+
+2) com.ibm.osgi.jndi.url
+
+This bundle implements the osgi:services/ (or equivalently aries:services/)
+namespace handler through an ObjectFactory that is published into the service
+registry (to be picked up from there by the first bundle). This namespace
+provides the reverse integration allowing JNDI clients to access services
+published in the OSGi service registry through a JNDI lookup.
+
+
+
+RFC143 related components
+-------------------------
+
+1) com.ibm.osgi.jpa.unit.manager
+
+This project contains an incomplete implementation of RFC143. The code
+contained in the packages of this project form together to create a bundle that
+manages persistence providers and persistence bundles (bundles which contain
+persistence.xml files). The persistence provider manager is responsible for
+registering persistence provider implementations into the osgi service
+registry.
+The persistence bundle manager is responsible for associating the persistence
+bundle with a persistence provider and for registering services representing
+the persistence units contained within the persistence.xml files.
+The services registered could then be used to create a simple JPA container.
+
+2) com.ibm.osgi.utils
+
+This package contains a FragmentBuilder utility class that can be used for
+creating fragments to attach to bundles Application manifest processing
+
+
+
+Application manifest processing
+-------------------------------
+
+1) com.ibm.ws.eba.app.utils
+
+A small API for accessing Application.mf files, which are intended to represent
+meta information about applications that may consist of multiple versioned
+bundles.
+
+The meta information includes the Applications Symbolic Name, Version, Name,
+Application Content, Service Imports/Exports, and application scope.
+
+API provides typed objects representing the various components of an
+application.mf, with a parser that can read from a supplied Manifest.
+
+
+
+RFC66 related components
+------------------------
+
+1) com.ibm.osgi.web
+
+This component contains the source code related to the conversion of WAR files
+to WAB files. It provides a URLSchemeHandler that implements the URL scheme
+detailed in the RFC66 specification, allowing the conversion of a war file via
+the url stream to the war location. It also provides various helper methods to
+aid in manifest re-writing and general war to wab conversion.
+The specification for this code is described in section 5.2 of the RFC66
+specification.
+
+
+
+
+
+
Added: incubator/aries/contrib/ibm/aries.image/.aries
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/aries.image/.aries?rev=820722&view=auto
==============================================================================
(empty)
Added: incubator/aries/contrib/ibm/aries.image/.project
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/aries.image/.project?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/aries.image/.project (added)
+++ incubator/aries/contrib/ibm/aries.image/.project Thu Oct 1 17:19:13 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>aries.image</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: incubator/aries/contrib/ibm/aries.image/build.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/aries.image/build.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/aries.image/build.xml (added)
+++ incubator/aries/contrib/ibm/aries.image/build.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,19 @@
+<project name="aries.image" default="build">
+ <import file="../build/imports/begin.xml"/>
+
+ <property name="file.to.upload" value="aries-${buildLabel}.zip"/>
+ <property name="file.label" value="Aries"/>
+
+ <target name="build" depends="zip"/>
+
+ <target name="zip">
+ <mkdir dir="output"/>
+ <mkdir dir="waslib"/>
+ <zip destfile="output/${file.to.upload}">
+ <zipfileset dir="lib" includes="*.jar" prefix="alpine/aries"/>
+ <zipfileset dir="waslib" includes="*.jar" prefix="alpine/aries"/>
+ </zip>
+ </target>
+
+ <target name="unittest"/>
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/.aries
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/.aries?rev=820722&view=auto
==============================================================================
(empty)
Added: incubator/aries/contrib/ibm/build/.classpath
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/.classpath?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/.classpath (added)
+++ incubator/aries/contrib/ibm/build/.classpath Thu Oct 1 17:19:13 2009
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="buildtasks/src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/prereqs"/>
+ <classpathentry kind="lib" path="/prereqs/ant/apache-ant-1.7.1/lib/ant.jar"/>
+ <classpathentry kind="lib" path="/prereqs/ant/apache-ant-1.7.1/lib/ant-commons-net.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: incubator/aries/contrib/ibm/build/.project
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/.project?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/.project (added)
+++ incubator/aries/contrib/ibm/build/.project Thu Oct 1 17:19:13 2009
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>build</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: incubator/aries/contrib/ibm/build/build-aries.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/build-aries.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/build-aries.xml (added)
+++ incubator/aries/contrib/ibm/build/build-aries.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,35 @@
+<!-- (C) Copyright IBM Corp. 2009 -->
+
+<project name="build-aries" default="build-aries">
+ <import file="build-common.xml"/>
+ <import file="build-unittest.xml"/>
+ <import file="build-findbugs.xml"/>
+ <target name="build-aries" depends="ant_prereq, buildtasks, prereqs, aries, aries.image" />
+ <target name="build-aries-full" depends="build-aries, unittest, findbugs"/>
+
+ <!-- Build all projects except "build" (because that's the current project and we'd get into an infinite
+ loop!), "unittest.framework", "prereqs" (because it's already been built) and any of the image projects
+ (they're going to get built separately once all the other projects are complete because they are
+ dependant upon the other projects being built first because they package up their output).
+ -->
+ <target name="aries">
+ <taskdef resource="com/ibm/aries/buildtasks/buildtasks.properties" classpath="build/lib/buildtasks.jar"/>
+ <buildProjects target="build" baseDir="${basedir}/.." property="projects.we.built">
+ <include name="*"/>
+ <exclude name="unittest.framework"/>
+ <exclude name="build"/>
+ <exclude name="prereqs"/>
+ <exclude name="*.image"/>
+ <property name="build.type" value="build"/>
+ <property name="labelPrefix" value="Building: "/>
+ </buildProjects>
+ </target>
+
+ <target name="aries.image">
+ <!-- TODO work out if I can do a sub-ant for these -->
+ <ant dir="../aries.image/" target="build" inheritall="true">
+ <property name="labelPrefix" value="Image: " />
+ </ant>
+ </target>
+
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/build-common.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/build-common.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/build-common.xml (added)
+++ incubator/aries/contrib/ibm/build/build-common.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,33 @@
+<!-- (C) Copyright IBM Corp. 2009 -->
+
+<project name="build-init" default="refresh">
+ <target name="refresh" description="This build task makes sure the build tasks are rebuilt, and prereqs are checked"
+ depends="ant_prereq, buildtasks, prereqs" />
+
+ <target name="ant_prereq">
+ <condition property="ant.download.dir" value="../download/ant">
+ <not>
+ <isset property="download.root"/>
+ </not>
+ </condition>
+
+ <condition property="ant.download.dir" value="${download.root}/ant/">
+ <isset property="download.root"/>
+ </condition>
+
+ <ant antfile="build.xml" dir="../prereqs/ant" target="copy" inheritall="true">
+ <property name="download.dir" value="${ant.download.dir}"/>
+ <property name="labelPrefix" value="Building: "/>
+ </ant>
+ </target>
+
+ <target name="prereqs">
+ <ant antfile="build.xml" dir="../prereqs" target="build" inheritall="true">
+ <property name="labelPrefix" value="Building: "/>
+ </ant>
+ </target>
+ <target name="buildtasks">
+ <ant antfile="build.xml" dir="buildtasks" target="build" inheritall="false" />
+ </target>
+
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/build-findbugs.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/build-findbugs.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/build-findbugs.xml (added)
+++ incubator/aries/contrib/ibm/build/build-findbugs.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,12 @@
+<!-- (C) Copyright IBM Corp. 2009 -->
+
+<project name="build-findbugs">
+ <target name="findbugs">
+ <taskdef name="buildProjects" classname="com.ibm.aries.buildtasks.BuildProjects" classpath="build/lib/buildtasks.jar"/>
+ <buildProjects target="findbugs" baseDir="${basedir}/.." includes="${projects.we.built}">
+ <property name="build.type" value="unittest"/>
+ <property name="labelPrefix" value="Findbugs: "/>
+ <dirExists dir="src"/>
+ </buildProjects>
+ </target>
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/build-unittest.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/build-unittest.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/build-unittest.xml (added)
+++ incubator/aries/contrib/ibm/build/build-unittest.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,14 @@
+<!-- (C) Copyright IBM Corp. 2009 -->
+
+<project name="build-unittest">
+ <target name="unittest" unless="production.build">
+ <echo message="Projects to run unittests against ${projects.we.built}"/>
+
+ <taskdef name="buildProjects" classname="com.ibm.aries.buildtasks.BuildProjects" classpath="build/lib/buildtasks.jar"/>
+ <buildProjects target="unittest" includes="${projects.we.built}">
+ <property name="build.type" value="unittest"/>
+ <property name="labelPrefix" value="Unittesting: "/>
+ </buildProjects>
+ </target>
+
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/build.xml
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/build.xml?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/build.xml (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/build.xml Thu Oct 1 17:19:13 2009
@@ -0,0 +1,17 @@
+<!-- (C) Copyright IBM Corp. 2009 -->
+
+<project name="buildtasks" default="build" basedir=".">
+ <echo message="${basedir}"/>
+ <property name="build.dir" value="../build"/>
+ <property name="lib.dir" value="../build/lib"/>
+ <target name="compile">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${classes.dir}" />
+ <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${basedir}/../../prereqs/ant/apache-ant-1.7.1/lib/ant.jar:${basedir}/../../prereqs/ant/apache-ant-1.7.1/lib/ant-commons-net.jar" debuglevel="${javac.debug.level}" includeAntRuntime="no" debug="true"/>
+ </target>
+
+ <target name="build" depends="compile,package"/>
+
+ <import file="../imports/clean.xml"/>
+ <import file="../imports/package.xml" />
+</project>
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/BuildProjects.java
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/BuildProjects.java?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/BuildProjects.java (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/BuildProjects.java Thu Oct 1 17:19:13 2009
@@ -0,0 +1,413 @@
+/*
+ * (C) Copyright IBM Corp. 2009
+ */
+package com.ibm.aries.buildtasks;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Ant;
+import org.apache.tools.ant.taskdefs.Property;
+import org.apache.tools.ant.types.PatternSet;
+import org.apache.tools.ant.types.PatternSet.NameEntry;
+import org.apache.tools.ant.types.selectors.SelectorUtils;
+
+import com.ibm.aries.buildtasks.classpath.ProjectClassPath;
+import com.ibm.aries.buildtasks.classpath.ProjectClassPathManager;
+
+/**
+ * <p>This build task builds a set of components identified by the imports and
+ * exports and then builds them in the correct order. That is order is determined
+ * by inspecting the dependencies specified in the .classpath file.
+ * </p>
+ */
+public class BuildProjects extends Task
+{
+ /** The default target to invoke if no target is specified */
+ private String _target = "build";
+ /** The default basedir to use (parent of the current component) when building */
+ private File _baseDir;
+ /** The pattern set containing the includes and excludes */
+ private PatternSet _set = new PatternSet();
+ /** The name of the build file in each project */
+ private String _fileName = "build.xml";
+ /** A set of properties to pass to each project */
+ private Set<Property> _props = new HashSet<Property>();
+ /** The name of a property to set with the projects that were built */
+ private String _propName;
+ /** A list of checks to perform to see if a project should be built */
+ private List<ProjectBuildRule> _rules = new ArrayList<ProjectBuildRule>();
+
+ /**
+ * An interface for build rules, so we can have lots
+ */
+ private interface ProjectBuildRule
+ {
+ /**
+ * @param baseDir the component directory
+ * @return true if the rule passes and the build should work
+ */
+ public boolean test(File baseDir);
+ }
+
+ /**
+ * A check that allows a project to build if and only if a directory exists.
+ */
+ public final static class DirExistsBuildRule implements ProjectBuildRule
+ {
+ /** The dir to look for */
+ private String dirToCheck;
+
+ public boolean test(File baseDir)
+ {
+ return new File(baseDir, dirToCheck).exists();
+ }
+
+ public void setDir(String dir)
+ {
+ dirToCheck = dir;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "does not have a directory called " + dirToCheck;
+ }
+ }
+
+ @Override
+ public void execute()
+ {
+ try{
+ internalExecute();
+ }catch(RuntimeException t){
+ t.printStackTrace();
+ throw t;
+ }
+ }
+ private void internalExecute()
+ {
+ if (_baseDir == null)
+ {
+ String baseDir = getProject().getProperty("basedir");
+ if (baseDir == null)
+ {
+ _baseDir = new File("..");
+ }
+ else
+ {
+ _baseDir = new File(baseDir, "..");
+ }
+ }
+
+ // Get an array of all the directories under the basedir
+ File[] files = _baseDir.listFiles(new FileFilter()
+ {
+ public boolean accept(File pathname)
+ {
+ if (pathname.isDirectory() && !!!pathname.getName().startsWith(".")) {
+ if (!!!new File(pathname, _fileName).exists() ) {
+ log("Skipping the component " + pathname.getName() + " because it does not have a " + _fileName + ".");
+ } else if (!!!new File(pathname, ".aries").exists()) {
+ log("Skipping the component " + pathname.getName() + " because it is not an Aries component.");
+ } else {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ });
+
+ // get the list of includes
+ String[] includes = _set.getIncludePatterns(getProject());
+ // and the list of excludes
+ String[] excludes = _set.getExcludePatterns(getProject());
+
+ // A list of Files that represent the directory a build component is in
+ List<File> projectDir = new ArrayList<File>();
+ // A list of components that are to be built
+ List<String> projectsToBuild = new ArrayList<String>();
+
+ // loop around the directories in the base directory
+ files: for (int i = 0; i < files.length; i++)
+ {
+ if (excludes != null)
+ {
+ // go through the excludes list
+ for (int j = 0; j < excludes.length; j++)
+ {
+ // if the component matches an exclude continue the main loop
+ if (SelectorUtils.match(excludes[j], files[i].getName()))
+ {
+ log("Removing excluded component: " + files[i].getName());
+ continue files;
+ }
+ }
+ }
+
+ if (includes != null)
+ {
+ // go through the includes list
+ for (int j = 0; j < includes.length; j++)
+ {
+ // if the project matches an include then
+ if (SelectorUtils.match(includes[j], files[i].getName()))
+ {
+ boolean add = true;
+ if (!!!_rules.isEmpty()) {
+ for (ProjectBuildRule rule : _rules) {
+ if (!!!rule.test(files[i])) {
+ log("Skipping the component: " + files[i].getName() + " as it " + rule + ".");
+ add = false;
+ break;
+ }
+ }
+ }
+
+ if (add) {
+ // add the file to the list of project directories to be build
+ projectDir.add(files[i]);
+ // add the project name to the list of projects to build
+ projectsToBuild.add(files[i].getName());
+ }
+ }
+ }
+ }
+ }
+
+ StringBuilder projectsAsString = new StringBuilder(projectsToBuild.toString());
+ projectsAsString.deleteCharAt(0);
+ projectsAsString.deleteCharAt(projectsAsString.length() - 1);
+
+ List<String> projectClassPaths = new ArrayList<String>(projectsToBuild);
+
+ if (_propName != null)
+ {
+ String propertyValue = getProject().getProperty(_propName);
+
+ if (propertyValue != null && propertyValue.length() > 0) {
+ String[] alreadyBuilt = propertyValue.split(",");
+
+ for (String projectName : alreadyBuilt)
+ {
+ projectClassPaths.add(projectName.trim());
+ }
+
+ projectsAsString.append(',');
+ projectsAsString.append(propertyValue);
+ }
+
+ getProject().setProperty(_propName, projectsAsString.toString());
+ }
+
+ getProject().setProperty("aries.projects.we.are.building", projectsAsString.toString());
+
+ // a list of projects that have been built
+ List<String> builtProjects = new ArrayList<String>();
+
+ int sizeOfCompListBefore;
+ int sizeOfCompListAfter;
+
+ // output the name of all projects to be built
+ log("Building projects " + projectsToBuild);
+
+ ProjectClassPathManager.initClasspaths();
+
+ do
+ {
+ // store away the number of projects left to build
+ sizeOfCompListBefore = projectDir.size();
+
+ Iterator<File> fileIterator = projectDir.iterator();
+
+ // loop around the projects
+ while (fileIterator.hasNext())
+ {
+ File comp = fileIterator.next();
+ // and its name
+ String compName = comp.getName();
+
+ // if the project directory exists
+ if (comp.exists())
+ {
+ // if the project has been built then continue to the next one.
+ if (builtProjects.contains(compName)) continue;
+
+ // get the class-path for the project
+ ProjectClassPath cp = ProjectClassPathManager.getClassPath(compName);
+ // get the projects it depends on
+ Set<String> projectDependencies = cp.getProjectDependencies();
+ // remove from the project dependencies all the built projects
+ projectDependencies.removeAll(builtProjects);
+ // and ditch anything that isn't to be built (assumption is it has already been build
+ projectDependencies.retainAll(projectsToBuild);
+
+ // if the project dependencies is empty build it
+ if (projectDependencies.isEmpty())
+ {
+ long startTime = System.currentTimeMillis();
+ // log that we are starting to build a project
+ log("Starting build of project " + compName);
+
+ // create a new ant task
+ Ant ant = new Ant();
+ // set the directory the build is in (the project dir)
+ ant.setDir(comp);
+ // set the ant file to build.
+ ant.setAntfile(_fileName);
+ // set the target name
+ ant.setTarget(_target);
+ // set the project to be this project
+ ant.setProject(getProject());
+ ant.init();
+ // TODO this will cause the property to be defined here and there.
+ for (Property prop : _props) {
+ ant.getProject().setProperty(prop.getName(), prop.getValue());
+ }
+
+ // execute the build
+ ant.execute();
+
+ log("Finished build of project " + compName + " in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds.");
+
+ // mark the project as having been built
+ builtProjects.add(compName);
+ // remove the project from the list of projects to build
+ fileIterator.remove();
+ }
+ }
+ else
+ {
+ log("The component " + compName + " cannot be built");
+ }
+ }
+ // work out how many projects are left to be built
+ sizeOfCompListAfter = projectDir.size();
+ }
+ // if the number of projects to build has dropped go round the loop again
+ while (sizeOfCompListBefore > sizeOfCompListAfter);
+
+ // if the list of projects to build is not empty something was not built
+ // so output a list of projects that could not be built
+ if (!projectDir.isEmpty())
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("It was not possible to build the components [");
+
+ Iterator<File> it = projectDir.iterator();
+
+ while (it.hasNext())
+ {
+ File f = it.next();
+
+ buffer.append(f.getName());
+ if (it.hasNext()) buffer.append(", ");
+
+ }
+ buffer.append("]\r\n");
+
+ log(buffer.toString());
+ }
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* createInclude method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * @return NameEntry to contain the include
+ */
+ public NameEntry createInclude()
+ {
+ return _set.createInclude();
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* createExclude method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * @return NameEntry to contain the exclude
+ */
+ public NameEntry createExclude()
+ {
+ return _set.createExclude();
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* setTarget method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * This method sets the value of _target
+ *
+ * @param desiredTarget The target to set.
+ */
+ public void setTarget(String desiredTarget)
+ {
+ _target = desiredTarget;
+ }
+
+ /**
+ * The name of the build.xml file to look for.
+ *
+ * @param buildFileName the build file name.
+ */
+ public void setBuildFile(String buildFileName)
+ {
+ _fileName = buildFileName;
+ }
+
+ /**
+ * Allows ant to have property as a sub-element.
+ *
+ * @return a new property.
+ */
+ public Property createProperty()
+ {
+ Property prop = new Property();
+
+ _props.add(prop);
+
+ return prop;
+ }
+
+ /**
+ * Allows the invoker to ensure a directory in the project exists for it
+ * to build.
+ *
+ * @return a dir check rule.
+ */
+ public ProjectBuildRule createDirExists()
+ {
+ ProjectBuildRule rule = new DirExistsBuildRule();
+
+ _rules.add(rule);
+
+ return rule;
+ }
+
+ public final void setBaseDir(File dir)
+ {
+ _baseDir = dir;
+ }
+
+ public final void setIncludes(String projectIncludes)
+ {
+ String[] includes = projectIncludes.split(",");
+
+ for (String include : includes) {
+ NameEntry entry = createInclude();
+ entry.setName(include.trim());
+ }
+ }
+
+ public final void setProperty(String propertyName)
+ {
+ _propName = propertyName;
+ }
+}
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/FindImage.java
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/FindImage.java?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/FindImage.java (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/FindImage.java Thu Oct 1 17:19:13 2009
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright IBM Corp. 2009
+ */
+package com.ibm.aries.buildtasks;
+
+import java.util.Map;
+
+import org.apache.tools.ant.Task;
+
+/**
+ * This task looks for a property that identifies an image component. It does
+ * this by looking for properties that end in .image and using the property
+ * name as the image. It then sets a property with the image name.
+ */
+public class FindImage extends Task
+{
+ /** The property to set with the image property name. */
+ private String imagePropName = "image.project";
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void execute()
+ {
+ StringBuilder buffer = new StringBuilder();
+ Map<String, String> props = getProject().getProperties();
+
+ for (String propName : props.keySet()) {
+ if (propName.endsWith(".image")) {
+ buffer.append(propName);
+ buffer.append(",");
+ }
+ }
+
+ if (buffer.length() > 1) {
+ buffer.deleteCharAt(buffer.length() - 1);
+ getProject().setProperty(imagePropName, buffer.toString());
+ }
+ }
+
+ /**
+ * @param propName the name of the property to set.
+ */
+ public void setImageName(String propName)
+ {
+ this.imagePropName = propName;
+ }
+}
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ForEach.java
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ForEach.java?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ForEach.java (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/ForEach.java Thu Oct 1 17:19:13 2009
@@ -0,0 +1,261 @@
+/*
+ * (C) Copyright IBM Corp. 2009
+ */
+package com.ibm.aries.buildtasks;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.PropertyHelper;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.TaskContainer;
+
+/**
+ * This task implements a for each loop. Properties set inside the loop
+ * are only valid for that iteration of the loop. Properties set inside
+ * the loop are obtained using @{propertyName} rather than ${propertyName}.
+ * ${propertyName} still works for properties defined outside of the scope
+ * of the foreach task. This allows the following attributes:
+ *
+ * <dl>
+ * <dt>in</dt><dd>This parameter is either the name of a reference in the project that
+ * contains an Iterable, or a comma separated string. If a reference
+ * exists with the name then that is used in preference to parsing the
+ * string.</dd>
+ * <dt>param</dt><dd>This specifies the name of the property the for loop will set the current
+ * entry in the list with. So if this were <i>var</i> then <i>@{var}</i> can
+ * be used inside the loop to access the current element.</dd>
+ * </dl>
+ */
+public class ForEach extends Task implements TaskContainer
+{
+ /** The param name */
+ private String _param;
+ /** The reference name or list to iterate over */
+ private String _list;
+ /** The list of tasks inside the for loop */
+ private List<Task> _tasks = new ArrayList<Task>();
+
+ /**
+ * This subclass exists to ensure that we can have properties scoped within
+ * the for loop that are not visible outside. This is so a property defined
+ * in one iteration does not prevent the subsequent iterations from defining
+ * a property with the same name.
+ *
+ * <p>This class uses <pre>@{param}</pre> for properties defined to it, rather than ${}
+ * </p>
+ */
+ private static class ForEachPropertyHelper extends PropertyHelper
+ {
+ /** The pattern for finding properties */
+ private Pattern _pattern = Pattern.compile("(?:(.*?)\\@\\{(.*?)\\}.*?)");
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void parsePropertyString(String arg0, Vector arg1, Vector arg2)
+ throws BuildException
+ {
+ // create a matcher.
+ Matcher matches = _pattern.matcher(arg0);
+
+ List<String> firstPassString = new ArrayList<String>();
+ List<String> firstPassVars = new ArrayList<String>();
+
+ int index = 0;
+ // loop around each match we can find
+ for (; matches.find(index); index = matches.end(matches.groupCount()) + 1)
+ {
+ // then loop around the matches in this iteration
+ for (int i = 1; i <= matches.groupCount(); i++)
+ {
+ String group = matches.group(i);
+
+ // if we get the empty string we just ignore it and move on.
+ if (!!!"".equals(group))
+ {
+ // if the string is at an even index then it is a parameter, rather
+ // than a property. This is because the regexp looks for a string
+ // prior to the ${} bit. Also the zero index is the whole match, so
+ // this is 1 based not 2.
+ if (i % 2 == 0)
+ {
+ // we are doing variable expansion so:
+ // add a null into the first list to indicate a parameter is here
+ firstPassString.add(null);
+ // add the variable name to the second list
+ firstPassVars.add(group);
+ }
+ else
+ {
+ // add the string to the first list, we have no variable expansion here.
+ firstPassString.add(group);
+ }
+ }
+ }
+ }
+
+ // if the index is less than the string length then we have some non-matching
+ // tail characters, so we add this to the list of strings.
+ if (index < arg0.length())
+ {
+ firstPassString.add(arg0.substring(index));
+ }
+
+ // now we need to sort out the processing for ${} stuff. So to do this we get
+ // each string from the firstPassString list and process it for ${} stuff.
+ for (int strCount = 0, varCount = 0; strCount < firstPassString.size(); strCount++)
+ {
+ // create second pass vectors
+ Vector secondPassStr = new Vector();
+ Vector secondPassVars = new Vector();
+
+ // get the first string
+ String str = firstPassString.get(strCount);
+
+ if (str != null)
+ {
+ // if it was not null we call the super classes parsePropertyString
+ super.parsePropertyString(str, secondPassStr, secondPassVars);
+
+ // if the secondPassStr array is of length 1 and secondPassVars is empty we have
+ // no properties, so just copy the string into the first array.
+ if (secondPassStr.size() == 1 && secondPassVars.isEmpty()) arg1.add(str);
+ else
+ {
+ // otherwise copy into the final arrays all the second pass lists.
+ arg1.addAll(secondPassStr);
+ arg2.addAll(secondPassVars);
+ }
+ }
+ else
+ {
+ // otherwise we copy a property into the second array.
+ arg1.add(null);
+ arg2.add(firstPassVars.get(varCount++));
+ }
+ }
+ }
+
+ /**
+ * The default getProperty method should be capable of handing the chaining,
+ * but it doesn't so we override and implement the chaining properly.
+ */
+ @Override
+ public Object getProperty(String ns, String name)
+ {
+ // get a property from this PropertyHelper
+ Object value = super.getProperty(ns, name);
+
+ // if it is null and we have a next helper then call it to get the property
+ if (value == null && getNext() != null) value = getNext().getProperty(ns, name);
+
+ return value;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public String replaceProperties(String arg0, String arg1, Hashtable arg2) throws BuildException
+ {
+ if (arg1.contains("@{")) {
+ arg1 += "${some.really.long.property.name.that.wont.exist.and.is.internal.to.me}";
+ }
+
+ String result = super.replaceProperties(arg0, arg1, arg2);
+
+ return result.replaceAll("\\$\\{some.really.long.property.name.that.wont.exist.and.is.internal.to.me\\}", "");
+ }
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* setParam method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * @param paramName the property name
+ */
+ public void setParam(String paramName)
+ {
+ _param = paramName;
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* setIn method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * @param list the list to iterate over.
+ */
+ public void setIn(String list)
+ {
+ _list = list;
+ }
+
+ @Override
+ public void execute()
+ {
+ if (_list == null || _list.trim().length() == 0) {
+ // there is nothing to iterate over, so skip.
+ return;
+ }
+
+ // first off look to see if we have a reference with the name specified on the in attribute.
+ Object listObject = getProject().getReference(_list);
+
+ Iterable<?> iter;
+ List<String> valueList = new ArrayList<String>();
+ // if we didn't get anything back then we need to split the in value and convert to an Iterable
+ if (listObject == null)
+ {
+ String[] values = _list.split(",");
+ // trim the string
+ for (String value : values) {
+ valueList.add(value.trim());
+ }
+ // iter = Arrays.asList(values);
+ iter = valueList;
+ }
+ else
+ {
+ iter = (Iterable<?>)listObject;
+ }
+
+ // get the default property helper
+ PropertyHelper mainHelper = PropertyHelper.getPropertyHelper(getProject());
+
+ // iterate around the objects in the list
+ for (Object value : iter)
+ {
+ // we do this each time round to ensure we have a fresh properties store for each iteration.
+
+ // create our own and link in the main helper as the next in the chain
+ PropertyHelper loopHelper = new ForEachPropertyHelper();
+
+ loopHelper.setNext(mainHelper);
+ loopHelper.setProject(getProject());
+
+ // override the default property helper (a little cheeky, but necessary) with our one.
+ getProject().addReference("ant.PropertyHelper", loopHelper);
+
+ // set the current value into the properties helper store
+ loopHelper.setProperty(null, _param, String.valueOf(value), false);
+ // now go around all the tasks.
+ for (Task t : _tasks)
+ {
+ // and call perform. We call perform because that ensures the task
+ // is correctly configured, if we called execute horrible things go wrong.
+ t.perform();
+ }
+ }
+
+ // now reset the original project helper.
+ getProject().addReference("ant.PropertyHelper", mainHelper);
+ }
+
+ public void addTask(Task arg0)
+ {
+ _tasks.add(arg0);
+ }
+}
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/GenerateClassPath.java
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/GenerateClassPath.java?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/GenerateClassPath.java (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/GenerateClassPath.java Thu Oct 1 17:19:13 2009
@@ -0,0 +1,160 @@
+/*
+ * (C) Copyright IBM Corp. 2009
+ */
+package com.ibm.aries.buildtasks;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Path;
+
+import com.ibm.aries.buildtasks.classpath.IgnoreList;
+import com.ibm.aries.buildtasks.classpath.ProjectClassPath;
+import com.ibm.aries.buildtasks.classpath.ProjectClassPathManager;
+
+/**
+ * <p>This ant task generates a classpath from the eclipse .classpath
+ * descriptors.
+ * </p>
+ */
+public class GenerateClassPath extends Task
+{
+ public class Exclude
+ {
+ private String _name;
+
+ public void setJar(String name)
+ {
+ _name = name;
+ }
+ }
+
+ /** The pathid to store the generated classpath into */
+ private String _pathId = "project.class.path";
+ /** The pathid to store the unittest classpath into */
+ private String _utPathId = "unittest.class.path";
+ /** The type of class path to generate */
+ private String _type;
+ /** The locations to pick plugins from */
+ private List<File> _pluginDirs = new ArrayList<File>();
+ /** A list of jars to exclude from unittest class path */
+ private List<Exclude> _excludes = new ArrayList<Exclude>();
+
+ /* ------------------------------------------------------------------------ */
+ /* execute method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * This method generates the classpath and stores it away.
+ *
+ * @see org.apache.tools.ant.Task#execute()
+ * @throws BuildException If the build fails.
+ */
+ @Override
+ public void execute() throws BuildException
+ {
+ try {
+ super.execute();
+
+ for (Exclude e : _excludes) {
+ IgnoreList.addExcludedJar(e._name);
+ }
+
+ ProjectClassPathManager.setPluginDirs(_pluginDirs);
+
+ ProjectClassPathManager.initClasspaths();
+
+ // obtain the project classpath
+ ProjectClassPath cp = ProjectClassPathManager.getClassPath(getProject().getName());
+
+ // force us to work out what we depend on.
+ cp.getProjectDependencies();
+
+ if (_type == null || "build".equals(_type)) {
+ // get the path that represents the classpath to build the project
+ Path path = cp.getProjectClassPath(getProject());
+
+ // Register the path as a reference, can be used with classpath references
+ getProject().addReference(_pathId, path);
+ log(path.toString(), Project.MSG_VERBOSE);
+ }
+
+ if (_type == null || "unittest".equals(_type)) {
+ Path utPath = cp.getUnittestClassPath(getProject());
+
+ getProject().addReference(_utPathId, utPath);
+
+ log(utPath.toString(), Project.MSG_VERBOSE);
+ }
+ } catch (BuildException e) {
+ throw e;
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ throw e;
+ }
+
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* setPathId method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * This is so the task can have a pathId attribute to override the normal
+ * path identity. This is not required so if it is not specified then
+ * project.class.path is used instead.
+ *
+ * @param id The path id to register the classpath with.
+ */
+ public void setPathId(String id)
+ {
+ _pathId = id;
+ }
+
+ /* ------------------------------------------------------------------------ */
+ /* setUnittestPathId method
+ /* ------------------------------------------------------------------------ */
+ /**
+ * This is so the task can have a pathId attribute to override the normal
+ * unittest path identity. This is not required so if it is not specified then
+ * unittest.class.path is used instead.
+ *
+ * @param id The path id to register the classpath with.
+ */
+ public void setUnittestPathId(String id)
+ {
+ _utPathId = id;
+ }
+
+ /**
+ * Sets the type of classpath to be generated. Can be build or unittest.
+ *
+ * @param type the type of classpath to generate.
+ */
+ public void setType(String type)
+ {
+ if ("build".equals(type) || "unittest".equals(type))
+ _type = type;
+
+ }
+
+ public void setPluginDirs(Path dirs)
+ {
+ String[] files = dirs.list();
+
+ for (String file : files) {
+ _pluginDirs.add(new File(file));
+ }
+ }
+
+ public Exclude createExclude()
+ {
+ Exclude exclude = new Exclude();
+
+ _excludes.add(exclude);
+
+ return exclude;
+ }
+}
\ No newline at end of file
Added: incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/If.java
URL: http://svn.apache.org/viewvc/incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/If.java?rev=820722&view=auto
==============================================================================
--- incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/If.java (added)
+++ incubator/aries/contrib/ibm/build/buildtasks/src/com/ibm/aries/buildtasks/If.java Thu Oct 1 17:19:13 2009
@@ -0,0 +1,95 @@
+/*
+ * (C) Copyright IBM Corp. 2009
+ */
+package com.ibm.aries.buildtasks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.TaskContainer;
+
+/**
+ * This is a task container that will only be executed if a property is
+ * set.
+ */
+public class If extends Task implements TaskContainer
+{
+ /** The tasks to execute */
+ private List<Task> _tasks = new ArrayList<Task>();
+ /** The property to look for */
+ private String _propName;
+ /** The else clause */
+ private Else elseClause;
+
+ /**
+ * The else sub-element.
+ */
+ public static class Else extends Task implements TaskContainer
+ {
+ /** The tasks to execute */
+ private List<Task> _tasks = new ArrayList<Task>();
+
+ public void addTask(Task arg0)
+ {
+ _tasks.add(arg0);
+ }
+
+ @Override
+ public void execute()
+ {
+ // now go around all the tasks.
+ for (Task t : _tasks)
+ {
+ // and call perform. We call perform because that ensures the task
+ // is correctly configured, if we called execute horrible things go wrong.
+ t.perform();
+ }
+ }
+ }
+
+ @Override
+ public void execute()
+ {
+ // see if the named property is set.
+ if (getProject().getProperty(_propName) != null)
+ {
+ // now go around all the tasks.
+ for (Task t : _tasks)
+ {
+ // and call perform. We call perform because that ensures the task
+ // is correctly configured, if we called execute horrible things go wrong.
+ t.perform();
+ }
+ } else {
+ if(elseClause != null) {
+ elseClause.setProject(getProject());
+ elseClause.perform();
+ }
+ }
+ }
+
+ /**
+ * @param propertyName the property that must be set to execute the sub-tasks.
+ */
+ public void setIf(String propertyName)
+ {
+ _propName = propertyName;
+ }
+
+ /**
+ * @return allows us to do something if the variable is not set.
+ */
+ public Else createElse()
+ {
+ if (elseClause != null) throw new BuildException("The if task only supports a single else task");
+ elseClause = new Else();
+ return elseClause;
+ }
+
+ public void addTask(Task arg0)
+ {
+ _tasks.add(arg0);
+ }
+}
\ No newline at end of file