argeo.osgi.start=\
-org.springframework.osgi.extender,\
-org.argeo.node.repo.jackrabbit,\
-org.argeo.security.dao.os,\
-org.argeo.slc.node.jackrabbit,\
+org.eclipse.equinox.cm,\
+org.argeo.cms,\
+org.eclipse.gemini.blueprint.extender,\
org.argeo.slc.agent,\
org.argeo.slc.agent.jcr,\
-org.argeo.slc.support.equinox,\
-org.argeo.slc.support.maven,\
+
+#org.argeo.slc.support.maven,\
slc.executionModules=org.argeo.slc.demo.ant,\
org.argeo.slc.demo.basic,\
org.argeo.slc.demo.minimal,\
+argeo.node.repo.type=localfs
+
log4j.configuration=file:../../log4j.properties
+
+org.osgi.framework.security=osgi
+java.security.policy=file:../../all.policy
<name>SLC Distribution</name>
<modules>
<module>slc</module>
- <!-- <module>slc-maven</module> -->
+ <module>slc-maven</module>
</modules>
<!-- <profiles> -->
<!-- <profile> -->
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>dist</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>slc-maven</artifactId>
<packaging>pom</packaging>
<dependency>
<groupId>org.argeo.slc</groupId>
<artifactId>org.argeo.slc.support.maven</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.argeo.slc</groupId>
<artifactId>org.argeo.slc.lib.build</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
</dependency>
</dependencies>
<profiles>
</mapping>
</mappings>
<requires>
- <require>slc-libs</require>
+ <require>slc-platform</require>
</requires>
</configuration>
</execution>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>dist</artifactId>
<version>2.1.8-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>slc</artifactId>
<packaging>pom</packaging>
<dependency>
<groupId>org.argeo.slc</groupId>
<artifactId>org.argeo.slc.lib.jcr</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.argeo.slc</groupId>
<artifactId>org.argeo.slc.lib.repo</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
</dependency>
<!-- Launcher -->
<dependency>
<groupId>org.argeo.slc</groupId>
<artifactId>org.argeo.slc.launcher</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
<!-- <type>tar.gz</type> -->
<!-- <classifier>base</classifier> -->
</dependency>
<id>rpmbuild</id>
<build>
<plugins>
-<!-- <plugin> -->
-<!-- <groupId>org.apache.maven.plugins</groupId> -->
-<!-- <artifactId>maven-dependency-plugin</artifactId> -->
-<!-- <executions> -->
-<!-- <execution> -->
-<!-- <id>copy-dependencies-rpm</id> -->
-<!-- <phase>package</phase> -->
-<!-- <goals> -->
-<!-- <goal>copy</goal> -->
-<!-- </goals> -->
-<!-- <configuration> -->
-<!-- <includeTypes>jar</includeTypes> -->
-<!-- <stripVersion>true</stripVersion> -->
-<!-- <outputDirectory>${project.build.directory}/boot</outputDirectory> -->
-<!-- <artifactItems> -->
-<!-- <artifactItem> -->
-<!-- <groupId>org.argeo.slc</groupId> -->
-<!-- <artifactId>org.argeo.slc.launcher</artifactId> -->
-<!-- <version>${project.version}</version> -->
-<!-- </artifactItem> -->
-<!-- </artifactItems> -->
-<!-- </configuration> -->
-<!-- </execution> -->
-<!-- </executions> -->
-<!-- </plugin> -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies-rpm</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <includeTypes>jar</includeTypes>
+ <stripVersion>true</stripVersion>
+ <outputDirectory>${project.build.directory}/boot</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.launcher</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
</source>
</sources>
</mapping>
-<!-- <mapping> -->
-<!-- <directory>/usr/share/osgi/boot</directory> -->
-<!-- <username>root</username> -->
-<!-- <groupname>root</groupname> -->
-<!-- <filemode>644</filemode> -->
-<!-- <directoryIncluded>false</directoryIncluded> -->
-<!-- <sources> -->
-<!-- <source> -->
-<!-- <location>${project.build.directory}/boot</location> -->
-<!-- <includes> -->
-<!-- <include>org.argeo.slc.launcher.jar</include> -->
-<!-- </includes> -->
-<!-- </source> -->
-<!-- </sources> -->
-<!-- </mapping> -->
+ <mapping>
+ <directory>/usr/share/osgi/boot</directory>
+ <username>root</username>
+ <groupname>root</groupname>
+ <filemode>644</filemode>
+ <directoryIncluded>false</directoryIncluded>
+ <sources>
+ <source>
+ <location>${project.build.directory}/boot</location>
+ <includes>
+ <include>org.argeo.slc.launcher.jar</include>
+ </includes>
+ </source>
+ </sources>
+ </mapping>
<!-- Maven (even if not installed) -->
<mapping>
<directory>/var/lib/slc/.m2</directory>
argeo.osgi.start=\
-org.springframework.osgi.extender,\
-org.argeo.node.repofactory.jackrabbit,\
-org.argeo.node.repo.jackrabbit,\
-org.argeo.security.dao.os,\
-org.argeo.slc.node.jackrabbit,\
+org.eclipse.equinox.cm,\
+org.argeo.cms,\
+org.eclipse.gemini.blueprint.extender,\
org.argeo.slc.agent,\
-org.argeo.slc.agent.jcr
+org.argeo.slc.agent.jcr,\
+
+argeo.node.repo.type=localfs
# DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
JAVA_CMD=/usr/lib/jvm/java-1.8.0/bin/java
JAVA_OPTS="-client -Xmx256m"
-SLC_HOME_DIR=${HOME}/.slc/
+SLC_HOME_DIR=${HOME}/.local/share/slc/
if [ -f $SLC_HOME_DIR/settings.sh ];then
. $SLC_HOME_DIR/settings.sh
fi
$JAVA_CMD $JAVA_OPTS \
"-Dargeo.osgi.bundles=$ARGEO_OSGI_BUNDLES" \
+ -Dorg.osgi.framework.security=osgi \
+ -Djava.security.policy="file:/etc/osgiboot/all.policy" \
-cp "$CLASSPATH" \
org.argeo.slc.cli.SlcMain "$@"
\ No newline at end of file
+++ /dev/null
-Development Environment
-
- First, you need to create a development environment.
\ No newline at end of file
+++ /dev/null
-Upload of attachments to a test result
-
- This allows to attach ANY Spring resource (for example the one created above but not only, since it can also be classpath: or osgibundle: Resources or ANY file on the file system where the agent is running (e.g. Mx *.mxres files on a server...))
-
- In order to use it:
-
- [[1]] First reference an attachment uploader service via OSGi (it is provided by the standard agent):
-
-+-------------------------------+
-<reference id="attachmentUploader" interface="org.argeo.slc.core.attachment.AttachmentUploader" />
-+-------------------------------+
-
- [[1]] Then use an UploadAttachment task:
-
-+-------------------------------+
-<bean parent="task.uploadAttachments">
- <property name="attachmentUploader" ref="attachmentUploader" />
- <property name="attachment">
- <bean parent="taskArg.attachment">
- <property name="name" value="myAttachment.txt" />
- </bean>
- </property>
- <property name="resource" ref="basic.writeTo" />
- <property name="attachTo">
- <list>
- <ref bean="basic.testResult" />
- </list>
- </property>
-</bean>
-+-------------------------------+
-
- You have to specify an Attachment object with at least a 'name', you can also specify a 'contentType', but the server will recognize common extension of the name.
- You have to specify a (Spring) Resource, for example the one that you created before (the name of the attachment doesn't have to be the name of the file).
- Just doing this will already upload a file to the server, but if you want to access it you need to bind it to some object, typically a TreeTestResult. You can provide a list of AttachmentEnabled objects (only TreeTestResult implements it so far).
-
- You could use directly Spring Resource URL, e.g.:
-
-+-------------------------------+
-<property name="resource" value="osgibundle:/conf/main.xml" />
-+-------------------------------+
-
- You can also upload and attach many attachments in one shot. In that case provide a Map with the keys being Attachment objects and the values Resource objects. E.g.:
-
-+-------------------------------+
-<bean parent="task.uploadAttachments">
- <property name="attachmentUploader" ref="attachmentUploader" />
- <property name="attachments">
- <map>
- <entry>
- <key>
- <bean parent="taskArg.attachment">
- <property name="name" value="Reached.csv" />
- </bean>
- </key>
- <bean factory-bean="fileDiff.testData" factory-method="getReached"
- scope="execution">
- <aop:scoped-proxy />
- </bean>
- </entry>
- <entry>
- <key>
- <bean parent="taskArg.attachment">
- <property name="name" value="Expected.csv" />
- </bean>
- </key>
- <bean factory-bean="fileDiff.testData" factory-method="getExpected"
- scope="execution">
- <aop:scoped-proxy />
- </bean>
- </entry>
- </map>
- </property>
- <property name="attachTo">
- <list>
- <ref bean="fileDiff.testResult" />
- </list>
- </property>
-</bean>
-+-------------------------------+
-
- Retrieving the resources from this bean:
-
-+-------------------------------+
-<bean id="fileDiff.testData" parent="testData.reachedExpected"
- scope="execution">
- <aop:scoped-proxy />
- <property name="expected" value="osgibundle:/inputs/csvdiff/@{fileName}.csv" />
- <property name="reached"
- value="osgibundle:/inputs/csvdiff/@{fileName}_mod.csv" />
-</bean>
-+-------------------------------+
-
- [[1]] You can access the attachments from the Web UI by selecting a result in the list in the results perspective.
- You will see that a new button 'Attachment' in the toolbar get activated (if there are any attachments).
+++ /dev/null
-Management of writable files within tests
-
- This provides an abstraction for files generated by the test.
-
- The files are stored in the standard osgi instance area (argument -data <my data area> to an OSGi launch, default is a ./data directory in the execution directory) under a ${osgi.instance.area}/executionResources directory.
-
- A subdirectory is created for each execution, thus avoiding that the files override each other.
-
- The format of this directory is yyyyMMdd_HHmmss_<execution context uuid>
-
- In order to use it:
-
- [[1]] First declare a ResourcesManager in your application context. It has to reference the SLC Execution Context (always available):
-
-+-------------------------------+
-<bean id="basic.resourcesManager" parent="slcTemplate.fileResources">
- <property name="executionContext" ref="executionContext" />
-</bean>
-+-------------------------------+
-
- [[1]] Then you can retrieve Spring Resources via a call to this manager. For example (it could also be an inner bean):
-
-+-------------------------------+
-<bean id="basic.writeTo" factory-bean="basic.resourcesManager"
- factory-method="getWritableResource" scope="execution">
- <constructor-arg value="subdir/writeTo" />
- <aop:scoped-proxy />
-</bean>
-+-------------------------------+
-
- The "constructor argument" (just a Spring notation in this case) is a relative path that you want to give to this file.
- Within a given execution, repeated calls on the manager with the same relative path will always point to the same file.
-
- [[1]] Then simply use this standard Spring Resource where required:
-
-+-------------------------------+
-<bean parent="task.echo">
- <property name="message" value="DATA" />
- <property name="writeTo" ref="basic.writeTo" />
-</bean>
-+-------------------------------+
-
- Underlying calls to the getFile() method of this resource won't fail (since they are writable).
-
-Factory bean for execution resources
-
- Here is an enhancement to declare execution resources:
-
-+-------------------------------+
-<bean id="executionResources.placeholderPass" parent="slcTemplate.simpleFlow">
- <constructor-arg ref="executionResources.spec" />
- <property name="executables">
- <list>
- <bean parent="task.echo">
- <property name="message" value="DATA" />
- <property name="writeTo">
- <bean parent="slcTemplate.resourcesFactoryBean" scope="execution">
- <property name="executionResources" ref="executionResources" />
- <property name="relativePath" value="subdir/@{var}" />
- <aop:scoped-proxy />
- </bean>
- </property>
- </bean>
- </list>
- </property>
-</bean>
-+-------------------------------+
-
- This allows to pass @{} execution parameters.
-
- The other form WON'T WORK if you try to passe @{} in the constructor-arg tag (but still works if the relative path does not contain a @{}):
-
-+-------------------------------+
-<bean id="executionResources.placeholderFail" parent="slcTemplate.simpleFlow">
- <constructor-arg ref="executionResources.spec" />
- <property name="executables">
- <list>
- <bean parent="task.echo">
- <property name="message" value="DATA" />
- <property name="writeTo">
- <bean factory-bean="executionResources" factory-method="getWritableResource"
- scope="execution">
- <constructor-arg value="subdir/@{var}" />
- <aop:scoped-proxy />
- </bean>
- </property>
- </bean>
- </list>
- </property>
-</bean>
-+-------------------------------+
-
+++ /dev/null
-New naming for Argeo Maven Plugins
-
- Update your maven plugin shortcut in ~/.m2/settings.xml
-
-+-------------------------------+
-<settings 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/settings-1.0.0.xsd">
- <pluginGroups>
- <pluginGroup>org.argeo.maven.plugins</pluginGroup>
- </pluginGroups>
-
-</settings>
-+-------------------------------+
-
-Execution Modules Setup
-
- The following modules needs to be renamed in the Required-Bundle header of the MANIFEST.MF :
-*-----------------------------------+-------------------------------+
-|0.11.3 |0.11.4 |
-*-----------------------------------+-------------------------------+
-|org.argeo.slc.support.simple |org.argeo.slc.core |
-*-----------------------------------+-------------------------------+
-|org.argeoslc.support.equinox |org.argeo.slc.support.osgi |
-*-----------------------------------+-------------------------------+
+++ /dev/null
-Systems Life Cycle (SLC)
-
- SLC provides systems management and QA tools.
+++ /dev/null
-<faqs id="slcFaq">
- <part id="general">
- <title>General</title>
-
- <faq id="slcName">
- <question>What is SLC for?</question>
- <answer>
- <p>
- It provides QA tools.
- </p>
- </answer>
- </faq>
- </part>
-
- <part id="techBasic">
- <title>Technical</title>
- <faq id="startDemo">
- <question>How do I start the demo?</question>
- <answer>
- <p>
- From the demo directory (
- <code>cd demo</code>
- ) of the source distribution (or workingcopy) run:
- <br />
- <code>mvn argeo-osgi:equinox -Pserver</code>
- <br />
- then, in another console, also in the demo directory:
- <br />
- <code>mvn argeo-osgi:equinox -Pagent</code>
- <br />
- Then open
- <a href="http://localhost:7070/org.argeo.slc.ria">http://localhost:7070/org.argeo.slc.ria
- </a>
- </p>
- </answer>
- </faq>
- </part>
-</faqs>
\ No newline at end of file
+++ /dev/null
-<!--
-
- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
-
- 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.
-
--->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
- <version />
- <publishDate format="yyyy-MM-dd HH:mm" />
- <body>
- <menu name="Overview">
- <item name="Home" href="${project.url}/index.html" />
- <!--<item name="Getting Started" href="${project.url}/gettingStarted.html" />-->
- <!--<item name="FAQ" href="${project.url}/faq.html" />-->
- <item name="API (Javadoc)" href="${project.url}/apidocs/index.html" />
- <item name="Browse Code" href="${project.url}/xref/index.html" />
- <item name="FIXMEs / TODOs" href="${project.url}/taglist.html" />
- </menu>
- <!--
- <menu name="How-To">
- <item name="Execution Resources"
- href="${project.url}/howtos/howto-executionResources.html" />
- <item name="Attachments" href="${project.url}/howtos/howto-attachments.html" />
- </menu>
- -->
- <menu ref="reports" />
- </body>
- <skin>
- <groupId>org.apache.maven.skins</groupId>
- <artifactId>maven-default-skin</artifactId>
- <version>1.0</version>
- </skin>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
- xmlns:util="http://www.springframework.org/schema/util"\r
- xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
- http://www.springframework.org/schema/beans \r
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/util\r
- http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
-\r
- <!-- REFERENCES -->\r
- <reference id="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
-\r
- <reference id="modulesManager"\r
- interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
-\r
- <!-- SERVICES -->\r
- <service ref="agent" interface="org.argeo.slc.execution.SlcAgent" />\r
- <service ref="agentCli" interface="org.argeo.slc.execution.SlcAgentCli" />\r
-\r
- <service ref="fileSystemManager" interface="org.apache.commons.vfs.FileSystemManager" />\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
- <bean id="agent" class="org.argeo.slc.core.execution.DefaultAgent"\r
- init-method="init" destroy-method="destroy">\r
- <property name="modulesManager" ref="modulesManager" />\r
- </bean>\r
-\r
- <bean id="agentCli" class="org.argeo.slc.core.execution.DefaultAgentCli">\r
- <property name="agent" ref="agent" />\r
- <property name="authenticationManager" ref="authenticationManager" />\r
- </bean>\r
-\r
- <bean\r
- class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
- <property name="authenticationManager" ref="authenticationManager" />\r
- </bean>\r
-\r
- <bean name="fileSystemManager" class="org.apache.commons.vfs.impl.StandardFileSystemManager"\r
- init-method="init" destroy-method="close" />\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>modules</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.agent.cli</artifactId>
- <name>SLC Agent CLI</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Import-Package>
- *,
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.server.repo.webapp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
- <import resource="osgi.xml" />
- <import resource="security.xml" />
-
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
- ">
-
- <bean
- class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
-
- <bean id="servletHandler"
- class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
-
- <bean id="handlerMapping"
- class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
- <property name="mappings">
- <props>
- <prop key="*">mavenProxyServlet</prop>
- </props>
- </property>
- </bean>
-
- <bean id="mavenProxyServlet" class="org.argeo.jcr.mvc.ResourceProxyServlet">
- <property name="proxy" ref="mavenProxy" />
- </bean>
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
- xmlns:security="http://www.springframework.org/schema/security"\r
- xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
- http://www.springframework.org/schema/beans \r
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
-\r
- <!-- REFERENCES -->\r
- <!-- Security -->\r
- <reference id="authenticationManager"\r
- interface="org.springframework.security.AuthenticationManager" />\r
-\r
- <!-- JCR -->\r
- <reference id="jcrRepository" interface="javax.jcr.Repository"\r
- filter="(argeo.jcr.repository.alias=java)" />\r
-\r
- <!-- Maven -->\r
- <reference id="mavenProxy" interface="org.argeo.slc.repo.MavenProxyService" />\r
- <reference id="rpmProxy" interface="org.argeo.slc.rpmfactory.RpmProxyService" />\r
-\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
- ">
-
- <bean
- class="org.springframework.web.servlet.handler.SimpleServletPostProcessor" />
-
- <bean id="servletHandler"
- class="org.springframework.web.servlet.handler.SimpleServletHandlerAdapter" />
-
- <bean id="handlerMapping"
- class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
- <property name="mappings">
- <props>
- <prop key="*">rpmProxyServlet</prop>
- </props>
- </property>
- </bean>
-
- <bean id="rpmProxyServlet" class="org.argeo.jcr.mvc.ResourceProxyServlet">
- <property name="proxy" ref="rpmProxy" />
- </bean>
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:sec="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
-
- <bean id="springSecurityFilterChain" class="org.springframework.security.util.FilterChainProxy">
- <sec:filter-chain-map path-type="ant">
- <sec:filter-chain pattern="/**"
- filters="httpSessionContextIntegrationFilter,logoutFilter,basicProcessingFilter,anonymousProcessingFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,filterInvocationInterceptor" />
- </sec:filter-chain-map>
- </bean>
-
- <!-- The actual authorization checks (called last, but first here for ease
- of configuration) -->
- <bean id="filterInvocationInterceptor" parent="filterInvocationInterceptorTemplate">
- <property name="objectDefinitionSource">
- <value>
- CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
- PATTERN_TYPE_APACHE_ANT
- /private/**=ROLE_USER
- /**=IS_AUTHENTICATED_ANONYMOUSLY
- </value>
- </property>
- </bean>
-
- <!-- Integrates the authentication information in the http sessions -->
- <bean id="httpSessionContextIntegrationFilter"
- class="org.springframework.security.context.HttpSessionContextIntegrationFilter">
- <property name="allowSessionCreation" value="true" />
- </bean>
-
- <!-- Processes logouts, removing both session informations and the remember-me
- cookie from the browser -->
- <bean id="logoutFilter" class="org.springframework.security.ui.logout.LogoutFilter">
- <constructor-arg value="/web/" />
- <!-- URL redirected to after logout -->
- <constructor-arg>
- <list>
- <bean
- class="org.springframework.security.ui.logout.SecurityContextLogoutHandler" />
- </list>
- </constructor-arg>
- </bean>
-
- <!-- Double check, this may not be necessary -->
- <bean id="securityContextHolderAwareRequestFilter"
- class="org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter" />
-
- <!-- Basic authentication -->
- <bean id="basicProcessingFilter"
- class="org.springframework.security.ui.basicauth.BasicProcessingFilter">
- <property name="authenticationManager">
- <ref bean="authenticationManager" />
- </property>
- <property name="authenticationEntryPoint">
- <ref local="basicProcessingFilterEntryPoint" />
- </property>
- </bean>
-
- <!-- Activate basic auth when needed -->
- <bean id="basicProcessingFilterEntryPoint"
- class="org.springframework.security.ui.basicauth.BasicProcessingFilterEntryPoint">
- <property name="realmName">
- <value>Argeo Repository</value>
- </property>
- </bean>
-
- <!-- If everything else failed, anonymous authentication -->
- <bean id="anonymousProcessingFilter"
- class="org.springframework.security.providers.anonymous.AnonymousProcessingFilter">
- <property name="key" value="${argeo.security.systemKey}" />
- <property name="userAttribute" value="anonymous,ROLE_ANONYMOUS" />
- </bean>
-
- <!-- Reacts to security related exceptions -->
- <bean id="exceptionTranslationFilter"
- class="org.springframework.security.ui.ExceptionTranslationFilter">
- <property name="authenticationEntryPoint">
- <ref bean="basicProcessingFilterEntryPoint" />
- </property>
- <property name="accessDeniedHandler">
- <bean class="org.springframework.security.ui.AccessDeniedHandlerImpl">
- <property name="errorPage" value="/accessDenied.jsp" />
- </bean>
- </property>
- </bean>
-
- <!-- Template for authorization checks -->
- <bean id="filterInvocationInterceptorTemplate" abstract="true"
- class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
- <property name="authenticationManager" ref="authenticationManager" />
- <property name="accessDecisionManager">
- <bean class="org.springframework.security.vote.AffirmativeBased">
- <property name="allowIfAllAbstainDecisions" value="false" />
- <property name="decisionVoters">
- <list>
- <bean class="org.springframework.security.vote.RoleVoter" />
- <bean class="org.springframework.security.vote.AuthenticatedVoter" />
- </list>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
- <display-name>Argeo SLC Repo Webapp</display-name>
-
- <!-- General -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/applicationContext.xml</param-value>
- </context-param>
-
- <listener>
- <display-name>Spring Context</display-name>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <context-param>
- <param-name>contextClass</param-name>
- <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
- </context-param>
-
- <!-- RPM -->
- <servlet>
- <servlet-name>rpm</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
- <param-name>contextClass</param-name>
- <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>rpm</servlet-name>
- <url-pattern>/rpm/*</url-pattern>
- </servlet-mapping>
-
- <!-- Maven -->
- <!-- <servlet> -->
- <!-- <servlet-name>maven</servlet-name> -->
- <!-- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> -->
- <!-- <init-param> -->
- <!-- <param-name>contextClass</param-name> -->
- <!-- <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value> -->
- <!-- </init-param> -->
- <!-- <load-on-startup>1</load-on-startup> -->
- <!-- </servlet> -->
- <!-- <servlet-mapping> -->
- <!-- <servlet-name>maven</servlet-name> -->
- <!-- <url-pattern>/maven/*</url-pattern> -->
- <!-- </servlet-mapping> -->
-
- <!-- Security -->
- <filter>
- <filter-name>springSecurityFilterChain</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>springSecurityFilterChain</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-</web-app>
+++ /dev/null
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>SLC Repository</title>
-<link href="style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<h1>SLC Repository</h1>
-<p>This is a repository of OSGi bundles, which is compatible with Maven conventions.
-</p>
-<p>The first level refers to <b>products</b>, the second one to <b>version branches</b> of these products.
-</p>
-<p>When clicking on a version branch, an editors opens which allows to efficiently browse the available bundles.
-</p>
-
-<h2>Usage with maven repository compatible tools</h2>
-<p>There is one maven-style repository per branch.
-</p>
-<p>It is accessible anonymously at the following URL (if public access has been explicitly given to this branch):<br>
-<pre>http://[host]/data/public/java/[org.example.product]-[major.minor.x]</pre>
-</p>
-<p>Or as an authenticated user (BASIC auth) belonging to <i>ROLE_SLC</i>, with read/write WebDav access:<br/>
-<pre>https://[host]/data/files/java/[org.example.product]-[major.minor.x]</pre>
-</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>modules</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.server.repo.webapp</artifactId>
- <name>SLC Repo Web App</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Web-ContextPath>repo</Web-ContextPath>
- <!-- TODO optimize -->
- <Import-Package>
- *,
- javax.jcr,
- javax.servlet,
- javax.servlet.http,
- javax.servlet.resources,
- org.argeo.jcr.mvc,
- org.argeo.security.core,
- org.argeo.security.jcr,
- org.argeo.slc.aether.spring,
- org.argeo.slc.repo,
- org.argeo.slc.rpmfactory,
- org.springframework.osgi.web.context.support,
- org.springframework.security,
- org.springframework.security.context,
- org.springframework.security.intercept.web,
- org.springframework.security.providers.anonymous,
- org.springframework.security.ui,
- org.springframework.security.ui.basicauth,
- org.springframework.security.ui.logout,
- org.springframework.security.util,
- org.springframework.security.vote,
- org.springframework.security.wrapper,
- org.springframework.web.context,
- org.springframework.web.filter,
- org.springframework.web.servlet,
- org.springframework.web.servlet.handler
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
+++ /dev/null
-/* Generic Selectors */\r
-body {\r
- font-family: sans-serif;\r
- font-size: 12px;\r
- color: black;\r
- background-color: white;\r
-}\r
-\r
-li {\r
- list-style-type: none;\r
-}\r
-\r
-h1 {\r
- font-family: sans-serif;\r
- font-size: 16px;\r
- font-weight: bold;\r
- color: #000000;\r
- padding: 0px 0px 5px 0px;\r
- margin: 0px;\r
-}\r
-\r
-h2 {\r
- font-family: sans-serif;\r
- font-size: 14px;\r
- font-weight: bold;\r
- color: #000000;\r
- padding: 5px 0px 5px 0px;\r
- margin: 0px;\r
- margin-top: 5px;\r
-}\r
-\r
-table,form {\r
- margin: 0px;\r
-}\r
-\r
-img {\r
- border: none;\r
-}\r
-\r
-div {\r
- font-size: 100%;\r
-}\r
-\r
-tr.list:hover {\r
- background-color: lightgrey;\r
-}\r
-\r
-td.list {\r
- border-top: 1px solid lighgrey;\r
- padding: 2px 20px 2px 2px;\r
- padding-right: 15px;\r
-}\r
-\r
-th {\r
- font-size: 12px;\r
- padding: 2px 20px 2px 2px;\r
- vertical-align: top;\r
- text-align: left;\r
-}\r
-\r
-td {\r
- font-size: 12px;\r
- padding: 1px;\r
- vertical-align: middle;\r
- text-align: left;\r
-}\r
-\r
-/**************** Navigation ****************/\r
-td.nav1 {\r
- padding: 5px 0px 0px 0px;\r
- font-size: 12px;\r
- font-weight: bold;\r
-}\r
-\r
-td.nav2 {\r
- padding: 0px 0px 0px 5px;\r
- font-size: 12px;\r
-}\r
-\r
-/**************** Forms ****************/\r
-input.submit {\r
- border: solid 1px grey;\r
- background-color: lightgrey;\r
- align: right;\r
-}\r
-\r
-input.submit:hover {\r
- border: solid 1px #3399FF;\r
- background-color: white;\r
- color: #3399FF;\r
-}\r
-\r
-input.std {\r
- border: solid 1px lightgrey;\r
- padding: 1px;\r
- margin: 2px;\r
-}\r
-\r
-.formError {\r
- color: red;\r
- padding: 1px;\r
- margin: 2px;\r
- font-weight: bold;\r
-}\r
-\r
-/**************** Pseudo classes ****************/\r
-a:link {\r
- color: #0066CC;\r
- text-decoration: none;\r
-}\r
-\r
-a:visited {\r
- color: #0066CC;\r
- text-decoration: none;\r
-}\r
-\r
-a:hover {\r
- color: #3399FF;\r
- text-decoration: none;\r
-}\r
-\r
-/************************* ID's *************************/\r
-#main {\r
- position: absolute;\r
- margin-left: 180px;\r
- padding-top: 65px;\r
-}\r
-\r
-#navigation {\r
- position: absolute;\r
- width: 150px;\r
- height: 800px;\r
- border-right: 1px solid #0066CC;\r
- font-weight: normal;\r
- margin-top: 60px;\r
- margin-left: 10px;\r
-}\r
-\r
-#banner {\r
- position: absolute;\r
- width: 400px;\r
- height: 50px;\r
-}\r
-\r
-#upperRight {\r
- position: absolute;\r
- top: 0;\r
- right: 0;\r
- margin-top: 20px;\r
- margin-right: 10px;\r
-}
\ No newline at end of file
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>argeo-slc</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>modules</artifactId>
- <name>SLC Modules</name>
- <packaging>pom</packaging>
- <modules>
- <module>org.argeo.slc.ext.castor</module>
- <module>org.argeo.slc.agent</module>
- <module>org.argeo.slc.agent.jcr</module>
- <module>org.argeo.slc.agent.cli</module>
- <module>org.argeo.slc.node.jackrabbit</module>
- <module>org.argeo.slc.server.repo</module>
- <module>org.argeo.slc.server.repo.webapp</module>
- </modules>
- <build>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>.*</exclude>
- <exclude>.*/**</exclude>
- <exclude>pom.xml</exclude>
- <exclude>build.properties</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.launcher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Fri Aug 29 11:31:46 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/
+++ /dev/null
-NIX {
- com.sun.security.auth.module.UnixLoginModule required;
-};
-
-WINDOWS {
- com.sun.security.auth.module.NTLoginModule required;
-};
+++ /dev/null
-log4j.rootLogger=WARN, console
-#log4j.rootLogger=DEBUG, development
-
-## Levels
-log4j.logger.org.argeo=INFO
-
-log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
-log4j.logger.org.apache.jackrabbit.core.config.ConfigurationErrorHandler=ERROR
-log4j.logger.org.apache.jackrabbit.core.util.db.DbUtility=FATAL
-
-## Appenders
-# default appender
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %m%n
-
-# development appender
-log4j.appender.development=org.apache.log4j.ConsoleAppender
-log4j.appender.development.layout=org.apache.log4j.PatternLayout
-#log4j.appender.development.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%16.16t] %5p %m (%F:%L) %c%n
-log4j.appender.development.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p %m [%16.16t] %c%n
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>runtime</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.launcher</artifactId>
- <packaging>jar</packaging>
- <name>SLC Launcher</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/assembly/base.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>assembly-base</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Main-Class>org.argeo.slc.cli.SlcMain</Main-Class>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/base</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/base</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.commons.base</groupId>
- <artifactId>org.argeo.osgi.boot</artifactId>
- <version>${version.argeo-commons}</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.
-
--->
-<assembly 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/assembly-1.1.0-SNAPSHOT.xsd">
- <id>base</id>
- <includeBaseDirectory>false</includeBaseDirectory>
- <formats>
- <format>tar.gz</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>target/base</directory>
- <outputDirectory></outputDirectory>
- <fileMode>0755</fileMode>
- <includes>
- <include>*.sh</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>target/base</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>*.bat</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>target/base</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>work/**</include>
- </includes>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
+++ /dev/null
-@echo off\r
-set ROOT_DIR=%~dp0\r
-set LIB_DIR=%ROOT_DIR%\lib\r
-set WORK_DIR=%ROOT_DIR%\work\%1\r
-\r
-TITLE %1\r
-\r
-cd %WORK_DIR%\r
-\r
-java %JAVA_OPTS% -jar "%LIB_DIR%\org.eclipse.osgi-${version.equinox}.jar" -clean -console -configuration "%WORK_DIR%\conf" -data "%WORK_DIR%\data"
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-INSTANCE=$1
-
-ROOT_DIR=`pwd`
-LIB_DIR=$ROOT_DIR/lib
-
-# Defaults
-if [ -z "$INSTANCE" ]; then
- INSTANCE=agent
-fi
-
-echo "Using configuration: $INSTANCE"
-
-WORK_DIR=$ROOT_DIR/work/$INSTANCE
-if [ -z "$JAVA_OPTS" ]; then
- JAVA_OPTS=-Xmx256m
-fi
-
-if [ -d "$WORK_DIR" ]; then
-cd $WORK_DIR
-java $JAVA_OPTS -jar $LIB_DIR/org.eclipse.osgi-${version.equinox}.jar \
- -clean -console \
- -configuration $WORK_DIR/conf \
- -data $WORK_DIR/data
-else
- echo "$WORK_DIR does not exist. Please specify a proper configuration name."
-fi
+++ /dev/null
-osgi.bundles=org.argeo.osgi.boot-${version.argeo-commons}.jar@start
-argeo.osgi.bundles=${osgi.install.area};in=*.jar
-argeo.osgi.start=org.springframework.osgi.extender,\
- org.argeo.slc.agent,\
- org.argeo.slc.agent.jms,\
- org.argeo.slc.support.equinox
-
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.cli;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.ServiceLoader;
-import java.util.UUID;
-
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginContext;
-
-import org.argeo.osgi.boot.OsgiBoot;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.launch.Framework;
-import org.osgi.framework.launch.FrameworkFactory;
-
-/** Configures an SLC runtime and runs a process. */
-public class SlcMain implements PrivilegedAction<String> {
- public final static String NIX = "NIX";
- public final static String WINDOWS = "WINDOWS";
- public final static String SOLARIS = "SOLARIS";
-
- public final static String os;
- public final static String slcDirName = ".slc";
- final static File homeDir = new File(System.getProperty("user.home"));
-
- static {
- String osName = System.getProperty("os.name");
- if (osName.startsWith("Win"))
- os = WINDOWS;
- else if (osName.startsWith("Solaris"))
- os = SOLARIS;
- else
- os = NIX;
- }
-
- private Long timeout = 30 * 1000l;
- private final String[] args;
- private final File confDir;
- private final File dataDir;
- private final File modulesDir;
-
- private final List<String> bundlesToStart = new ArrayList<String>();
-
- public SlcMain(String[] args, File confDir, File dataDir, File modulesDir) {
- this.args = args;
- this.confDir = confDir;
- this.dataDir = dataDir;
- this.modulesDir = modulesDir;
- bundlesToStart.add("org.springframework.osgi.extender");
- bundlesToStart.add("org.argeo.node.repo.jackrabbit");
- bundlesToStart.add("org.argeo.security.dao.os");
- bundlesToStart.add("org.argeo.slc.node.jackrabbit");
- bundlesToStart.add("org.argeo.slc.agent");
- bundlesToStart.add("org.argeo.slc.agent.jcr");
- if (args.length == 0)
- bundlesToStart.add("org.argeo.slc.support.equinox");
- // bundlesToStart.add("org.argeo.slc.agent.cli");
- }
-
- public String run() {
- long begin = System.currentTimeMillis();
-
- Framework framework = null;
- try {
- info("## Date : " + new Date());
- info("## Data : " + dataDir.getCanonicalPath());
-
- // Start Equinox
- ServiceLoader<FrameworkFactory> ff = ServiceLoader
- .load(FrameworkFactory.class);
- FrameworkFactory frameworkFactory = ff.iterator().next();
- Map<String, String> configuration = new HashMap<String, String>();
- configuration.put("osgi.configuration.area",
- confDir.getCanonicalPath());
- configuration.put("osgi.instance.area", dataDir.getCanonicalPath());
- // Do clean
- configuration.put("osgi.clean", "true");
- if (args.length == 0) {
- configuration.put("osgi.console", "");
- }
-
- // Spring configs currently require System properties
- System.getProperties().putAll(configuration);
-
- framework = frameworkFactory.newFramework(configuration);
- framework.start();
- BundleContext bundleContext = framework.getBundleContext();
-
- // OSGi bootstrap
- OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
-
- // working copy modules
- if (modulesDir.exists())
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(modulesDir
- .getCanonicalPath() + ";in=*;ex=.gitignore"));
-
- // system modules
- if (System.getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES) != null)
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
- .getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES)));
- else
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
- .getProperty("user.home") + "/.slc/modules/;in=**"));
-
- // Start runtime
- osgiBoot.startBundles(bundlesToStart);
-
- // Find SLC Agent
- ServiceReference sr = null;
- while (sr == null) {
- sr = bundleContext
- .getServiceReference("org.argeo.slc.execution.SlcAgentCli");
- if (System.currentTimeMillis() - begin > timeout)
- throw new RuntimeException("Cannot find SLC agent CLI");
- Thread.sleep(100);
- }
- Object agentCli = bundleContext.getService(sr);
-
- // Initialization completed
- long duration = System.currentTimeMillis() - begin;
- info("[[ Initialized in " + (duration / 1000) + "s "
- + (duration % 1000) + "ms ]]");
-
- if (args.length == 0)
- return null;// console mode
-
- // Subject.doAs(Subject.getSubject(AccessController.getContext()),
- // new AgentCliCall(agentCli));
- Class<?>[] parameterTypes = { String[].class };
- Method method = agentCli.getClass().getMethod("process",
- parameterTypes);
- Object[] methodArgs = { args };
- Object ret = method.invoke(agentCli, methodArgs);
-
- // Shutdown OSGi runtime
- framework.stop();
- framework.waitForStop(60 * 1000);
-
- return ret.toString();
- } catch (Exception e) {
- // Shutdown OSGi runtime
- if (framework != null)
- try {
- framework.stop();
- framework.waitForStop(15 * 1000);
- } catch (Exception silent) {
- }
- throw new RuntimeException("Cannot run SLC command line", e);
- } finally {
-
- }
- }
-
- public static void main(String[] args) {
- try {
- // Prepare directories
- File executionDir = new File(System.getProperty("user.dir"));
- File slcDir;
- Boolean isTransient = false;
- if (isTransient) {
- File tempDir = new File(System.getProperty("java.io.tmpdir")
- + "/" + System.getProperty("user.name"));
- slcDir = new File(tempDir, "slc-"
- + UUID.randomUUID().toString());
- slcDir.mkdirs();
- System.setProperty("argeo.node.repo.configuration",
- "osgibundle:repository-memory.xml");
- } else {
- slcDir = findSlcDir(executionDir);
- if (slcDir == null) {
- slcDir = new File(executionDir, slcDirName);
- slcDir.mkdirs();
- info("## Creating an SLC node at " + slcDir + " ...");
- }
- }
-
- File dataDir = new File(slcDir, "data");
- if (!dataDir.exists())
- dataDir.mkdirs();
-
- File confDir = new File(slcDir, "conf");
- if (!confDir.exists())
- confDir.mkdirs();
-
- File modulesDir = new File(slcDir, "modules");
-
- // JAAS
- File jaasFile = new File(confDir, "jaas.config");
- if (!jaasFile.exists())
- copyResource("/org/argeo/slc/cli/jaas.config", jaasFile);
- System.setProperty("java.security.auth.login.config",
- jaasFile.getCanonicalPath());
-
- // log4j
- File log4jFile = new File(confDir, "log4j.properties");
- if (!log4jFile.exists())
- copyResource("/org/argeo/slc/cli/log4j.properties", log4jFile);
- System.setProperty("log4j.configuration",
- "file://" + log4jFile.getCanonicalPath());
- // Run as a privileged action
- LoginContext lc = new LoginContext(os);
- lc.login();
-
- Subject subject = Subject.getSubject(AccessController.getContext());
- Subject.doAs(subject, new SlcMain(args, confDir, dataDir,
- modulesDir));
-
- if (args.length != 0)
- System.exit(0);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- /**
- * Recursively look in parent directories for a directory named
- * {@link #slcDirName}
- */
- protected static File findSlcDir(File currentDir) {
- File slcDir = new File(currentDir, slcDirName);
- // covers the use case of running from the home directory
- if (slcDir.exists() && slcDir.isDirectory())
- return slcDir;
- File parentDir = currentDir.getParentFile();
- if (parentDir == null)
- return null;
- try {
- // ~/.slc reserved for agent
- if (parentDir.getCanonicalPath().equals(homeDir.getCanonicalPath()))
- return null;
- } catch (IOException e) {
- throw new RuntimeException("Cannot check home directory", e);
- }
- return findSlcDir(parentDir);
- }
-
- protected static void copyResource(String resource, File targetFile) {
- InputStream input = null;
- FileOutputStream output = null;
- try {
- input = SlcMain.class.getResourceAsStream(resource);
- output = new FileOutputStream(targetFile);
- byte[] buf = new byte[8192];
- while (true) {
- int length = input.read(buf);
- if (length < 0)
- break;
- output.write(buf, 0, length);
- }
- } catch (Exception e) {
- throw new RuntimeException("Cannot write " + resource + " file to "
- + targetFile, e);
- } finally {
- try {
- input.close();
- } catch (Exception ignore) {
- }
- try {
- output.close();
- } catch (Exception ignore) {
- }
- }
-
- }
-
- protected static void info(Object msg) {
- System.out.println(msg);
- }
-
- protected static void err(Object msg) {
- System.err.println(msg);
- }
-
- protected static void debug(Object msg) {
- System.out.println(msg);
- }
-
-}
-
-// private String bundlesToInstall = System.getProperty("user.home")
-// +
-// "/dev/src/slc/dep/org.argeo.slc.dep.minimal/target/dependency;in=*.jar,"
-// + System.getProperty("user.home")
-// + "/dev/src/slc/demo/modules;in=*;ex=pom.xml;ex=.svn";
-
-// ServiceTracker agentTracker = new ServiceTracker(bundleContext,
-// "org.argeo.slc.execution.SlcAgentCli", null);
-// agentTracker.open();
-// final Object agentCli = agentTracker.waitForService(30 * 1000);
-// if (agentCli == null)
-// throw new RuntimeException("Cannot find SLC agent CLI");
-
-// protected class AgentCliCall implements PrivilegedAction<String> {
-// private final Object agentCli;
-//
-// public AgentCliCall(Object agentCli) {
-// super();
-// this.agentCli = agentCli;
-// }
-//
-// public String run() {
-// try {
-// Class<?>[] parameterTypes = { String[].class };
-// Method method = agentCli.getClass().getMethod("process",
-// parameterTypes);
-// Object[] methodArgs = { args };
-// Object ret = method.invoke(agentCli, methodArgs);
-// return ret.toString();
-// } catch (Exception e) {
-// throw new RuntimeException("Cannot run "
-// + Arrays.toString(args) + " on " + agentCli, e);
-// }
-// }
-//
-// }
-
+++ /dev/null
-NIX {
- com.sun.security.auth.module.UnixLoginModule required;
-};
-
-WINDOWS {
- com.sun.security.auth.module.NTLoginModule required;
-};
+++ /dev/null
-log4j.rootLogger=WARN, console
-#log4j.rootLogger=DEBUG, development
-
-## Levels
-log4j.logger.org.argeo=INFO
-
-log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
-log4j.logger.org.apache.jackrabbit.core.config.ConfigurationErrorHandler=ERROR
-log4j.logger.org.apache.jackrabbit.core.util.db.DbUtility=FATAL
-
-## Appenders
-# default appender
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %m%n
-
-# development appender
-log4j.appender.development=org.apache.log4j.ConsoleAppender
-log4j.appender.development.layout=org.apache.log4j.PatternLayout
-log4j.appender.development.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p %m [%16.16t] %c%n
+++ /dev/null
-Argeo SLC Site
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.equinox</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under \r
- the Apache License, Version 2.0 (the "License"); you may not use this file \r
- except in compliance with the License. You may obtain a copy of the License \r
- at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable \r
- law or agreed to in writing, software distributed under the License is distributed \r
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either \r
- express or implied. See the License for the specific language governing permissions \r
- and limitations under the License. -->\r
-\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"\r
- xmlns:aop="http://www.springframework.org/schema/aop"\r
- xsi:schemaLocation="\r
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">\r
-\r
-<!-- <bean -->\r
-<!-- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> -->\r
-<!-- <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /> -->\r
-<!-- <property name="ignoreUnresolvablePlaceholders" value="false" /> -->\r
-<!-- <property name="locations"> -->\r
-<!-- <value>osgibundle:equinox.properties</value> -->\r
-<!-- </property> -->\r
-<!-- </bean> -->\r
-\r
- <bean id="commandProvider" class="org.argeo.slc.equinox.ExecutionCommandProvider">\r
- <property name="agentCli" ref="agentCli" />\r
- </bean>\r
-\r
-<!-- <bean id="modulesManager" class="org.argeo.slc.osgi.OsgiExecutionModulesManager"> -->\r
-<!-- <property name="bundlesManager" ref="bundlesManager" /> -->\r
-<!-- </bean> -->\r
-\r
-<!-- <bean id="bundlesManager" class="org.argeo.slc.osgi.BundlesManager"> -->\r
-<!-- <property name="defaultTimeout" value="${slc.equinox.commandTimeout}" /> -->\r
-<!-- <property name="pollingPeriod" value="${slc.equinox.commandPollingPeriod}" /> -->\r
-<!-- </bean> -->\r
-\r
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under \r
- the Apache License, Version 2.0 (the "License"); you may not use this file \r
- except in compliance with the License. You may obtain a copy of the License \r
- at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable \r
- law or agreed to in writing, software distributed under the License is distributed \r
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either \r
- express or implied. See the License for the specific language governing permissions \r
- and limitations under the License. -->\r
-\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
- xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
- http://www.springframework.org/schema/beans \r
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
- <!-- REFERENCES -->\r
- <reference id="agentCli" interface="org.argeo.slc.execution.SlcAgentCli" />\r
-\r
- <!-- SERVICES -->\r
- <service interface="org.eclipse.osgi.framework.console.CommandProvider"\r
- ref="commandProvider" />\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-additional.bundles = org.argeo.slc.core,\
- org.springframework.context,\
- org.argeo.slc.unit,\
- junit,\
- org.argeo.osgi.boot,\
- org.eclipse.osgi
-source.. = src/main/java/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-# Timeout for the SLC command in the OSGi console (in ms)
-slc.equinox.commandTimeout=10000
-# Polling period for synchronous OSGi commands (in ms)
-slc.equinox.commandPollingPeriod=100
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>runtime</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.equinox</artifactId>
- <name>SLC Support Equinox</name>
- <packaging>jar</packaging>
- <properties />
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- FIXME class "org.osgi.service.condpermadmin.ConditionalPermissionUpdate"'s
- signer information does not match signer information of other classes in
- the same package -->
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.*
- </Export-Package>
- <Import-Package>*,
- org.springframework.beans.factory.config,
- org.springframework.osgi.context.event,
- org.springframework.core.io
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.osgi</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- </dependency>
-
- <!-- Unit Tests -->
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.unit</artifactId>
- <scope>test</scope>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.equinox;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.osgi.OsgiRuntime;
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-
-/** OSGi runtime with shutdown capability implemented. */
-@SuppressWarnings("restriction")
-@Deprecated
-public class EquinoxRuntime extends OsgiRuntime {
-
- public void shutdown() {
- try {
- EclipseStarter.shutdown();
- } catch (Exception e) {
- throw new SlcException("Cannot shutdown Equinox runtime.", e);
- }
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.equinox;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.argeo.slc.SlcException;
-import org.argeo.slc.execution.SlcAgentCli;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-
-public class ExecutionCommandProvider implements CommandProvider {
- private SlcAgentCli agentCli;
-
- private String lastProcessUuid;
-
- public Object _slc(CommandInterpreter ci) {
- List<String> args = new ArrayList<String>();
- String arg = null;
- while ((arg = ci.nextArgument()) != null)
- args.add(arg);
- if (args.size() == 0) {
- // TODO relaunch last process
- ci.execute("help");
- throw new SlcException("Command not properly formatted");
- }
-
- lastProcessUuid = agentCli
- .process(args.toArray(new String[args.size()]));
- return lastProcessUuid;
- }
-
- public String getHelp() {
- StringBuffer buf = new StringBuffer();
- buf.append("---SLC Execution Commands---\n");
- buf.append("\tslc <module> <flow> [[ --arg value | --booleanArg ]]"
- + " - executes an execution flow\n");
- return buf.toString();
-
- }
-
- public void setAgentCli(SlcAgentCli agentCli) {
- this.agentCli = agentCli;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.equinox.cli;
-
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-
-@SuppressWarnings("restriction")
-public class Main {
-
- public static void main(String[] args) {
- try {
- String confDir = "";
- String[] equinoxArgs = { "-console", "-conf", confDir };
- EclipseStarter.startup(equinoxArgs, null);
-
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-}
+++ /dev/null
-Bundle-SymbolicName: org.argeo.slc.support.osgi.test.hello
-Bundle-Version: 0.1.0
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
-
- <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />
-
- <bean id="main" parent="slcTemplate.simpleFlow" init-method="run">
- <property name="executables">
- <list>
- <bean parent="task.echo">
- <property name="message" value="Hello world!" />
- </bean>
- </list>
- </property>
- </bean>
-</beans>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.osgi.test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.argeo.slc.equinox.unit.AbstractOsgiRuntimeTestCase;
-import org.argeo.osgi.boot.OsgiBoot;
-
-public class HelloTest extends AbstractOsgiRuntimeTestCase {
- public void testHello() throws Exception {
- Thread.sleep(2000);
- }
-
- protected void installBundles() throws Exception {
- // System.out.println("java.class.path="
- // + System.getProperty("java.class.path"));
-
- osgiBoot.installUrls(osgiBoot.getLocationsUrls(
- OsgiBoot.DEFAULT_BASE_URL,
- System.getProperty("java.class.path")));
- osgiBoot.installUrls(osgiBoot.getBundlesUrls("src/test/bundles;in=*"));
-
- // Map<String, String> sysProps = new TreeMap(System.getProperties());
- // for (String key : sysProps.keySet()) {
- // System.out.println(key + "=" + sysProps.get(key));
- // }
- }
-
- protected List<String> getBundlesToStart() {
- List<String> bundlesToStart = new ArrayList<String>();
- // bundlesToStart.add("org.springframework.osgi.extender");
- bundlesToStart.add("org.argeo.slc.support.osgi.test.hello");
- return bundlesToStart;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.osgi.test;
-
-import org.argeo.slc.equinox.unit.AbstractOsgiRuntimeTestCase;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-
-public class PlatformStartStopTest extends AbstractOsgiRuntimeTestCase {
-
- public void testStartStop() {
- BundleContext bundleContext = osgiBoot.getBundleContext();
- System.out.println(bundleContext
- .getProperty(Constants.FRAMEWORK_VENDOR));
- System.out.println(bundleContext
- .getProperty(Constants.FRAMEWORK_VERSION));
- System.out.println(bundleContext
- .getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT));
-
- }
-}
+++ /dev/null
-Bundle-SymbolicName: org.argeo.slc.support.osgi.tests
-Fragment-Host: org.argeo.slc.support.osgi
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.jemmy</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Tue Jul 21 11:27:46 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
+++ /dev/null
-source.. = src/main/java/,\
- src/main/resources/,\
- src/test/java/,\
- src/test/resources/
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>runtime</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.jemmy</artifactId>
- <name>SLC Support Jemmy</name>
- <description>Helper classes for the Jemmy framework</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.4</Bundle-RequiredExecutionEnvironment>
- <Export-Package>
- org.argeo.slc.jemmy
- </Export-Package>
- <Import-Package>org.netbeans.jemmy,
- org.netbeans.jemmy.operators,
- org.netbeans.jemmy.util
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
- <dependencies>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.argeo.dep.jemmy.nb61</artifactId>
- </dependency>
-
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.netbeans.jemmy.operators.ComponentOperator;\r
-\r
-public class AbstractComponentWrapper implements ComponentWrapper {\r
-\r
- protected ComponentWrapper parent;\r
-\r
- /**\r
- * List of children ComponentWrapper\r
- */\r
- protected List children = new ArrayList();\r
-\r
- protected WrapperLocator locator;\r
-\r
- protected String prefix;\r
-\r
- public ComponentOperator find() {\r
- return locator.find(this);\r
- }\r
-\r
- protected String createNewKey(String oldKey) {\r
- return (prefix == null) ? oldKey : (prefix + "." + oldKey);\r
- }\r
-\r
- protected void addToAccessorMap(Map accessors, String oldKey,\r
- Object accessor) {\r
- String newKey = createNewKey(oldKey);\r
- if (accessors.containsKey(newKey)) {\r
- throw new ConfigRuntimeException("An Accessor with key '" + newKey\r
- + "' was already registered");\r
- }\r
- accessors.put(newKey, accessor);\r
- }\r
-\r
- public Map getAccessors(Class accessorClass) {\r
- Map accessors = new HashMap();\r
- if (accessorClass.isInstance(this)) {\r
- addToAccessorMap(accessors, ((Accessor) this).getFieldName(), this);\r
- }\r
- for (int i = 0; i < children.size(); i++) {\r
- Map childAccessors = ((ComponentWrapper) children.get(i))\r
- .getAccessors(accessorClass);\r
-\r
- Set entries = childAccessors.entrySet();\r
- Iterator it = entries.iterator();\r
-\r
- while (it.hasNext()) {\r
- Map.Entry keyValue = (Map.Entry) it.next();\r
- addToAccessorMap(accessors, keyValue.getKey().toString(),\r
- keyValue.getValue());\r
- }\r
- }\r
- return accessors;\r
- }\r
-\r
- public ComponentWrapper getParent() {\r
- return parent;\r
- }\r
-\r
- public void setParent(ComponentWrapper parent) {\r
- if (this.parent != null) {\r
- throw new ConfigRuntimeException("Parent already set");\r
- }\r
- this.parent = parent;\r
- }\r
-\r
- public List getChildren() {\r
- return children;\r
- }\r
-\r
- public void setChildren(List children) {\r
- this.children = children;\r
-\r
- // check that all elements of the list are ComponentWrapper\r
- // and set their parent\r
- for (int i = 0; i < this.children.size(); i++) {\r
- ComponentWrapper wrapper = (ComponentWrapper) this.children.get(i);\r
- if (wrapper == null) {\r
- throw new ConfigRuntimeException(\r
- "Children of ComponentWrappers must be ComponentWrappers");\r
- }\r
- wrapper.setParent(this);\r
- }\r
- }\r
-\r
- public WrapperLocator getLocator() {\r
- return locator;\r
- }\r
-\r
- public void setLocator(WrapperLocator locator) {\r
- this.locator = locator;\r
- }\r
-\r
- public String getPrefix() {\r
- return prefix;\r
- }\r
-\r
- public void setPrefix(String prefix) {\r
- this.prefix = prefix;\r
- }\r
-\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-public interface Accessor {\r
-\r
- public String getFieldName();\r
-\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-\r
-public interface Actuator extends Accessor {\r
- \r
- void perform();\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-import java.util.Map;\r
-\r
-import org.netbeans.jemmy.operators.ComponentOperator;\r
-\r
-public interface ComponentWrapper {\r
-\r
- /**\r
- * Finds the component described by the ComponentWrapper\r
- * in the GUI\r
- * @return a Jemmy ComponentOperator for the found component\r
- */\r
- public ComponentOperator find();\r
- \r
- public void setParent(ComponentWrapper parent);\r
- \r
- public ComponentWrapper getParent();\r
- \r
- public Map getAccessors(Class accessorClass);\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-public class ConfigRuntimeException extends UIRuntimeException{\r
- /**\r
- * \r
- */\r
- private static final long serialVersionUID = 1L;\r
- public ConfigRuntimeException(){\r
- super();\r
- }\r
- public ConfigRuntimeException(String s){\r
- super(s);\r
- }\r
- public ConfigRuntimeException(Throwable t){\r
- super(t);\r
- }\r
- public ConfigRuntimeException(String s, Throwable t){\r
- super(s,t);\r
- }\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.netbeans.jemmy.operators.ComponentOperator;\r
-\r
-public class FictiveComponentWrapper implements ComponentWrapper {\r
-\r
- protected ComponentWrapper parent; \r
- \r
- public ComponentOperator find() {\r
- // just ask the parent\r
- return parent.find();\r
- }\r
-\r
- /**\r
- * Return only itself (if the class matches)\r
- */\r
- public Map getAccessors(Class accessorClass) {\r
- Map accessors = new HashMap();\r
- if (accessorClass.isInstance(this)) {\r
- accessors.put(((Accessor) this).getFieldName(), this);\r
- } \r
- return accessors;\r
- }\r
-\r
- public ComponentWrapper getParent() {\r
- return parent;\r
- }\r
-\r
- public void setParent(ComponentWrapper parent) {\r
- this.parent = parent;\r
- }\r
-\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-public interface PopupMenuActuator extends Accessor {\r
- /**\r
- * Popup the context menu and optionally select an item.\r
- * @param menu - A list of items to choose on each menu level, separated by '|'\r
- */\r
- void select(String menu);\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-\r
-public interface ReadAccessor extends Accessor {\r
- \r
- public String get();\r
- \r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-public class UIRuntimeException extends RuntimeException {\r
- /**\r
- * \r
- */\r
- private static final long serialVersionUID = 1L;\r
- public UIRuntimeException(){\r
- super();\r
- }\r
- public UIRuntimeException(String s){\r
- super(s);\r
- }\r
- public UIRuntimeException(Throwable t){\r
- super(t);\r
- }\r
- public UIRuntimeException(String s, Throwable t){\r
- super(s,t);\r
- }\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-import org.netbeans.jemmy.operators.ComponentOperator;\r
-\r
-public interface WrapperLocator {\r
-\r
- public ComponentOperator find(ComponentWrapper wrapper);\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.jemmy;\r
-\r
-\r
-public interface WriteAccessor extends Accessor {\r
- \r
- public void set(String value);\r
- \r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="lib/aether-connector-wagon-1.11.jar"/>
- <classpathentry kind="lib" path="lib/aether-impl-1.11.jar"/>
- <classpathentry kind="lib" path="lib/google-collections-1.0.jar"/>
- <classpathentry kind="lib" path="lib/maven-aether-provider-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-artifact-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-compat-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-core-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-embedder-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-model-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-model-builder-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-plugin-api-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-repository-metadata-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-settings-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/maven-settings-builder-3.0.3.jar"/>
- <classpathentry kind="lib" path="lib/nekohtml-1.9.6.2.jar"/>
- <classpathentry kind="lib" path="lib/plexus-cipher-1.4.jar"/>
- <classpathentry kind="lib" path="lib/plexus-classworlds-2.4.jar"/>
- <classpathentry kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>
- <classpathentry kind="lib" path="lib/plexus-container-default-1.5.5.jar"/>
- <classpathentry kind="lib" path="lib/plexus-interpolation-1.14.jar"/>
- <classpathentry kind="lib" path="lib/plexus-sec-dispatcher-1.3.jar"/>
- <classpathentry kind="lib" path="lib/plexus-utils-2.0.6.jar"/>
- <classpathentry kind="lib" path="lib/sisu-guice-2.9.4-no_aop.jar"/>
- <classpathentry kind="lib" path="lib/sisu-inject-bean-2.1.1.jar"/>
- <classpathentry kind="lib" path="lib/sisu-inject-plexus-2.1.1.jar"/>
- <classpathentry kind="lib" path="lib/wagon-file-1.0-beta-7.jar"/>
- <classpathentry kind="lib" path="lib/wagon-http-lightweight-1.0-beta-7.jar"/>
- <classpathentry kind="lib" path="lib/wagon-http-shared-1.0-beta-7.jar"/>
- <classpathentry kind="lib" path="lib/wagon-provider-api-1.0-beta-7.jar"/>
- <classpathentry kind="lib" path="lib/wagon-webdav-jackrabbit-1.0-beta-7.jar"/>
- <classpathentry kind="lib" path="lib/xbean-reflect-3.4.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.support.maven</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Fri Aug 29 11:31:46 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
- xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
- http://www.springframework.org/schema/beans \r
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
- <!-- SERVICES -->\r
- <service ref="mavenRepositorySystem" interface="org.sonatype.aether.RepositorySystem">\r
- <service-properties>\r
- <beans:entry key="aether.repositorySystemType" value="maven" />\r
- </service-properties>\r
- </service>\r
-\r
- <service ref="defaultMavenRepositorySystemSession" interface="org.sonatype.aether.RepositorySystemSession">\r
- <service-properties>\r
- <beans:entry key="aether.repositorySystemType" value="maven" />\r
- </service-properties>\r
- </service>\r
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-
- <bean id="mavenRepositorySystem" class="org.argeo.slc.maven.MavenManager"
- factory-method="createRepositorySystem">
- </bean>
-
- <bean id="defaultMavenRepositorySystemSession" class="org.argeo.slc.maven.MavenManager"
- factory-method="createRepositorySystemSession">
- <constructor-arg ref="mavenRepositorySystem" />
- </bean>
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>runtime</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.support.maven</artifactId>
- <packaging>bundle</packaging>
- <name>SLC Support Maven</name>
- <properties>
- <version.aether>1.11</version.aether>
- <version.maven>3.0.3</version.maven>
- <version.wagon>1.0-beta-7</version.wagon>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <configuration>
- <instructions>
- <Export-Package>
- org.argeo.slc.maven.*
- </Export-Package>
- <Import-Package>
- org.w3c.dom.*;version="0.0.0",
- org.xml.sax.*;version="0.0.0",
- com.google.*;resolution:=optional,
- javax.*;resolution:=optional,
- com.sun.*;resolution:=optional,
- org.objectweb.asm.*;resolution:=optional,
- *
- </Import-Package>
- <_exportcontents>
- org.apache.maven.*;version=${version.maven},
- </_exportcontents>
- <Private-Package>org.apache.xbean.*</Private-Package>
- <Embed-Transitive>true</Embed-Transitive>
- <Embed-Directory>lib</Embed-Directory>
- <Embed-Dependency>*;scope=provided;inline=false</Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>provided</includeScope>
- <outputDirectory>lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.specs</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.aether</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
-
- <!-- <dependency> <groupId>org.argeo.dep.osgi</groupId> <artifactId>org.argeo.dep.osgi.maven.embedder</artifactId>
- </dependency> -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.springframework.beans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.apache.commons.io</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>slf4j.org.apache.commons.logging</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-embedder</artifactId>
- <version>${version.maven}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-spi</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-util</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-connector-wagon</artifactId>
- <version>${version.aether}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-spi</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-util</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-provider-api</artifactId>
- <version>${version.wagon}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-file</artifactId>
- <version>${version.wagon}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-http-lightweight</artifactId>
- <version>${version.wagon}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>nekohtml</groupId>
- <artifactId>xercesMinimal</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav-jackrabbit</artifactId>
- <version>${version.wagon}</version>
- <optional>true</optional>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-nop</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-webdav</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.sonatype.aether</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-import org.apache.maven.cli.MavenCli;
-import org.codehaus.plexus.PlexusContainer;
-
-/** Custom Maven CLI, giving access to the underlying Plexus container. */
-class CustomCli extends MavenCli {
- private PlexusContainer container;
-
- @Override
- protected void customizeContainer(PlexusContainer container) {
- this.container = container;
- }
-
- public PlexusContainer getContainer() {
- return container;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.core.io.Resource;
-
-public class DependencyFileLoader implements FactoryBean{
- private final static Log log = LogFactory.getLog(DependencyFileLoader.class);
-
- private Resource dependenciesResource;
-
- @SuppressWarnings("unchecked")
- public List<MavenFile> loadMavenFiles() {
- try {
- List<MavenFile> mavenFiles = new ArrayList<MavenFile>();
-
- List<String> lines = IOUtils.readLines(dependenciesResource
- .getInputStream());
- for (String line : lines) {
- try {
- line = line.trim();
- if (line.equals("")
- || line
- .startsWith("The following files have been resolved:"))
- continue;// skip
-
- mavenFiles.add(convert(line));
- } catch (Exception e) {
- log.warn("Could not load line " + line);
- }
- }
-
- return mavenFiles;
- } catch (IOException e) {
- throw new SlcException("Could not read dependencies resource "
- + dependenciesResource, e);
- }
- }
-
- protected MavenFile convert(String str) {
- StringTokenizer st = new StringTokenizer(str, ":");
- MavenFile component = new MavenFile();
- component.setGroupId(st.nextToken());
- component.setArtifactId(st.nextToken());
- component.setType(st.nextToken());
- component.setVersion(st.nextToken());
- component.setScope(st.nextToken());
- return component;
- }
-
- public void setDependenciesResource(Resource dependenciesResource) {
- this.dependenciesResource = dependenciesResource;
- }
-
- public Object getObject() throws Exception {
- return loadMavenFiles();
- }
-
- @SuppressWarnings("unchecked")
- public Class<List> getObjectType() {
- return List.class;
- }
-
- public boolean isSingleton() {
- return false;
- }
-
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-/*******************************************************************************
- * Copyright (c) 2010 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
- *******************************************************************************/
-
-import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.providers.file.FileWagon;
-import org.apache.maven.wagon.providers.http.LightweightHttpWagon;
-import org.apache.maven.wagon.providers.webdav.WebDavWagon;
-import org.eclipse.aether.connector.wagon.WagonProvider;
-
-public class ManualWagonProvider implements WagonProvider {
-
- public Wagon lookup(String roleHint) throws Exception {
- if ("file".equals(roleHint)) {
- return new FileWagon();
- } else if ("http".equals(roleHint)) {
- return new LightweightHttpWagon();
- } else if ("webdav".equals(roleHint)) {
- return new WebDavWagon();
- }
- return null;
- }
-
- public void release(Wagon wagon) {
-
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.codehaus.plexus.PlexusContainer;
-
-/** A Maven execution. */
-public class MavenCall implements Runnable {
- private final static Log log = LogFactory.getLog(MavenCall.class);
- private String basedir;
- private String settings;
- /** Raw command lines arguments */
- private String cl;
- private List<String> goals;
- private List<String> profiles;
- private Map<String, String> properties;
-
- private Boolean success = null;
-
- public void run() {
- Thread.currentThread().setContextClassLoader(
- getClass().getClassLoader());
- List<String> args = new ArrayList<String>();
- args.add("-e");
- if (settings != null && !settings.trim().equals("")) {
- args.add("--settings");
- args.add(settings);
- }
- args.add("-f");
- args.add(getBasedirFile().getPath() + "/pom.xml");
- // FIXME manages \" \". Use Commons CLI?
- if (cl != null) {
- String[] clArgs = cl.split(" ");
- args.addAll(Arrays.asList(clArgs));
- }
-
- if (goals != null)
- args.addAll(goals);
- if (profiles != null)
- for (String profile : profiles)
- args.add("-P" + profile);
- if (properties != null)
- for (String key : properties.keySet())
- args.add("-D" + key + "=\"" + properties.get(key) + "\"");
-
- // String[] goals = { "-o", "-e", "-f", basedir + "/pom.xml", "clean",
- // "install" };
-
- // String m2Home = "/opt/apache-maven-3.0.1";
- // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf");
- // System.setProperty("maven.home", m2Home);
- //
- // Launcher.main(goals);
- log.info("Maven call: " + args);
-
- CustomCli mavenCli = new CustomCli();
- int exitCode = mavenCli.doMain(args.toArray(new String[args.size()]),
- getBasedirFile().getPath(), System.out, System.err);
- if (log.isDebugEnabled())
- log.debug("Maven exit code: " + exitCode);
- if (exitCode == 0)
- success = true;
- else
- success = false;
-
- PlexusContainer plexusContainer = mavenCli.getContainer();
- if (log.isDebugEnabled())
- log.debug(plexusContainer.getContext().getContextData());
- plexusContainer.dispose();
- }
-
- /** Removes 'file:' prefix if present */
- protected File getBasedirFile() {
- if (basedir == null)
- throw new SlcException("basedir not set");
- File dir;
- if (basedir.startsWith("file:"))
- dir = new File(basedir.substring("file:".length()));
- else
- dir = new File(basedir);
- return dir;
- }
-
- public void setBasedir(String basedir) {
- this.basedir = basedir;
- }
-
- public void setSettings(String settings) {
- this.settings = settings;
- }
-
- public void setGoals(List<String> goals) {
- this.goals = goals;
- }
-
- public void setProfiles(List<String> profiles) {
- this.profiles = profiles;
- }
-
- public void setProperties(Map<String, String> properties) {
- this.properties = properties;
- }
-
- public void setCl(String cl) {
- this.cl = cl;
- }
-
- public Boolean getSuccess() {
- return success == null ? false : success;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-import java.util.UUID;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.deploy.DeployEnvironment;
-
-public abstract class MavenDeployEnvironment implements DeployEnvironment {
- private static final Log log = LogFactory
- .getLog(MavenDeployEnvironment.class);
- private MavenManager mavenManager;
-
- public void unpackTo(Object packg, File targetLocation,
- Map<String, String> filter) {
- File packageLocation=null;
- String type = null;
- String removeRootDir = "enabled";
-// if (packg instanceof MavenFile) {
-// packageLocation = mavenManager
-// .getPackageLocation((MavenFile) packg);
-// type = ((MavenFile) packg).getType();
-// } else
- if (packg instanceof File) {
- packageLocation = (File) packg;
- // TODO: type based on extension
- } else {
- throw new SlcException("Unrecognized package type "
- + packg.getClass());
- }
- if (log.isDebugEnabled()) {
- log.debug("Unpack " + packageLocation + " of type " + type + " to "
- + targetLocation);
- }
-
- try {
- File tempDir = new File("/tmp/" + UUID.randomUUID().toString());
- tempDir.mkdirs();
- targetLocation.mkdirs();
- Properties props = new Properties();
- props.setProperty("dest", targetLocation.getAbsolutePath());
- props.setProperty("src", packageLocation.getAbsolutePath());
- props.setProperty("tempDir", tempDir.getAbsolutePath());
- props.setProperty("removeRootDir", removeRootDir);
-
- URL antUrl = getClass().getClassLoader().getResource(
- "org/argeo/slc/support/deploy/ant/build.xml");
-
- // if (type == null || type.equals("zip")) {
- // new AntRunner(antUrl, "deployZip", props).run();
- // } else if (type.equals("tar.gz")) {
- // new AntRunner(antUrl, "deployTarGz", props).run();
- // } else {
- // throw new SlcException("Unknow package type " + type);
- // }
- throw new SlcException("Not implemented.");
- } catch (SlcException e) {
- throw e;
- } catch (Exception e) {
- throw new SlcException("Cannot unpack package " + packg + " to "
- + targetLocation, e);
- }
- }
-
- public void setMavenManager(MavenManager mavenManager) {
- this.mavenManager = mavenManager;
- }
-
-}
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.maven;\r
-\r
-import org.argeo.slc.build.Distribution;\r
-import org.argeo.slc.deploy.DeploymentData;\r
-\r
-public class MavenFile implements Distribution, DeploymentData {\r
- private String groupId;\r
- private String artifactId;\r
- private String version;\r
- private String type;\r
- private String classifier;\r
- private String scope;\r
-\r
- public String getScope() {\r
- return scope;\r
- }\r
-\r
- public void setScope(String scope) {\r
- this.scope = scope;\r
- }\r
-\r
- private String distributionId;\r
-\r
- public String getDistributionId() {\r
- return distributionId;\r
- }\r
-\r
- public void setDistributionId(String distributionId) {\r
- this.distributionId = distributionId;\r
- }\r
-\r
- public String getGroupId() {\r
- return groupId;\r
- }\r
-\r
- public void setGroupId(String groupId) {\r
- this.groupId = groupId;\r
- }\r
-\r
- public String getArtifactId() {\r
- return artifactId;\r
- }\r
-\r
- public void setArtifactId(String artifactId) {\r
- this.artifactId = artifactId;\r
- }\r
-\r
- public String getVersion() {\r
- return version;\r
- }\r
-\r
- public void setVersion(String version) {\r
- this.version = version;\r
- }\r
-\r
- public String getType() {\r
- return type;\r
- }\r
-\r
- public void setType(String type) {\r
- this.type = type;\r
- }\r
-\r
- public String getClassifier() {\r
- return classifier;\r
- }\r
-\r
- public void setClassifier(String classifier) {\r
- this.classifier = classifier;\r
- }\r
-\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2007-2012 Argeo GmbH\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.argeo.slc.maven;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.apache.maven.repository.internal.DefaultServiceLocator;\r
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;\r
-import org.argeo.slc.SlcException;\r
-import org.argeo.slc.aether.AetherUtils;\r
-import org.argeo.slc.aether.ConsoleRepositoryListener;\r
-import org.argeo.slc.aether.ConsoleTransferListener;\r
-import org.codehaus.plexus.PlexusContainer;\r
-import org.eclipse.aether.RepositorySystem;\r
-import org.eclipse.aether.RepositorySystemSession;\r
-import org.eclipse.aether.artifact.Artifact;\r
-import org.eclipse.aether.collection.CollectRequest;\r
-import org.eclipse.aether.connector.wagon.WagonProvider;\r
-import org.eclipse.aether.connector.wagon.WagonRepositoryConnectorFactory;\r
-import org.eclipse.aether.graph.Dependency;\r
-import org.eclipse.aether.graph.DependencyNode;\r
-import org.eclipse.aether.repository.LocalRepository;\r
-import org.eclipse.aether.repository.RemoteRepository;\r
-import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;\r
-import org.eclipse.aether.util.artifact.DefaultArtifact;\r
-import org.eclipse.aether.util.graph.PreorderNodeListGenerator;\r
-\r
-public class MavenManager {\r
- private final static Log log = LogFactory.getLog(MavenManager.class);\r
-\r
- public void init() {\r
- try {\r
- testMaven();\r
- testAether();\r
- // List<ComponentDescriptor<?>> lst = plexusContainer\r
- // .discoverComponents(plexusContainer.getContainerRealm());\r
- // for (ComponentDescriptor<?> cd : lst) {\r
- // log.debug(cd);\r
- // }\r
- // ArtifactHandler artifactHandler = plexusContainer\r
- // .lookup(ArtifactHandler.class);\r
- // ArtifactRepository localRepository = new\r
- // DefaultArtifactRepositoryFactory().createArtifactRepository("local",\r
- // , layoutId, snapshots, releases);\r
- // Maven maven = mavenCli.getContainer().lookup(Maven.class);\r
- // Artifact artifact = new DefaultArtifact("org.argeo.slc.dist",\r
- // "org.argeo.slc.sdk", "0.13.1-SNAPSHOT", "compile", "pom",\r
- // null, artifactHandler);\r
- // ArtifactResolutionRequest req = new ArtifactResolutionRequest();\r
- // req.setLocalRepository(localRepository);\r
- // req.setResolveTransitively(true);\r
- // req.setArtifact(artifact);\r
- // ArtifactResolver artifactResolver = plexusContainer\r
- // .lookup(ArtifactResolver.class);\r
- // ArtifactResolutionResult res = artifactResolver.resolve(req);\r
- // Set<Artifact> artifacts = res.getArtifacts();\r
- // for (Artifact art : artifacts) {\r
- // log.debug(art);\r
- // }\r
- } catch (Exception e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
- }\r
- }\r
-\r
- public void testMaven() {\r
- Thread.currentThread().setContextClassLoader(\r
- getClass().getClassLoader());\r
- String[] goals = { "-o", "-e", "-f",\r
- "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk/pom.xml",\r
- "dependency:tree" };\r
-\r
- // String m2Home = "/opt/apache-maven-3.0.1";\r
- // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf");\r
- // System.setProperty("maven.home", m2Home);\r
- //\r
- // Launcher.main(goals);\r
-\r
- CustomCli mavenCli = new CustomCli();\r
- mavenCli.doMain(goals,\r
- "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk",\r
- System.out, System.err);\r
-\r
- PlexusContainer plexusContainer = mavenCli.getContainer();\r
- log.debug(plexusContainer.getContext().getContextData());\r
- plexusContainer.dispose();\r
- }\r
-\r
- public void testAether() {\r
- try {\r
- RepositorySystem repoSystem = createRepositorySystem();\r
-\r
- RepositorySystemSession session = createRepositorySystemSession(repoSystem);\r
-\r
- Dependency dependency = new Dependency(new DefaultArtifact(\r
- "org.argeo.slc.dep:org.argeo.slc.dep.sdk:0.13.1-SNAPSHOT"),\r
- "compile");\r
- RemoteRepository argeo = new RemoteRepository("argeo", "default",\r
- "http://maven.argeo.org/argeo/");\r
- RemoteRepository argeoSnapshots = new RemoteRepository(\r
- "argeo-snapshots", "default",\r
- "http://dev.argeo.org/maven/argeo-snapshots/");\r
-\r
- CollectRequest collectRequest = new CollectRequest();\r
- collectRequest.setRoot(dependency);\r
- collectRequest.addRepository(argeo);\r
- collectRequest.addRepository(argeoSnapshots);\r
- DependencyNode node = repoSystem.collectDependencies(session,\r
- collectRequest).getRoot();\r
-\r
- repoSystem.resolveDependencies(session, node, null);\r
-\r
- PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();\r
- node.accept(nlg);\r
-\r
- for (Artifact artifact : nlg.getArtifacts(true)) {\r
- log.debug(artifact);\r
- }\r
-\r
- AetherUtils.logDependencyNode(0, node);\r
- // System.out.println(nlg.getClassPath());\r
-\r
- } catch (Exception e) {\r
- throw new SlcException("Cannot resolve", e);\r
- }\r
-\r
- }\r
-\r
- /** Creates a Maven {@link RepositorySystem}. */\r
- public static RepositorySystem createRepositorySystem() {\r
- try {\r
- // return new\r
- // DefaultPlexusContainer().lookup(RepositorySystem.class);\r
-\r
- DefaultServiceLocator locator = new DefaultServiceLocator();\r
-\r
- locator.setServices(WagonProvider.class, new ManualWagonProvider());\r
- locator.addService(RepositoryConnectorFactory.class,\r
- WagonRepositoryConnectorFactory.class);\r
-\r
- return locator.getService(RepositorySystem.class);\r
- } catch (Exception e) {\r
- throw new SlcException("Cannot lookup repository system", e);\r
- }\r
- }\r
-\r
- public static RepositorySystemSession createRepositorySystemSession(\r
- RepositorySystem system) {\r
- MavenRepositorySystemSession session = new MavenRepositorySystemSession();\r
-\r
- LocalRepository localRepo = new LocalRepository(\r
- System.getProperty("user.home") + "/.m2/repository");\r
- session.setLocalRepositoryManager(system\r
- .newLocalRepositoryManager(localRepo));\r
- session.setTransferListener(new ConsoleTransferListener(System.out));\r
- session.setRepositoryListener(new ConsoleRepositoryListener());\r
- return session;\r
- }\r
-\r
- public static void main(String[] args) {\r
- new MavenManager().init();\r
- }\r
-\r
-}\r
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.FactoryBean;
-
-public class MavenToUrl implements FactoryBean {
- private List<MavenFile> mavenFiles;
- private String baseUrl;
-
- public List<String> asUrls() {
- List<String> urls = new ArrayList<String>();
- for (MavenFile mf : mavenFiles)
- urls.add(convertToUrl(mf));
- return urls;
- }
-
- public String convertToUrl(MavenFile mf) {
- return baseUrl + mf.getGroupId().replace('.', '/') + '/'
- + mf.getArtifactId() + '/' + mf.getVersion() + '/'
- + mf.getArtifactId() + '-' + mf.getVersion() + '.'
- + mf.getType();
- }
-
- public void setMavenFiles(List<MavenFile> mavenFiles) {
- this.mavenFiles = mavenFiles;
- }
-
- public void setBaseUrl(String baseUrl) {
- this.baseUrl = baseUrl;
- }
-
- public Object getObject() throws Exception {
- return asUrls();
- }
-
- public Class<?> getObjectType() {
- return List.class;
- }
-
- public boolean isSingleton() {
- return false;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * 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.
- */
-package org.argeo.slc.maven;
-
-public class RemoteRepo {
- private String id;
- private String url;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
-}
+++ /dev/null
-<!--\r
-\r
- Copyright (C) 2007-2012 Argeo GmbH\r
-\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-\r
--->\r
-<project>\r
-\r
- <target name="deployZip">
- <unzip src="${src}" dest="${tempDir}" />
- <copyFromTemp />
- </target>
-
- <target name="deployTarGz">
- <untar src="${src}" dest="${tempDir}" compression="gzip" />
- <copyFromTemp />
- </target>
-
- <macrodef name="copyFromTemp">
- <sequential>
- <copy todir="${dest}" includeemptydirs="true">
- <fileset dir="${tempDir}">
- <include name="**/*" />
- </fileset>
- <mapper classname="org.argeo.slc.ant.RemoveRootDirMapper" to="${removeRootDir}" />
- </copy>
- </sequential>
- </macrodef>
-</project>
\ No newline at end of file
+++ /dev/null
-# Set root logger level to DEBUG and its only appender to A1.\r
-log4j.rootLogger=WARN, console\r
-\r
-## Levels\r
-log4j.logger.org.argeo=DEBUG\r
-log4j.logger.org.argeo.slc.osgi.FileSystemBundleRegister=DEBUG\r
-\r
-## Appenders\r
-log4j.appender.console=org.apache.log4j.ConsoleAppender\r
-log4j.appender.console.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c%n\r
-\r
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>argeo-slc</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <groupId>org.argeo.slc</groupId>
- <artifactId>runtime</artifactId>
- <packaging>pom</packaging>
- <name>SLC Runtime</name>
- <modules>
- <module>org.argeo.slc.specs</module>
- <module>org.argeo.slc.core</module>
- <module>org.argeo.slc.unit</module>
- <module>org.argeo.slc.support.simple</module>
- <module>org.argeo.slc.support.osgi</module>
- <module>org.argeo.slc.support.equinox</module>
- <module>org.argeo.slc.support.ant</module>
- <module>org.argeo.slc.support.aether</module>
- <module>org.argeo.slc.support.maven</module>
- <module>org.argeo.slc.support.jemmy</module>
- <module>org.argeo.slc.support.jcr</module>
- <module>org.argeo.slc.detached</module>
- <module>org.argeo.slc.detached.launcher</module>
- <module>org.argeo.slc.launcher</module>
- <module>org.argeo.slc.lib.detached</module>
- <module>org.argeo.slc.repo</module>
- <module>org.argeo.slc.rpmfactory</module>
- </modules>
-</project>
--- /dev/null
+/MANIFEST.MF
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>lib</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.lib.build</artifactId>
--- /dev/null
+/MANIFEST.MF
\r
<!-- REFERENCES -->\r
<reference id="repositoryFactory" interface="javax.jcr.RepositoryFactory" />\r
- <reference id="fileSystemManager" interface="org.apache.commons.vfs.FileSystemManager" />\r
+ <reference id="fileSystemManager" interface="org.apache.commons.vfs2.FileSystemManager" />\r
</beans:beans>
\ No newline at end of file
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>lib</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.lib.jcr</artifactId>
--- /dev/null
+/MANIFEST.MF
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>lib</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.lib.repo</artifactId>
--- /dev/null
+/MANIFEST.MF
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>lib</artifactId>
- <version>2.1.1-SNAPSHOT</version>
+ <version>2.1.8-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.lib.rpmfactory</artifactId>
<name>SLC Standard Libs</name>
<description>SLC execution modules for generic tasks, to be used as parent pom</description>
<modules>
- <!-- <module>org.argeo.slc.lib.build</module> -->
- <!-- <module>org.argeo.slc.lib.jcr</module> -->
- <!-- <module>org.argeo.slc.lib.repo</module> -->
- <!-- <module>org.argeo.slc.lib.rpmfactory</module> -->
+ <module>org.argeo.slc.lib.build</module>
+ <module>org.argeo.slc.lib.jcr</module>
+ <module>org.argeo.slc.lib.repo</module>
+ <module>org.argeo.slc.lib.rpmfactory</module>
</modules>
<properties>
<additionalImports.slc-lib>
</additionalImports.slc-lib>
</properties>
<build>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>.*</exclude>
- <exclude>.*/**</exclude>
- <exclude>pom.xml</exclude>
- <exclude>build.properties</exclude>
- </excludes>
- </resource>
- </resources>
+<!-- <resources> -->
+<!-- <resource> -->
+<!-- <directory>.</directory> -->
+<!-- <includes> -->
+<!-- <include>**</include> -->
+<!-- </includes> -->
+<!-- <excludes> -->
+<!-- <exclude>.*</exclude> -->
+<!-- <exclude>.*/**</exclude> -->
+<!-- <exclude>pom.xml</exclude> -->
+<!-- <exclude>build.properties</exclude> -->
+<!-- </excludes> -->
+<!-- </resource> -->
+<!-- </resources> -->
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.slc.launcher</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+/MANIFEST.MF
--- /dev/null
+Main-Class: org.argeo.slc.cli.SlcMain
\ No newline at end of file
--- /dev/null
+source.. = src/main/java/,\
+ src/main/resources/
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>argeo-slc</artifactId>
+ <version>2.1.8-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.slc.launcher</artifactId>
+ <packaging>jar</packaging>
+ <name>SLC Launcher</name>
+ <build>
+ <plugins>
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-assembly-plugin</artifactId> -->
+<!-- <configuration> -->
+<!-- <descriptors> -->
+<!-- <descriptor>assembly/base.xml</descriptor> -->
+<!-- </descriptors> -->
+<!-- </configuration> -->
+<!-- <executions> -->
+<!-- <execution> -->
+<!-- <id>assembly-base</id> -->
+<!-- <phase>package</phase> -->
+<!-- <goals> -->
+<!-- <goal>single</goal> -->
+<!-- </goals> -->
+<!-- </execution> -->
+<!-- </executions> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.felix</groupId> -->
+<!-- <artifactId>maven-bundle-plugin</artifactId> -->
+<!-- <configuration> -->
+<!-- <instructions> -->
+<!-- <Main-Class>org.argeo.slc.cli.SlcMain</Main-Class> -->
+<!-- </instructions> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <artifactId>maven-resources-plugin</artifactId> -->
+<!-- <executions> -->
+<!-- <execution> -->
+<!-- <phase>validate</phase> -->
+<!-- <goals> -->
+<!-- <goal>copy-resources</goal> -->
+<!-- </goals> -->
+<!-- <configuration> -->
+<!-- <outputDirectory>${basedir}/target/base</outputDirectory> -->
+<!-- <resources> -->
+<!-- <resource> -->
+<!-- <directory>base</directory> -->
+<!-- <filtering>true</filtering> -->
+<!-- </resource> -->
+<!-- </resources> -->
+<!-- </configuration> -->
+<!-- </execution> -->
+<!-- </executions> -->
+<!-- </plugin> -->
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.argeo.commons</groupId>
+ <artifactId>org.argeo.osgi.boot</artifactId>
+ <version>${version.argeo-commons}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.cli;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceLoader;
+import java.util.UUID;
+
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+
+import org.argeo.osgi.boot.OsgiBoot;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.launch.Framework;
+import org.osgi.framework.launch.FrameworkFactory;
+
+/** Configures an SLC runtime and runs a process. */
+public class SlcMain implements PrivilegedAction<String> {
+ public final static String NIX = "NIX";
+ public final static String WINDOWS = "WINDOWS";
+ public final static String SOLARIS = "SOLARIS";
+
+ public final static String os;
+ public final static String slcDirName = ".slc";
+ final static File homeDir = new File(System.getProperty("user.home"));
+
+ static {
+ String osName = System.getProperty("os.name");
+ if (osName.startsWith("Win"))
+ os = WINDOWS;
+ else if (osName.startsWith("Solaris"))
+ os = SOLARIS;
+ else
+ os = NIX;
+ }
+
+ private Long timeout = 30 * 1000l;
+ private final String[] args;
+ private final File confDir;
+ private final File dataDir;
+ private final File modulesDir;
+
+ private final List<String> bundlesToStart = new ArrayList<String>();
+
+ public SlcMain(String[] args, File confDir, File dataDir, File modulesDir) {
+ this.args = args;
+ this.confDir = confDir;
+ this.dataDir = dataDir;
+ this.modulesDir = modulesDir;
+ bundlesToStart.add("org.springframework.osgi.extender");
+ bundlesToStart.add("org.argeo.node.repo.jackrabbit");
+ bundlesToStart.add("org.argeo.security.dao.os");
+ bundlesToStart.add("org.argeo.slc.node.jackrabbit");
+ bundlesToStart.add("org.argeo.slc.agent");
+ bundlesToStart.add("org.argeo.slc.agent.jcr");
+ if (args.length == 0)
+ bundlesToStart.add("org.argeo.slc.support.equinox");
+ // bundlesToStart.add("org.argeo.slc.agent.cli");
+ }
+
+ public String run() {
+ long begin = System.currentTimeMillis();
+
+ Framework framework = null;
+ try {
+ info("## Date : " + new Date());
+ info("## Data : " + dataDir.getCanonicalPath());
+
+ // Start Equinox
+ ServiceLoader<FrameworkFactory> ff = ServiceLoader
+ .load(FrameworkFactory.class);
+ FrameworkFactory frameworkFactory = ff.iterator().next();
+ Map<String, String> configuration = new HashMap<String, String>();
+ configuration.put("osgi.configuration.area",
+ confDir.getCanonicalPath());
+ configuration.put("osgi.instance.area", dataDir.getCanonicalPath());
+ // Do clean
+ configuration.put("osgi.clean", "true");
+ if (args.length == 0) {
+ configuration.put("osgi.console", "");
+ }
+
+ // Spring configs currently require System properties
+ System.getProperties().putAll(configuration);
+
+ framework = frameworkFactory.newFramework(configuration);
+ framework.start();
+ BundleContext bundleContext = framework.getBundleContext();
+
+ // OSGi bootstrap
+ OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
+
+ // working copy modules
+ if (modulesDir.exists())
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(modulesDir
+ .getCanonicalPath() + ";in=*;ex=.gitignore"));
+
+ // system modules
+ if (System.getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES) != null)
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
+ .getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES)));
+ else
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
+ .getProperty("user.home") + "/.slc/modules/;in=**"));
+
+ // Start runtime
+ osgiBoot.startBundles(bundlesToStart);
+
+ // Find SLC Agent
+ ServiceReference sr = null;
+ while (sr == null) {
+ sr = bundleContext
+ .getServiceReference("org.argeo.slc.execution.SlcAgentCli");
+ if (System.currentTimeMillis() - begin > timeout)
+ throw new RuntimeException("Cannot find SLC agent CLI");
+ Thread.sleep(100);
+ }
+ Object agentCli = bundleContext.getService(sr);
+
+ // Initialization completed
+ long duration = System.currentTimeMillis() - begin;
+ info("[[ Initialized in " + (duration / 1000) + "s "
+ + (duration % 1000) + "ms ]]");
+
+ if (args.length == 0)
+ return null;// console mode
+
+ // Subject.doAs(Subject.getSubject(AccessController.getContext()),
+ // new AgentCliCall(agentCli));
+ Class<?>[] parameterTypes = { String[].class };
+ Method method = agentCli.getClass().getMethod("process",
+ parameterTypes);
+ Object[] methodArgs = { args };
+ Object ret = method.invoke(agentCli, methodArgs);
+
+ // Shutdown OSGi runtime
+ framework.stop();
+ framework.waitForStop(60 * 1000);
+
+ return ret.toString();
+ } catch (Exception e) {
+ // Shutdown OSGi runtime
+ if (framework != null)
+ try {
+ framework.stop();
+ framework.waitForStop(15 * 1000);
+ } catch (Exception silent) {
+ }
+ throw new RuntimeException("Cannot run SLC command line", e);
+ } finally {
+
+ }
+ }
+
+ public static void main(String[] args) {
+ try {
+ // Prepare directories
+ File executionDir = new File(System.getProperty("user.dir"));
+ File slcDir;
+ Boolean isTransient = false;
+ if (isTransient) {
+ File tempDir = new File(System.getProperty("java.io.tmpdir")
+ + "/" + System.getProperty("user.name"));
+ slcDir = new File(tempDir, "slc-"
+ + UUID.randomUUID().toString());
+ slcDir.mkdirs();
+ System.setProperty("argeo.node.repo.configuration",
+ "osgibundle:repository-memory.xml");
+ } else {
+ slcDir = findSlcDir(executionDir);
+ if (slcDir == null) {
+ slcDir = new File(executionDir, slcDirName);
+ slcDir.mkdirs();
+ info("## Creating an SLC node at " + slcDir + " ...");
+ }
+ }
+
+ File dataDir = new File(slcDir, "data");
+ if (!dataDir.exists())
+ dataDir.mkdirs();
+
+ File confDir = new File(slcDir, "conf");
+ if (!confDir.exists())
+ confDir.mkdirs();
+
+ File modulesDir = new File(slcDir, "modules");
+
+ // JAAS
+// File jaasFile = new File(confDir, "jaas.config");
+// if (!jaasFile.exists())
+// copyResource("/org/argeo/slc/cli/jaas.config", jaasFile);
+// System.setProperty("java.security.auth.login.config",
+// jaasFile.getCanonicalPath());
+
+ // log4j
+ File log4jFile = new File(confDir, "log4j.properties");
+ if (!log4jFile.exists())
+ copyResource("/org/argeo/slc/cli/log4j.properties", log4jFile);
+ System.setProperty("log4j.configuration",
+ "file://" + log4jFile.getCanonicalPath());
+ // Run as a privileged action
+// LoginContext lc = new LoginContext(os);
+// lc.login();
+//
+// Subject subject = Subject.getSubject(AccessController.getContext());
+// Subject.doAs(subject, new SlcMain(args, confDir, dataDir,
+// modulesDir));
+SlcMain slcMain = new SlcMain(args, confDir, dataDir,
+ modulesDir);
+slcMain.run();
+ if (args.length != 0)
+ System.exit(0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ /**
+ * Recursively look in parent directories for a directory named
+ * {@link #slcDirName}
+ */
+ protected static File findSlcDir(File currentDir) {
+ File slcDir = new File(currentDir, slcDirName);
+ // covers the use case of running from the home directory
+ if (slcDir.exists() && slcDir.isDirectory())
+ return slcDir;
+ File parentDir = currentDir.getParentFile();
+ if (parentDir == null)
+ return null;
+ try {
+ // ~/.slc reserved for agent
+ if (parentDir.getCanonicalPath().equals(homeDir.getCanonicalPath()))
+ return null;
+ } catch (IOException e) {
+ throw new RuntimeException("Cannot check home directory", e);
+ }
+ return findSlcDir(parentDir);
+ }
+
+ protected static void copyResource(String resource, File targetFile) {
+ InputStream input = null;
+ FileOutputStream output = null;
+ try {
+ input = SlcMain.class.getResourceAsStream(resource);
+ output = new FileOutputStream(targetFile);
+ byte[] buf = new byte[8192];
+ while (true) {
+ int length = input.read(buf);
+ if (length < 0)
+ break;
+ output.write(buf, 0, length);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Cannot write " + resource + " file to "
+ + targetFile, e);
+ } finally {
+ try {
+ input.close();
+ } catch (Exception ignore) {
+ }
+ try {
+ output.close();
+ } catch (Exception ignore) {
+ }
+ }
+
+ }
+
+ protected static void info(Object msg) {
+ System.out.println(msg);
+ }
+
+ protected static void err(Object msg) {
+ System.err.println(msg);
+ }
+
+ protected static void debug(Object msg) {
+ System.out.println(msg);
+ }
+
+}
+
+// private String bundlesToInstall = System.getProperty("user.home")
+// +
+// "/dev/src/slc/dep/org.argeo.slc.dep.minimal/target/dependency;in=*.jar,"
+// + System.getProperty("user.home")
+// + "/dev/src/slc/demo/modules;in=*;ex=pom.xml;ex=.svn";
+
+// ServiceTracker agentTracker = new ServiceTracker(bundleContext,
+// "org.argeo.slc.execution.SlcAgentCli", null);
+// agentTracker.open();
+// final Object agentCli = agentTracker.waitForService(30 * 1000);
+// if (agentCli == null)
+// throw new RuntimeException("Cannot find SLC agent CLI");
+
+// protected class AgentCliCall implements PrivilegedAction<String> {
+// private final Object agentCli;
+//
+// public AgentCliCall(Object agentCli) {
+// super();
+// this.agentCli = agentCli;
+// }
+//
+// public String run() {
+// try {
+// Class<?>[] parameterTypes = { String[].class };
+// Method method = agentCli.getClass().getMethod("process",
+// parameterTypes);
+// Object[] methodArgs = { args };
+// Object ret = method.invoke(agentCli, methodArgs);
+// return ret.toString();
+// } catch (Exception e) {
+// throw new RuntimeException("Cannot run "
+// + Arrays.toString(args) + " on " + agentCli, e);
+// }
+// }
+//
+// }
+
--- /dev/null
+NIX {
+ com.sun.security.auth.module.UnixLoginModule required;
+};
+
+WINDOWS {
+ com.sun.security.auth.module.NTLoginModule required;
+};
--- /dev/null
+log4j.rootLogger=WARN, console
+#log4j.rootLogger=DEBUG, development
+
+## Levels
+log4j.logger.org.argeo=INFO
+
+log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
+log4j.logger.org.apache.jackrabbit.core.config.ConfigurationErrorHandler=ERROR
+log4j.logger.org.apache.jackrabbit.core.util.db.DbUtility=FATAL
+
+## Appenders
+# default appender
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %m%n
+
+# development appender
+log4j.appender.development=org.apache.log4j.ConsoleAppender
+log4j.appender.development.layout=org.apache.log4j.PatternLayout
+log4j.appender.development.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p %m [%16.16t] %c%n
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="lib" path="lib/aether-transport-wagon-1.0.1.v20141111.jar"/>
+ <classpathentry kind="lib" path="lib/cdi-api-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/jsoup-1.6.1.jar"/>
+ <classpathentry kind="lib" path="lib/jsr250-api-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/maven-aether-provider-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-artifact-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-compat-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-core-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-embedder-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-model-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-model-builder-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-plugin-api-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-repository-metadata-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-settings-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/maven-settings-builder-3.2.5.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.sisu.inject-0.3.0.M1.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.sisu.plexus-0.3.0.M1.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-cipher-1.7.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-classworlds-2.5.2.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-interpolation-1.21.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-sec-dispatcher-1.3.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-utils-3.0.20.jar"/>
+ <classpathentry kind="lib" path="lib/sisu-guice-3.2.3-no_aop.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-file-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-http-lightweight-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-http-shared-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-provider-api-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-webdav-jackrabbit-1.0.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="lib/aether-connector-wagon-1.11.jar"/>
+ <classpathentry kind="lib" path="lib/google-collections-1.0.jar"/>
+ <classpathentry kind="lib" path="lib/maven-aether-provider-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-artifact-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-compat-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-core-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-embedder-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-model-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-model-builder-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-plugin-api-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-repository-metadata-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-settings-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/maven-settings-builder-3.0.3.jar"/>
+ <classpathentry kind="lib" path="lib/nekohtml-1.9.6.2.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-cipher-1.4.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-classworlds-2.4.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-container-default-1.5.5.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-interpolation-1.14.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-sec-dispatcher-1.3.jar"/>
+ <classpathentry kind="lib" path="lib/plexus-utils-2.0.6.jar"/>
+ <classpathentry kind="lib" path="lib/sisu-guice-2.9.4-no_aop.jar"/>
+ <classpathentry kind="lib" path="lib/sisu-inject-bean-2.1.1.jar"/>
+ <classpathentry kind="lib" path="lib/sisu-inject-plexus-2.1.1.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-file-1.0-beta-7.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-http-lightweight-1.0-beta-7.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-http-shared-1.0-beta-7.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-provider-api-1.0-beta-7.jar"/>
+ <classpathentry kind="lib" path="lib/wagon-webdav-jackrabbit-1.0-beta-7.jar"/>
+ <classpathentry kind="lib" path="lib/xbean-reflect-3.4.jar"/>
+ <classpathentry kind="lib" path="lib/aether-impl-1.11.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
--- /dev/null
+/target/
+/bin/
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.slc.support.maven</name>
+ <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
--- /dev/null
+Manifest-Version: 1.0\r
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt\r
+Bundle-ManifestVersion: 2\r
+Bundle-Name: SLC Third Party Support\r
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8\r
+Bundle-SymbolicName: org.argeo.slc.support.maven\r
+Bundle-Version: 2.1.8.SNAPSHOT-r201703070941\r
+Import-Package: com.jcraft.jsch;version="[0.1,1)",\r
+ javax.jcr;version="[2.0,3)",\r
+ javax.mail;version="[1.5,2)",\r
+ javax.mail.internet;version="[1.5,2)",\r
+ javax.security.auth,\r
+ javax.security.auth.callback,\r
+ javax.security.auth.login,\r
+ javax.sql,\r
+ javax.swing,\r
+ javax.swing.plaf.metal,\r
+ junit.framework;version="[4.11,5)";resolution:=optional,\r
+ org.apache.commons.exec;version="[1.3,2)",\r
+ org.apache.commons.io;version="[2.4,3)",\r
+ org.apache.commons.logging;version="[1.1,2)",\r
+ org.apache.commons.vfs2;version="[2.0,3)",\r
+ org.apache.commons.vfs2.impl;version="[2.0,3)",\r
+ org.apache.log4j;version="[1.2,2)",\r
+ org.apache.log4j.spi;version="[1.2,2)",\r
+ org.argeo.jcr;version="[2.1,3)",\r
+ org.argeo.node;version="[2.1,3)",\r
+ org.argeo.slc;version="[2.1,3)",\r
+ org.argeo.slc.aether.osgi,\r
+ org.argeo.slc.aether,\r
+ org.eclipse.aether.util.graph.visitor,\r
+ org.eclipse.aether.spi.locator,\r
+ org.argeo.slc.build;version="[2.1,3)",\r
+ org.argeo.slc.core.deploy;version="[2.1,3)",\r
+ org.argeo.slc.core.execution;version="[2.1,3)",\r
+ org.argeo.slc.core.execution.tasks;version="[2.1,3)",\r
+ org.argeo.slc.deploy;version="[2.1,3)",\r
+ org.argeo.slc.execution;version="[2.1,3)",\r
+ org.argeo.slc.jsch,\r
+ org.eclipse.aether;version="[1.0,2)",\r
+ org.eclipse.aether.artifact;version="[1.0,2)",\r
+ org.eclipse.aether.collection;version="[1.0,2)",\r
+ org.eclipse.aether.graph;version="[1.0,2)",\r
+ org.eclipse.aether.impl;version="[1.0,2)",\r
+ org.eclipse.aether.metadata;version="[1.0,2)",\r
+ org.eclipse.aether.repository;version="[1.0,2)",\r
+ org.eclipse.aether.resolution;version="[1.0,2)",\r
+ org.eclipse.aether.transfer;version="[1.0,2)",\r
+ org.eclipse.aether.util.repository;version="[1.0,2)",\r
+ org.eclipse.aether.version;version="[1.0,2)",\r
+ org.osgi.framework;version="[1.8,2)",\r
+ org.springframework.beans.factory;version="[3.2,4)",\r
+ org.springframework.core.io;version="[3.2,4)",\r
+ org.springframework.util;version="[3.2,4)",\r
+ org.tmatesoft.svn.core;version="[1.8,2)",\r
+ org.tmatesoft.svn.core.internal.io.dav;version="[1.8,2)",\r
+ org.tmatesoft.svn.core.internal.io.fs;version="[1.8,2)",\r
+ org.tmatesoft.svn.core.io;version="[1.8,2)",\r
+ org.tmatesoft.svn.core.wc;version="[1.8,2)",\r
+ org.tmatesoft.svn.core.wc.admin;version="[1.8,2)"\r
+Include-Resource: org/argeo/slc/lib/linux/redhat.xml=src/org/argeo/slc/l\r
+ ib/linux/redhat.xml,org/argeo/slc/lib/linux/lxc-init-host.sh=src/org/ar\r
+ geo/slc/lib/linux/lxc-init-host.sh,org/argeo/slc/lib/linux/lxc-init-gue\r
+ st.sh=src/org/argeo/slc/lib/linux/lxc-init-guest.sh,org/argeo/slc/diff/\r
+ package.html=src/org/argeo/slc/diff/package.html,org/argeo/slc/jsch/jaa\r
+ s.cfg=src/org/argeo/slc/jsch/jaas.cfg\r
+Private-Package: org.argeo.slc.lib.linux,org.argeo.slc.lib.linux.rpmfact\r
+ ory,org.argeo.slc.lib.vbox,org.argeo.slc.lib.jcr,org.argeo.slc.lib.svn,\r
+ org.argeo.slc.support.deploy,org.argeo.slc.support.deploy.db,org.argeo.\r
+ slc.aether.spring,org.argeo.slc.aether,org.argeo.slc.aether.osgi,org.ar\r
+ geo.slc.log4j,org.argeo.slc.diff,org.argeo.slc.mail,org.argeo.slc.vfs,o\r
+ rg.argeo.slc.jsch\r
+Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"\r
+SLC-Category: org.argeo.slc\r
--- /dev/null
+/MANIFEST.MF
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+ http://www.springframework.org/schema/beans \r
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+ <!-- SERVICES -->\r
+ <service ref="mavenRepositorySystem" interface="org.sonatype.aether.RepositorySystem">\r
+ <service-properties>\r
+ <beans:entry key="aether.repositorySystemType" value="maven" />\r
+ </service-properties>\r
+ </service>\r
+\r
+ <service ref="defaultMavenRepositorySystemSession" interface="org.sonatype.aether.RepositorySystemSession">\r
+ <service-properties>\r
+ <beans:entry key="aether.repositorySystemType" value="maven" />\r
+ </service-properties>\r
+ </service>\r
+</beans:beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+
+ <bean id="mavenRepositorySystem" class="org.argeo.slc.maven.MavenManager"
+ factory-method="createRepositorySystem">
+ </bean>
+
+ <bean id="defaultMavenRepositorySystemSession" class="org.argeo.slc.maven.MavenManager"
+ factory-method="createRepositorySystemSession">
+ <constructor-arg ref="mavenRepositorySystem" />
+ </bean>
+</beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>argeo-slc</artifactId>
+ <version>2.1.8-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.slc.support.maven</artifactId>
+ <packaging>bundle</packaging>
+ <name>SLC Support Maven</name>
+ <properties>
+ <version.aether>1.0.1.v20141111</version.aether>
+ <version.maven>3.2.5</version.maven>
+ <version.wagon>1.0</version.wagon>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.argeo.slc.maven.*
+ </Export-Package>
+ <Import-Package>
+ org.w3c.dom.*;version="0.0.0",
+ org.xml.sax.*;version="0.0.0",
+ com.google.*;resolution:=optional,
+ javax.*;resolution:=optional,
+ com.sun.*;resolution:=optional,
+ org.objectweb.asm.*;resolution:=optional,
+ *;resolution:=optional
+ </Import-Package>
+ <_exportcontents>
+ org.apache.maven.*;version=${version.maven},
+ </_exportcontents>
+ <Private-Package>org.apache.xbean.*</Private-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Embed-Directory>lib</Embed-Directory>
+ <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <excludeScope>provided</excludeScope>
+ <outputDirectory>lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.api</artifactId>
+ <version>2.1.8-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.support</artifactId>
+ <version>2.1.8-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- <dependency> <groupId>org.argeo.dep.osgi</groupId> <artifactId>org.argeo.dep.osgi.maven.embedder</artifactId>
+ </dependency> -->
+ <!-- <dependency> -->
+ <!-- <groupId>org.argeo.tp.spring</groupId> -->
+ <!-- <artifactId>org.springframework.beans</artifactId> -->
+ <!-- </dependency> -->
+ <!-- <dependency> -->
+ <!-- <groupId>org.argeo.tp.apache.commons</groupId> -->
+ <!-- <artifactId>org.apache.commons.io</artifactId> -->
+ <!-- </dependency> -->
+
+ <!-- <dependency> -->
+ <!-- <groupId>org.argeo.tp.misc</groupId> -->
+ <!-- <artifactId>org.slf4j.commons.logging</artifactId> -->
+ <!-- </dependency> -->
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-embedder</artifactId>
+ <version>${version.maven}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-spi</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-transport-wagon</artifactId>
+ <version>${version.aether}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-spi</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-util</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>${version.wagon}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>${version.wagon}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${version.wagon}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>xercesMinimal</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>${version.wagon}</version>
+ <optional>true</optional>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-nop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-webdav</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.eclipse.sisu</groupId> -->
+<!-- <artifactId>org.eclipse.sisu.plexus</artifactId> -->
+<!-- <version>0.3.3</version> -->
+<!-- </dependency> -->
+
+ <!-- <dependency> -->
+ <!-- <groupId>org.argeo.tp.aether</groupId> -->
+ <!-- <artifactId>org.eclipse.aether.api</artifactId> -->
+ <!-- <scope>provided</scope> -->
+ <!-- </dependency> -->
+
+ <!-- <dependency> -->
+ <!-- <groupId>org.argeo.tp.sdk</groupId> -->
+ <!-- <artifactId>org.junit</artifactId> -->
+ <!-- <scope>provided</scope> -->
+ <!-- </dependency> -->
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>https://repo1.maven.org/maven2/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+</project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+import org.apache.maven.cli.MavenCli;
+import org.codehaus.plexus.PlexusContainer;
+
+/** Custom Maven CLI, giving access to the underlying Plexus container. */
+class CustomCli extends MavenCli {
+ private PlexusContainer container;
+
+ @Override
+ protected void customizeContainer(PlexusContainer container) {
+ this.container = container;
+ }
+
+ public PlexusContainer getContainer() {
+ return container;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.core.io.Resource;
+
+public class DependencyFileLoader implements FactoryBean{
+ private final static Log log = LogFactory.getLog(DependencyFileLoader.class);
+
+ private Resource dependenciesResource;
+
+ @SuppressWarnings("unchecked")
+ public List<MavenFile> loadMavenFiles() {
+ try {
+ List<MavenFile> mavenFiles = new ArrayList<MavenFile>();
+
+ List<String> lines = IOUtils.readLines(dependenciesResource
+ .getInputStream());
+ for (String line : lines) {
+ try {
+ line = line.trim();
+ if (line.equals("")
+ || line
+ .startsWith("The following files have been resolved:"))
+ continue;// skip
+
+ mavenFiles.add(convert(line));
+ } catch (Exception e) {
+ log.warn("Could not load line " + line);
+ }
+ }
+
+ return mavenFiles;
+ } catch (IOException e) {
+ throw new SlcException("Could not read dependencies resource "
+ + dependenciesResource, e);
+ }
+ }
+
+ protected MavenFile convert(String str) {
+ StringTokenizer st = new StringTokenizer(str, ":");
+ MavenFile component = new MavenFile();
+ component.setGroupId(st.nextToken());
+ component.setArtifactId(st.nextToken());
+ component.setType(st.nextToken());
+ component.setVersion(st.nextToken());
+ component.setScope(st.nextToken());
+ return component;
+ }
+
+ public void setDependenciesResource(Resource dependenciesResource) {
+ this.dependenciesResource = dependenciesResource;
+ }
+
+ public Object getObject() throws Exception {
+ return loadMavenFiles();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Class<List> getObjectType() {
+ return List.class;
+ }
+
+ public boolean isSingleton() {
+ return false;
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *******************************************************************************/
+
+import org.apache.maven.wagon.Wagon;
+import org.apache.maven.wagon.providers.file.FileWagon;
+import org.apache.maven.wagon.providers.http.LightweightHttpWagon;
+import org.apache.maven.wagon.providers.webdav.WebDavWagon;
+import org.eclipse.aether.transport.wagon.WagonProvider;
+
+public class ManualWagonProvider implements WagonProvider {
+
+ public Wagon lookup(String roleHint) throws Exception {
+ if ("file".equals(roleHint)) {
+ return new FileWagon();
+ } else if ("http".equals(roleHint)) {
+ return new LightweightHttpWagon();
+ } else if ("webdav".equals(roleHint)) {
+ return new WebDavWagon();
+ }
+ return null;
+ }
+
+ public void release(Wagon wagon) {
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.codehaus.plexus.PlexusContainer;
+
+/** A Maven execution. */
+public class MavenCall implements Runnable {
+ private final static Log log = LogFactory.getLog(MavenCall.class);
+ private String basedir;
+ private String settings;
+ /** Raw command lines arguments */
+ private String cl;
+ private List<String> goals;
+ private List<String> profiles;
+ private Map<String, String> properties;
+
+ private Boolean success = null;
+
+ public void run() {
+ Thread.currentThread().setContextClassLoader(
+ getClass().getClassLoader());
+ List<String> args = new ArrayList<String>();
+ args.add("-e");
+ if (settings != null && !settings.trim().equals("")) {
+ args.add("--settings");
+ args.add(settings);
+ }
+ args.add("-f");
+ args.add(getBasedirFile().getPath() + "/pom.xml");
+ // FIXME manages \" \". Use Commons CLI?
+ if (cl != null) {
+ String[] clArgs = cl.split(" ");
+ args.addAll(Arrays.asList(clArgs));
+ }
+
+ if (goals != null)
+ args.addAll(goals);
+ if (profiles != null)
+ for (String profile : profiles)
+ args.add("-P" + profile);
+ if (properties != null)
+ for (String key : properties.keySet())
+ args.add("-D" + key + "=\"" + properties.get(key) + "\"");
+
+ // String[] goals = { "-o", "-e", "-f", basedir + "/pom.xml", "clean",
+ // "install" };
+
+ // String m2Home = "/opt/apache-maven-3.0.1";
+ // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf");
+ // System.setProperty("maven.home", m2Home);
+ //
+ // Launcher.main(goals);
+ log.info("Maven call: " + args);
+
+ CustomCli mavenCli = new CustomCli();
+ int exitCode = mavenCli.doMain(args.toArray(new String[args.size()]),
+ getBasedirFile().getPath(), System.out, System.err);
+ if (log.isDebugEnabled())
+ log.debug("Maven exit code: " + exitCode);
+ if (exitCode == 0)
+ success = true;
+ else
+ success = false;
+
+ PlexusContainer plexusContainer = mavenCli.getContainer();
+ if (log.isDebugEnabled())
+ log.debug(plexusContainer.getContext().getContextData());
+ plexusContainer.dispose();
+ }
+
+ /** Removes 'file:' prefix if present */
+ protected File getBasedirFile() {
+ if (basedir == null)
+ throw new SlcException("basedir not set");
+ File dir;
+ if (basedir.startsWith("file:"))
+ dir = new File(basedir.substring("file:".length()));
+ else
+ dir = new File(basedir);
+ return dir;
+ }
+
+ public void setBasedir(String basedir) {
+ this.basedir = basedir;
+ }
+
+ public void setSettings(String settings) {
+ this.settings = settings;
+ }
+
+ public void setGoals(List<String> goals) {
+ this.goals = goals;
+ }
+
+ public void setProfiles(List<String> profiles) {
+ this.profiles = profiles;
+ }
+
+ public void setProperties(Map<String, String> properties) {
+ this.properties = properties;
+ }
+
+ public void setCl(String cl) {
+ this.cl = cl;
+ }
+
+ public Boolean getSuccess() {
+ return success == null ? false : success;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.deploy.DeployEnvironment;
+
+public abstract class MavenDeployEnvironment implements DeployEnvironment {
+ private static final Log log = LogFactory
+ .getLog(MavenDeployEnvironment.class);
+ private MavenManager mavenManager;
+
+ public void unpackTo(Object packg, File targetLocation,
+ Map<String, String> filter) {
+ File packageLocation=null;
+ String type = null;
+ String removeRootDir = "enabled";
+// if (packg instanceof MavenFile) {
+// packageLocation = mavenManager
+// .getPackageLocation((MavenFile) packg);
+// type = ((MavenFile) packg).getType();
+// } else
+ if (packg instanceof File) {
+ packageLocation = (File) packg;
+ // TODO: type based on extension
+ } else {
+ throw new SlcException("Unrecognized package type "
+ + packg.getClass());
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Unpack " + packageLocation + " of type " + type + " to "
+ + targetLocation);
+ }
+
+ try {
+ File tempDir = new File("/tmp/" + UUID.randomUUID().toString());
+ tempDir.mkdirs();
+ targetLocation.mkdirs();
+ Properties props = new Properties();
+ props.setProperty("dest", targetLocation.getAbsolutePath());
+ props.setProperty("src", packageLocation.getAbsolutePath());
+ props.setProperty("tempDir", tempDir.getAbsolutePath());
+ props.setProperty("removeRootDir", removeRootDir);
+
+ URL antUrl = getClass().getClassLoader().getResource(
+ "org/argeo/slc/support/deploy/ant/build.xml");
+
+ // if (type == null || type.equals("zip")) {
+ // new AntRunner(antUrl, "deployZip", props).run();
+ // } else if (type.equals("tar.gz")) {
+ // new AntRunner(antUrl, "deployTarGz", props).run();
+ // } else {
+ // throw new SlcException("Unknow package type " + type);
+ // }
+ throw new SlcException("Not implemented.");
+ } catch (SlcException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new SlcException("Cannot unpack package " + packg + " to "
+ + targetLocation, e);
+ }
+ }
+
+ public void setMavenManager(MavenManager mavenManager) {
+ this.mavenManager = mavenManager;
+ }
+
+}
--- /dev/null
+/*\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.maven;\r
+\r
+import org.argeo.slc.build.Distribution;\r
+import org.argeo.slc.deploy.DeploymentData;\r
+\r
+public class MavenFile implements Distribution, DeploymentData {\r
+ private String groupId;\r
+ private String artifactId;\r
+ private String version;\r
+ private String type;\r
+ private String classifier;\r
+ private String scope;\r
+\r
+ public String getScope() {\r
+ return scope;\r
+ }\r
+\r
+ public void setScope(String scope) {\r
+ this.scope = scope;\r
+ }\r
+\r
+ private String distributionId;\r
+\r
+ public String getDistributionId() {\r
+ return distributionId;\r
+ }\r
+\r
+ public void setDistributionId(String distributionId) {\r
+ this.distributionId = distributionId;\r
+ }\r
+\r
+ public String getGroupId() {\r
+ return groupId;\r
+ }\r
+\r
+ public void setGroupId(String groupId) {\r
+ this.groupId = groupId;\r
+ }\r
+\r
+ public String getArtifactId() {\r
+ return artifactId;\r
+ }\r
+\r
+ public void setArtifactId(String artifactId) {\r
+ this.artifactId = artifactId;\r
+ }\r
+\r
+ public String getVersion() {\r
+ return version;\r
+ }\r
+\r
+ public void setVersion(String version) {\r
+ this.version = version;\r
+ }\r
+\r
+ public String getType() {\r
+ return type;\r
+ }\r
+\r
+ public void setType(String type) {\r
+ this.type = type;\r
+ }\r
+\r
+ public String getClassifier() {\r
+ return classifier;\r
+ }\r
+\r
+ public void setClassifier(String classifier) {\r
+ this.classifier = classifier;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.maven;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.aether.AetherUtils;\r
+import org.argeo.slc.aether.ConsoleRepositoryListener;\r
+import org.argeo.slc.aether.ConsoleTransferListener;\r
+import org.codehaus.plexus.PlexusContainer;\r
+import org.eclipse.aether.DefaultRepositorySystemSession;\r
+import org.eclipse.aether.RepositorySystem;\r
+import org.eclipse.aether.RepositorySystemSession;\r
+import org.eclipse.aether.artifact.Artifact;\r
+import org.eclipse.aether.artifact.DefaultArtifact;\r
+import org.eclipse.aether.collection.CollectRequest;\r
+import org.eclipse.aether.graph.Dependency;\r
+import org.eclipse.aether.graph.DependencyNode;\r
+import org.eclipse.aether.impl.DefaultServiceLocator;\r
+import org.eclipse.aether.repository.LocalRepository;\r
+import org.eclipse.aether.repository.RemoteRepository;\r
+import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;\r
+\r
+public class MavenManager {\r
+ private final static Log log = LogFactory.getLog(MavenManager.class);\r
+\r
+ public void init() {\r
+ try {\r
+ testMaven();\r
+ testAether();\r
+ // List<ComponentDescriptor<?>> lst = plexusContainer\r
+ // .discoverComponents(plexusContainer.getContainerRealm());\r
+ // for (ComponentDescriptor<?> cd : lst) {\r
+ // log.debug(cd);\r
+ // }\r
+ // ArtifactHandler artifactHandler = plexusContainer\r
+ // .lookup(ArtifactHandler.class);\r
+ // ArtifactRepository localRepository = new\r
+ // DefaultArtifactRepositoryFactory().createArtifactRepository("local",\r
+ // , layoutId, snapshots, releases);\r
+ // Maven maven = mavenCli.getContainer().lookup(Maven.class);\r
+ // Artifact artifact = new DefaultArtifact("org.argeo.slc.dist",\r
+ // "org.argeo.slc.sdk", "0.13.1-SNAPSHOT", "compile", "pom",\r
+ // null, artifactHandler);\r
+ // ArtifactResolutionRequest req = new ArtifactResolutionRequest();\r
+ // req.setLocalRepository(localRepository);\r
+ // req.setResolveTransitively(true);\r
+ // req.setArtifact(artifact);\r
+ // ArtifactResolver artifactResolver = plexusContainer\r
+ // .lookup(ArtifactResolver.class);\r
+ // ArtifactResolutionResult res = artifactResolver.resolve(req);\r
+ // Set<Artifact> artifacts = res.getArtifacts();\r
+ // for (Artifact art : artifacts) {\r
+ // log.debug(art);\r
+ // }\r
+ } catch (Exception e) {\r
+ // TODO Auto-generated catch block\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+\r
+ public void testMaven() {\r
+ Thread.currentThread().setContextClassLoader(\r
+ getClass().getClassLoader());\r
+ String[] goals = { "-o", "-e", "-f",\r
+ "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk/pom.xml",\r
+ "dependency:tree" };\r
+\r
+ // String m2Home = "/opt/apache-maven-3.0.1";\r
+ // System.setProperty("classworlds.conf", m2Home + "/bin/m2.conf");\r
+ // System.setProperty("maven.home", m2Home);\r
+ //\r
+ // Launcher.main(goals);\r
+\r
+ CustomCli mavenCli = new CustomCli();\r
+ mavenCli.doMain(goals,\r
+ "/home/mbaudier/dev/src/slc/dist/org.argeo.slc.sdk",\r
+ System.out, System.err);\r
+\r
+ PlexusContainer plexusContainer = mavenCli.getContainer();\r
+ log.debug(plexusContainer.getContext().getContextData());\r
+ plexusContainer.dispose();\r
+ }\r
+\r
+ public void testAether() {\r
+ try {\r
+ RepositorySystem repoSystem = createRepositorySystem();\r
+\r
+ RepositorySystemSession session = createRepositorySystemSession(repoSystem);\r
+\r
+ Dependency dependency = new Dependency(new DefaultArtifact(\r
+ "org.argeo.slc.dep:org.argeo.slc.dep.sdk:0.13.1-SNAPSHOT"),\r
+ "compile");\r
+// RemoteRepository argeo = new RemoteRepository("argeo", "default",\r
+// "http://maven.argeo.org/argeo/");\r
+// RemoteRepository argeoSnapshots = new RemoteRepository(\r
+// "argeo-snapshots", "default",\r
+// "http://dev.argeo.org/maven/argeo-snapshots/");\r
+ RemoteRepository argeo =null;\r
+ RemoteRepository argeoSnapshots =null;\r
+\r
+ CollectRequest collectRequest = new CollectRequest();\r
+ collectRequest.setRoot(dependency);\r
+ collectRequest.addRepository(argeo);\r
+ collectRequest.addRepository(argeoSnapshots);\r
+ DependencyNode node = repoSystem.collectDependencies(session,\r
+ collectRequest).getRoot();\r
+\r
+// repoSystem.resolveDependencies(session, node, null);\r
+\r
+ PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();\r
+ node.accept(nlg);\r
+\r
+ for (Artifact artifact : nlg.getArtifacts(true)) {\r
+ log.debug(artifact);\r
+ }\r
+\r
+ AetherUtils.logDependencyNode(0, node);\r
+ // System.out.println(nlg.getClassPath());\r
+\r
+ } catch (Exception e) {\r
+ throw new SlcException("Cannot resolve", e);\r
+ }\r
+\r
+ }\r
+\r
+ /** Creates a Maven {@link RepositorySystem}. */\r
+ public static RepositorySystem createRepositorySystem() {\r
+ try {\r
+ DefaultServiceLocator locator = new DefaultServiceLocator();\r
+\r
+// locator.setServices(WagonProvider.class, new ManualWagonProvider());\r
+// locator.addService(RepositoryConnectorFactory.class,\r
+// WagonRepositoryConnectorFactory.class);\r
+\r
+ return locator.getService(RepositorySystem.class);\r
+ } catch (Exception e) {\r
+ throw new SlcException("Cannot lookup repository system", e);\r
+ }\r
+ }\r
+\r
+ public static RepositorySystemSession createRepositorySystemSession(\r
+ RepositorySystem system) {\r
+// MavenRepositorySystemSession session = new MavenRepositorySystemSession();\r
+ DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();\r
+ \r
+ LocalRepository localRepo = new LocalRepository(\r
+ System.getProperty("user.home") + "/.m2/repository");\r
+ session.setLocalRepositoryManager( system.newLocalRepositoryManager( session, localRepo ) );\r
+// session.setLocalRepositoryManager(system\r
+// .newLocalRepositoryManager(localRepo));\r
+ session.setTransferListener(new ConsoleTransferListener(System.out));\r
+ session.setRepositoryListener(new ConsoleRepositoryListener());\r
+ return session;\r
+ }\r
+\r
+ public static void main(String[] args) {\r
+ new MavenManager().init();\r
+ }\r
+\r
+}\r
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.FactoryBean;
+
+public class MavenToUrl implements FactoryBean {
+ private List<MavenFile> mavenFiles;
+ private String baseUrl;
+
+ public List<String> asUrls() {
+ List<String> urls = new ArrayList<String>();
+ for (MavenFile mf : mavenFiles)
+ urls.add(convertToUrl(mf));
+ return urls;
+ }
+
+ public String convertToUrl(MavenFile mf) {
+ return baseUrl + mf.getGroupId().replace('.', '/') + '/'
+ + mf.getArtifactId() + '/' + mf.getVersion() + '/'
+ + mf.getArtifactId() + '-' + mf.getVersion() + '.'
+ + mf.getType();
+ }
+
+ public void setMavenFiles(List<MavenFile> mavenFiles) {
+ this.mavenFiles = mavenFiles;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ public Object getObject() throws Exception {
+ return asUrls();
+ }
+
+ public Class<?> getObjectType() {
+ return List.class;
+ }
+
+ public boolean isSingleton() {
+ return false;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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.
+ */
+package org.argeo.slc.maven;
+
+public class RemoteRepo {
+ private String id;
+ private String url;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
--- /dev/null
+<!--\r
+\r
+ Copyright (C) 2007-2012 Argeo GmbH\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+-->\r
+<project>\r
+\r
+ <target name="deployZip">
+ <unzip src="${src}" dest="${tempDir}" />
+ <copyFromTemp />
+ </target>
+
+ <target name="deployTarGz">
+ <untar src="${src}" dest="${tempDir}" compression="gzip" />
+ <copyFromTemp />
+ </target>
+
+ <macrodef name="copyFromTemp">
+ <sequential>
+ <copy todir="${dest}" includeemptydirs="true">
+ <fileset dir="${tempDir}">
+ <include name="**/*" />
+ </fileset>
+ <mapper classname="org.argeo.slc.ant.RemoveRootDirMapper" to="${removeRootDir}" />
+ </copy>
+ </sequential>
+ </macrodef>
+</project>
\ No newline at end of file
<parent>
<groupId>org.argeo.commons</groupId>
<artifactId>argeo-commons</artifactId>
- <version>2.1.62-SNAPSHOT</version>
+ <version>2.1.62</version>
</parent>
<groupId>org.argeo.slc</groupId>
<artifactId>argeo-slc</artifactId>
<developmentCycle.startDate>2015-02-12</developmentCycle.startDate>
<version.argeo-rcp>2.1.14-SNAPSHOT</version.argeo-rcp>
<version.slc>2.1.8-SNAPSHOT</version.slc>
+ <version.equinox>3.11.1.v20160708-1632</version.equinox>
</properties>
<modules>
<!-- Runtime -->
<module>org.argeo.slc.core</module>
<module>org.argeo.slc.unit</module>
<module>org.argeo.slc.support</module>
+ <module>org.argeo.slc.support.maven</module>
<module>org.argeo.slc.repo</module>
<module>org.argeo.slc.factory</module>
+ <module>org.argeo.slc.launcher</module>
<!-- Modules -->
<module>org.argeo.slc.agent</module>