+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>maven-argeo-osgi-plugin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-<project>\r
- <modelVersion>4.0.0</modelVersion>\r
- <parent>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>slc-maven</artifactId>\r
- <version>0.1.4</version>\r
- <relativePath>..</relativePath>\r
- </parent>\r
- <artifactId>maven-argeo-osgi-plugin</artifactId>\r
- <version>0.1.13</version>\r
- <packaging>maven-plugin</packaging>\r
- <name>Argeo OSGi Plugin</name>\r
-\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- </plugin>\r
- <plugin>\r
- <artifactId>maven-plugin-plugin</artifactId>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-tools-ant\r
- </artifactId>\r
- <version>2.1</version>\r
- </dependency>\r
- </dependencies>\r
- </plugin>\r
- </plugins>\r
- </build>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>org.argeo.slc.maven.shared\r
- </artifactId>\r
- <version>0.1.3</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-project</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-api</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.codehaus.plexus</groupId>\r
- <artifactId>plexus-archiver</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-script-ant</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>ant-contrib</groupId>\r
- <artifactId>ant-contrib</artifactId>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.eclipse.osgi</groupId>\r
- <artifactId>org.eclipse.osgi</artifactId>\r
- <version>3.4.2.R34x_v20080826-1230</version>\r
- </dependency>\r
-\r
- </dependencies>\r
- <repositories>\r
- <repository>\r
- <id>central</id>\r
- <url>http://repo1.maven.org/maven2</url>\r
- <releases>\r
- <enabled>true</enabled>\r
- <updatePolicy>daily</updatePolicy>\r
- <checksumPolicy>warn</checksumPolicy>\r
- </releases>\r
- <snapshots>\r
- <enabled>false</enabled>\r
- <updatePolicy>never</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </snapshots>\r
- </repository>\r
- <repository>\r
- <id>com.springsource.repository.bundles.release\r
- </id>\r
- <name>\r
- SpringSource Enterprise Bundle Repository - SpringSource\r
- Bundle\r
- Releases\r
- </name>\r
- <url>\r
- http://repository.springsource.com/maven/bundles/release\r
- </url>\r
- <releases>\r
- <enabled>true</enabled>\r
- <updatePolicy>daily</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </releases>\r
- <snapshots>\r
- <enabled>false</enabled>\r
- <updatePolicy>never</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </snapshots>\r
- </repository>\r
- <repository>\r
- <id>com.springsource.repository.bundles.external\r
- </id>\r
- <name>\r
- SpringSource Enterprise Bundle Repository - External\r
- Bundle\r
- Releases\r
- </name>\r
- <url>\r
- http://repository.springsource.com/maven/bundles/external\r
- </url>\r
- <releases>\r
- <enabled>true</enabled>\r
- <updatePolicy>daily</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </releases>\r
- <snapshots>\r
- <enabled>false</enabled>\r
- <updatePolicy>never</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </snapshots>\r
- </repository>\r
- <repository>\r
- <id>argeo</id>\r
- <url>http://www.argeo.org/maven/argeo\r
- </url>\r
- <releases>\r
- <enabled>true</enabled>\r
- <updatePolicy>daily</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </releases>\r
- <snapshots>\r
- <enabled>false</enabled>\r
- <updatePolicy>never</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </snapshots>\r
- </repository>\r
- <repository>\r
- <id>argeo-snapshots</id>\r
- <url>http://www.argeo.org/maven/argeo-snapshots\r
- </url>\r
- <releases>\r
- <enabled>false</enabled>\r
- <updatePolicy>never</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </releases>\r
- <snapshots>\r
- <enabled>true</enabled>\r
- <updatePolicy>always</updatePolicy>\r
- <checksumPolicy>fail</checksumPolicy>\r
- </snapshots>\r
- </repository>\r
- </repositories>\r
-\r
-</project>
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Base class for MoJo analyzing a set of bundles directories.
- *
- * @author mbaudier
- *
- */
-public abstract class AbstractBundlesPackagerMojo extends AbstractOsgiMojo {
-
- /**
- * Directory of the simple bundles
- *
- * @parameter expression="${bundlesDirectory}" default-value="."
- * @required
- */
- private File bundlesDirectory;
-
- /**
- * Directory containing the packaged bundles.
- *
- * @parameter expression="${packagedBundlesDir}"
- * default-value="${project.build.directory}/argeo-osgi"
- * @required
- */
- protected File packagedBundlesDir;
-
- /**
- * Artifact id for the dependency pom
- *
- * @parameter expression="${bundlesPomArtifactId}" default-value="bundles"
- * @required
- */
- protected String bundlesPomArtifactId;
-
- /**
- * Whether should fail if MANIFEST version are not in line with pom version.
- *
- * @parameter expression="${strictManifestVersion}" default-value="false"
- * @required
- */
- protected boolean strictManifestVersion;
-
- /**
- * Whether the manifest should be updated with the release version.
- *
- * @parameter expression="${updateManifestWhenReleasing}"
- * default-value="true"
- * @required
- */
- protected boolean updateManifestWhenReleasing;
-
- /**
- * Whether should fail if symbolic name does not match artifact id.
- *
- * @parameter expression="${strictSymbolicName}" default-value="false"
- * @required
- */
- protected boolean strictSymbolicName;
-
- private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
-
- protected List analyze(boolean willGenerate) throws MojoExecutionException {
- List list = new ArrayList();
-
- File[] bundleDirs = bundlesDirectory.listFiles(bundleFileFilter());
- for (int i = 0; i < bundleDirs.length; i++) {
-
- File dir = bundleDirs[i];
- BundlePackage bundlePackage;
- try {
- bundlePackage = processBundleDir(dir, willGenerate);
- } catch (Exception e) {
- throw new MojoExecutionException("Could not analyze " + dir, e);
- }
- list.add(bundlePackage);
-
- }
- return list;
- }
-
- protected BundlePackage processBundleDir(File dir, boolean willGenerate)
- throws Exception {
- File manifestFile = manifestFileFromDir(dir);
- String artifactId = dir.getName();
- File destFile = new File(packagedBundlesDir.getPath() + File.separator
- + artifactId + ".jar");
-
- String manifestStr = FileUtils.readFileToString(manifestFile);
- char lastChar = manifestStr.charAt(manifestStr.length() - 1);
- if (lastChar != '\n')
- throw new RuntimeException("Manifest " + manifestFile
- + " is not valid,"
- + " it does not end with and endline character.");
-
- Manifest manifest = readManifest(manifestFile);
- // Symbolic name
- String symbolicNameMf = manifest.getMainAttributes().getValue(
- "Bundle-SymbolicName");
- if (!artifactId.equals(symbolicNameMf)) {
- String msg = "Symbolic name " + symbolicNameMf
- + " does not match with directory name " + artifactId;
- if (strictSymbolicName)
- throw new RuntimeException(msg);
- else
- getLog().warn(msg);
- }
-
- // Version
- String versionMf = manifest.getMainAttributes().getValue(
- "Bundle-Version");
- int qIndex = versionMf.lastIndexOf(".SNAPSHOT");
- String versionMfMain;
- if (qIndex >= 0)
- versionMfMain = versionMf.substring(0, qIndex);
- else
- versionMfMain = versionMf;
-
- int sIndex = snapshotIndex();
- String versionMain;
- String buildId;
- boolean isSnapshot = false;
- if (sIndex >= 0) {// SNAPSHOT
- versionMain = versionMain(sIndex);
- // buildId = "D_" + sdf.format(new Date());// D for dev
- buildId = "SNAPSHOT";
- isSnapshot = true;
- } else {
- versionMain = project.getVersion();
- // buildId = "R_" + sdf.format(new Date());// R for release
- buildId = "R" + sdf.format(new Date());
- }
-
- if (!versionMain.equals(versionMfMain)) {
- String msg = "Main manifest version " + versionMfMain
- + " of bundle " + artifactId
- + " do not match with main project version " + versionMain;
- if (strictManifestVersion)
- throw new RuntimeException(msg);
- else
- getLog().warn(msg);
- }
-
- String newVersionMf = versionMfMain + "." + buildId;
- String newVersionArt;
- if (isSnapshot) {
- newVersionArt = versionMfMain + "-SNAPSHOT";
- } else {
- newVersionArt = versionMfMain;
- }
-
- // boolean debug = true;
- boolean debug = getLog().isDebugEnabled();
- if (debug && willGenerate) {
- getLog().info("\n## " + artifactId);
- getLog().info("project.getVersion()=" + project.getVersion());
- getLog().info("newVersionMf=" + newVersionMf);
- }
-
- manifest.getMainAttributes().putValue("Bundle-Version", newVersionMf);
- manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION,
- "1.0");
-
- Artifact artifact = artifactFactory.createBuildArtifact(project
- .getGroupId(), artifactId, newVersionArt, "jar");
- return new BundlePackage(artifact, dir, new Manifest(manifest),
- destFile);
- }
-
- protected File manifestFileFromDir(File dir) {
- return new File(dir + File.separator + "META-INF" + File.separator
- + "MANIFEST.MF");
- }
-
- protected File bundlesPomFile() {
- return new File(packagedBundlesDir + File.separator + "bundles.pom");
- }
-
- protected Artifact bundlesPomArtifact() {
- return artifactFactory.createBuildArtifact(project.getGroupId(),
- bundlesPomArtifactId, project.getVersion(), "pom");
- }
-
- protected StringBuffer createPomFileHeader(String parentGroupId,
- String parentArtifactId, String parentBaseVersion, String groupId,
- String artifactId, String packaging) {
- StringBuffer pom = new StringBuffer();
- // not using append() systematically for the sake of clarity
- pom.append("<project>\n");
- pom.append("\t<modelVersion>4.0.0</modelVersion>\n");
- pom.append("\t<parent>\n");
- pom.append("\t\t<groupId>" + parentGroupId + "</groupId>\n");
- pom.append("\t\t<artifactId>" + parentArtifactId + "</artifactId>\n");
- pom.append("\t\t<version>" + parentBaseVersion + "</version>\n");
- pom.append("\t</parent>\n");
- pom.append("\t<groupId>" + groupId + "</groupId>\n");
- pom.append("\t<artifactId>" + artifactId + "</artifactId>\n");
- pom.append("\t<packaging>" + packaging + "</packaging>\n");
- return pom;
-
- // TODO: use the Model object e.g.: (from install plugin)
- // Model model = new Model();
- // model.setModelVersion( "4.0.0" );
- // model.setGroupId( groupId );
- // model.setArtifactId( artifactId );
- // model.setVersion( version );
- // model.setPackaging( packaging );
- // model.setDescription( "POM was created from install:install-file" );
- // fw = new FileWriter( tempFile );
- // tempFile.deleteOnExit();
- // new MavenXpp3Writer().write( fw, model );
- // ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact,
- // tempFile );
- // artifact.addMetadata( metadata );
-
- }
-
- /** Simple close the project tag */
- protected String closePomFile(StringBuffer pom) {
- pom.append("</project>\n");
- return pom.toString();
- }
-
- protected Manifest readManifest(File file) throws IOException {
- Manifest manifest = new Manifest();
- FileInputStream in = new FileInputStream(file);
- manifest.read(in);
- in.close();
- return manifest;
- }
-
- protected int snapshotIndex() {
- return project.getModel().getVersion().lastIndexOf("-SNAPSHOT");
- }
-
- protected String versionMain(int sIndex) {
- return project.getVersion().substring(0, sIndex);
- }
-
- protected File getBundleDirectory() {
- return bundlesDirectory;
- }
-
- protected FileFilter bundleFileFilter() {
- return new FileFilter() {
- public boolean accept(File file) {
- if (!file.isDirectory())
- return false;
-
- return manifestFileFromDir(file).exists();
- }
- };
- }
-
- protected static class BundlePackage {
- private final Artifact artifact;
- private final File bundleDir;
- private final Manifest manifest;
- private final File packageFile;
-
- public BundlePackage(Artifact artifact, File bundleDir,
- Manifest manifest, File packageFile) {
- super();
- this.artifact = artifact;
- this.bundleDir = bundleDir;
- this.manifest = manifest;
- this.packageFile = packageFile;
- }
-
- public Artifact getArtifact() {
- return artifact;
- }
-
- public File getPackageFile() {
- return packageFile;
- }
-
- public File getBundleDir() {
- return bundleDir;
- }
-
- public Manifest getManifest() {
- return manifest;
- }
-
- public File getManifestFile() {
- return new File(getPackageFile().getPath() + ".MF");
- }
-
- public File getPomFile() {
- return new File(getPackageFile().getPath() + ".pom.xml");
- }
-
- public String toString() {
- return "Bundle: " + bundleDir;
- }
-
- }
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Factorize common configuration
- */
-public abstract class AbstractOsgiMojo extends AbstractMojo {
- public final static String PACKAGING_BUNDLE = "bundle";
-
- /**
- * The maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- protected MavenProject project;
-
- /**
- * List of Remote Repositories used by the resolver
- *
- * @parameter expression="${project.remoteArtifactRepositories}"
- * @readonly
- * @required
- */
- protected java.util.List remoteRepos;
- /**
- * Location of the local repository.
- *
- * @parameter expression="${localRepository}"
- * @readonly
- * @required
- */
- protected ArtifactRepository local;
-
- /**
- * @parameter
- * expression="${project.distributionManagementArtifactRepository}"
- */
- protected ArtifactRepository deploymentRepository;
-
- /**
- * The directory for the pom
- *
- * @parameter expression="${basedir}"
- * @required
- */
- protected File baseDir;
-
- /**
- * Directory containing the build files.
- *
- * @parameter expression="${project.build.directory}"
- */
- protected File buildDirectory;
-
- /** @component */
- protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory;
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.deployer.ArtifactDeployer;
-import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.artifact.ProjectArtifactMetadata;
-
-/**
- * @goal deploy-bundles
- * @phase deploy
- * @author mbaudier
- *
- */
-public class DeployBundlesMojo extends AbstractBundlesPackagerMojo {
- /** @component */
- private ArtifactDeployer deployer;
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- List bundlePackages = analyze(false);
- for (int i = 0; i < bundlePackages.size(); i++) {
- AbstractBundlesPackagerMojo.BundlePackage bundlePackage = (BundlePackage) bundlePackages
- .get(i);
- try {
- Artifact artifact = bundlePackage.getArtifact();
- ProjectArtifactMetadata metadata = new ProjectArtifactMetadata(
- artifact, bundlePackage.getPomFile());
- artifact.addMetadata(metadata);
- deployer.deploy(bundlePackage.getPackageFile(), artifact,
- deploymentRepository, local);
- } catch (ArtifactDeploymentException e) {
- throw new MojoExecutionException("Could not deploy bundle "
- + bundlePackage.getBundleDir(), e);
- }
- }
-
- // bundles POM
- try {
- deployer.deploy(bundlesPomFile(), bundlesPomArtifact(),
- deploymentRepository, local);
- deployer.deploy(new File(baseDir.getPath() + File.separator
- + "pom.xml"), project.getArtifact(), deploymentRepository,
- local);
- } catch (ArtifactDeploymentException e) {
- throw new MojoExecutionException("Could not deploy bundles POM", e);
- }
-
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.argeo.slc.maven.plugin.MavenDependencyManager;
-import org.argeo.slc.maven.plugin.SystemCall;
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-
-/**
- * Starts Equinox runtime
- *
- * @goal equinox
- * */
-public class EquinoxExecMojo extends AbstractOsgiMojo {
- /** @component */
- private MavenDependencyManager mavenDependencyManager;
-
- /**
- * Equinox artifact id
- *
- * @parameter expression="${equinoxArtifactId}"
- * default-value="org.eclipse.osgi"
- * @required
- */
- protected String equinoxArtifactId;
-
- /**
- * OSGIBoot artifact id
- *
- * @parameter expression="${osgiBootArtifactId}"
- * default-value="org.argeo.slc.osgiboot"
- * @required
- */
- protected String osgiBootArtifactId;
-
- /**
- * Java executable
- *
- * @parameter expression="${jvm}" default-value="${java.home}/bin/java"
- * @required
- */
- protected String jvm;
-
- /**
- * JVM arguments
- *
- * @parameter alias="${jvmArgs}"
- */
- protected String[] jvmArgs;
-
- /**
- * JVM arguments to append
- *
- * @parameter alias="${jvmArgsToAppend}"
- */
- protected String[] jvmArgsToAppend;
-
- protected String[] defaultJvmArgs = { "-Xmx128m" };
-
- /**
- * Debug port (0 deactivate)
- *
- * @parameter expression="${debug}" default-value="0"
- * @required
- */
- protected String debug;
-
- /**
- * Equinox args
- *
- * @parameter alias="${args}"
- */
- protected String[] args;
-
- /**
- * Equinox args to append
- *
- * @parameter alias="${argsToAppend}"
- */
- protected String[] argsToAppend;
-
- protected String[] defaultArgs = { "-console", "-configuration",
- "target/slc/conf", "-data", "target/slc/data" };
-
- /**
- * JVM system properties
- *
- * @parameter alias="${systemProperties}"
- */
- protected Map systemProperties;
-
- /**
- * Execution directory
- *
- * @parameter expression="${execDir}"
- * default-value="${project.build.directory}/exec"
- * @required
- */
- protected File execDir;
-
- /**
- * Whether to create a new JVM
- *
- * @parameter expression="${fork}" default-value="false"
- * @required
- */
- protected boolean fork;
-
- /**
- * Whether to wait for the runtime to exit
- *
- * @parameter expression="${wait}" default-value="true"
- * @required
- */
- protected boolean wait;
-
- /**
- * Number of milliseconds to pause after having started the server (when
- * ${wait}=false)
- *
- * @parameter expression="${pause}" default-value="0"
- * @required
- */
- protected long pause;
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- if (PACKAGING_BUNDLE.equals(project.getArtifact().getType())) {
- System.out.println("Skip artifact of type " + PACKAGING_BUNDLE
- + " " + artifactToString(project.getArtifact()));
- return;
- }
-
- String originalUserDir = System.getProperty("user.dir");
- try {
- LocationsStruct locationsStruct = listOsgiLocations();
- if (fork)
- execForked(locationsStruct);
- else
- execNonForked(locationsStruct);
- } catch (Exception e) {
- throw new MojoExecutionException("Cannot execute OSGi runtime", e);
- } finally {
- System.setProperty("user.dir", originalUserDir);
- }
- }
-
- protected LocationsStruct listOsgiLocations() throws Exception {
- LocationsStruct locationsStruct = new LocationsStruct();
-
- Set dependencies = mavenDependencyManager
- .getTransitiveProjectDependencies(project, remoteRepos, local);
-
- StringBuffer osgiLocations = new StringBuffer();
- List bundleArtifacts = new ArrayList();
- boolean first = true;
- for (Iterator it = dependencies.iterator(); it.hasNext();) {
- Artifact depArtifact = (Artifact) it.next();
- printArtifact(depArtifact);
-
- if (depArtifact.getArtifactId().equals(equinoxArtifactId)) {
- locationsStruct.equinoxArtifact = depArtifact;
- } else if (depArtifact.getArtifactId().equals(osgiBootArtifactId)) {
- locationsStruct.osgiBootArtifact = depArtifact;
- } else {
- bundleArtifacts.add(depArtifact);
-
- if ("jar".equals(depArtifact.getType())) {
- // Add to OSGi locations
- if (first)
- first = false;
- else
- osgiLocations.append(File.pathSeparatorChar);
-
- osgiLocations.append(depArtifact.getFile()
- .getCanonicalPath()
- .replace(File.separatorChar, '/'));
- }
- }
- }
- locationsStruct.osgiLocations = osgiLocations.toString();
- return locationsStruct;
- }
-
- protected void execNonForked(LocationsStruct locationsStruct)
- throws Exception {
- // Set defaults
- if (args == null) {
- if (fork)
- args = defaultArgs;
- else
- args = new String[] { "-console", "-configuration",
- execDir.getPath() + File.separator + "conf", "-data",
- execDir.getPath() + File.separator + "data" };
- }
-
- // if (!execDir.exists())
- // execDir.mkdirs();
- // System.setProperty("user.dir", execDir.getCanonicalPath());
-
- // Build command
- List cmdList = new ArrayList();
-
- // System properties
- if (!systemProperties.containsKey("osgi.bundles")) {
- if (locationsStruct.osgiBootArtifact == null)
- throw new Exception("No SLC OSGi boot bundle available.");
- System.setProperty("osgi.bundles", locationsStruct.osgiBootArtifact
- .getFile().getCanonicalPath()
- + "@start");
- }
-
- if (!systemProperties.containsKey("slc.osgi.locations"))
- System.setProperty("slc.osgi.locations",
- locationsStruct.osgiLocations);
-
- for (Iterator keys = systemProperties.keySet().iterator(); keys
- .hasNext();) {
- Object key = keys.next();
- Object value = systemProperties.get(key);
- String strValue = null;
- if (value != null) {
- strValue = value.toString().trim();
- strValue = strValue.replaceAll("\n", "");
- strValue = strValue.replaceAll("\t", "");
- }
- System.setProperty(key.toString(), strValue);
- }
-
- // Program arguments
- cmdList.addAll(Arrays.asList(args));
- if (argsToAppend != null)
- cmdList.addAll(Arrays.asList(argsToAppend));
-
- String[] cmd = (String[]) cmdList.toArray(new String[0]);
- System.out.println("Equinox arguments (non forked):");
- printCommand(cmd);
-
- EclipseStarter.startup(cmd, null);
-
- if (wait) {
- while (EclipseStarter.isRunning()) {
- Thread.sleep(500);
- }
- } else {
- Thread.sleep(pause);
- }
- }
-
- protected void execForked(LocationsStruct locationsStruct) throws Exception {
- // Set defaults
- if (jvmArgs == null)
- jvmArgs = defaultJvmArgs;
- if (args == null)
- args = defaultArgs;
- if (systemProperties == null)
- systemProperties = new HashMap();
-
- if (!execDir.exists())
- execDir.mkdirs();
-
- // Build command
- List cmdList = new ArrayList();
- // JVM
- cmdList.add(jvm);
- // JVM arguments
- cmdList.addAll(Arrays.asList(jvmArgs));
-
- if (!"0".equals(debug))
- cmdList
- .add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address="
- + debug);
-
- if (jvmArgsToAppend != null)
- cmdList.addAll(Arrays.asList(jvmArgsToAppend));
-
- // System properties
- if (!systemProperties.containsKey("osgi.bundles"))
- cmdList.add("-Dosgi.bundles="
- + locationsStruct.osgiBootArtifact.getFile()
- .getCanonicalPath() + "@start");
- if (!systemProperties.containsKey("slc.osgi.locations"))
- cmdList
- .add("-Dslc.osgi.locations="
- + locationsStruct.osgiLocations);
- for (Iterator keys = systemProperties.keySet().iterator(); keys
- .hasNext();) {
- Object key = keys.next();
- Object value = systemProperties.get(key);
- String strValue = null;
- if (value != null) {
- strValue = value.toString().trim();
- strValue = strValue.replaceAll("\n", "");
- strValue = strValue.replaceAll("\t", "");
- }
- cmdList.add("-D" + key + "=" + strValue);
- }
-
- // Equinox jar
- cmdList.add("-jar");
- cmdList.add(locationsStruct.equinoxArtifact.getFile()
- .getCanonicalPath());
-
- // Program arguments
- cmdList.addAll(Arrays.asList(args));
- if (argsToAppend != null)
- cmdList.addAll(Arrays.asList(argsToAppend));
-
- String[] cmd = (String[]) cmdList.toArray(new String[0]);
- System.out.println("Execute Equinox command (forked):");
- printCommand(cmd);
-
- SystemCall systemCall = new SystemCall(execDir.getCanonicalPath(), cmd,
- true);
- if (wait) {
- systemCall.run();
- } else {
- new Thread(systemCall).start();
- Thread.sleep(pause);
- }
- }
-
- protected void printArtifact(Artifact artifact) {
- if (getLog().isDebugEnabled())
- getLog().debug(artifactToString(artifact));
- }
-
- protected void printCommand(String[] cmd) {
- for (int i = 0; i < cmd.length; i++) {
- boolean containsSpace = (cmd[i].indexOf(' ') >= 0)
- || (cmd[i].indexOf('\t') >= 0);
- if (containsSpace)
- System.out.print('\"');
- System.out.print(cmd[i]);
- if (containsSpace)
- System.out.print('\"');
- System.out.print(' ');
- }
- }
-
- protected static String artifactToString(Artifact artifact) {
- return artifact.getGroupId() + ":" + artifact.getArtifactId() + ":"
- + artifact.getType() + ":" + artifact.getClassifier() + ":"
- + artifact.getVersion() + " (" + artifact.getFile() + ")";
- }
-
- protected class LocationsStruct {
- protected Artifact equinoxArtifact = null;
- protected Artifact osgiBootArtifact = null;
- protected String osgiLocations = null;
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-
-/** Shutdowns the Equinox runtime
- * @goal equinox-shutdown
- * */
-public class EquinoxShutdownMojo extends AbstractOsgiMojo {
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- try {
- EclipseStarter.shutdown();
- } catch (Exception e) {
- throw new MojoExecutionException("Cannot shutdown OSGi runtime", e);
- }
- }
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.installer.ArtifactInstallationException;
-import org.apache.maven.artifact.installer.ArtifactInstaller;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.artifact.ProjectArtifactMetadata;
-
-/**
- * @goal install-bundles
- * @phase install
- * @author mbaudier
- *
- */
-public class InstallBundlesMojo extends AbstractBundlesPackagerMojo {
- /** @component */
- private ArtifactInstaller installer;
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- List bundlePackages = analyze(false);
- for (int i = 0; i < bundlePackages.size(); i++) {
- AbstractBundlesPackagerMojo.BundlePackage bundlePackage = (BundlePackage) bundlePackages
- .get(i);
- try {
- Artifact artifact = bundlePackage.getArtifact();
- ProjectArtifactMetadata metadata = new ProjectArtifactMetadata(
- artifact, bundlePackage.getPomFile());
- artifact.addMetadata(metadata);
- installer.install(bundlePackage.getPackageFile(), artifact,
- local);
- } catch (ArtifactInstallationException e) {
- throw new MojoExecutionException("Could not install bundle "
- + bundlePackage.getBundleDir(), e);
- }
- }
-
- // Bundles pom
- try {
- installer.install(bundlesPomFile(), bundlesPomArtifact(), local);
- installer.install(new File(baseDir.getPath() + File.separator
- + "pom.xml"), project.getArtifact(), local);
- } catch (ArtifactInstallationException e) {
- throw new MojoExecutionException("Could not install bundles POM", e);
- }
-
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.jar.Attributes;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.archiver.util.DefaultFileSet;
-
-/** Build the bundle jars
- * @goal package-bundles
- * @phase package
- * @author mbaudier
- *
- */
-public class PackageBundlesMojo extends AbstractBundlesPackagerMojo {
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- StringBuffer bundlesPom = createPomFileHeader(project
- .getParentArtifact().getGroupId(), project.getParentArtifact()
- .getArtifactId(), project.getParentArtifact().getBaseVersion(),
- project.getGroupId(), bundlesPomArtifactId, "pom");
- bundlesPom.append("\t<dependencies>\n");
-
- List bundlePackages = analyze(true);
-
- for (int i = 0; i < bundlePackages.size(); i++) {
- AbstractBundlesPackagerMojo.BundlePackage bundlePackage = (BundlePackage) bundlePackages
- .get(i);
-
- // Package as jar
- JarArchiver jarArchiver = new JarArchiver();
- jarArchiver.setDestFile(bundlePackage.getPackageFile());
- DefaultFileSet fileSet = new DefaultFileSet();
- fileSet.setDirectory(bundlePackage.getBundleDir());
- String[] includes = { "**/*" };
- String[] excludes = { "**/.svn", "**/.svn/**" };
- fileSet.setIncludes(includes);
- fileSet.setExcludes(excludes);
-
- FileOutputStream manifestOut = null;
- try {
- File manifestFile = bundlePackage.getManifestFile();
- jarArchiver.addFileSet(fileSet);
-
- // Write manifest
- manifestOut = new FileOutputStream(manifestFile);
-
- System.out.println("\n# BUNDLE "
- + bundlePackage.getArtifact().getArtifactId());
- Attributes mainAttrs = bundlePackage.getManifest()
- .getMainAttributes();
- for (Iterator it = mainAttrs.keySet().iterator(); it.hasNext();) {
- Object key = it.next();
- Object value = mainAttrs.get(key);
- System.out.println(key + ": " + value);
- }
-
- bundlePackage.getManifest().write(manifestOut);
-
- // Write jar
- jarArchiver.setManifest(manifestFile);
- jarArchiver.createArchive();
- } catch (Exception e) {
- throw new MojoExecutionException("Could not package bundle "
- + bundlePackage.getBundleDir(), e);
- }finally{
- IOUtils.closeQuietly(manifestOut);
- }
-
- // Write bundle POM
- File pomFile = bundlePackage.getPomFile();
- StringBuffer pomBuf = createPomFileHeader(project
- .getParentArtifact().getGroupId(), project
- .getParentArtifact().getArtifactId(), project
- .getParentArtifact().getBaseVersion(), bundlePackage
- .getArtifact().getGroupId(), bundlePackage.getArtifact()
- .getArtifactId(), "jar");
- String pomStr = closePomFile(pomBuf);
- try {
- FileUtils.writeStringToFile(pomFile, pomStr);
- } catch (IOException e) {
- throw new MojoExecutionException(
- "Could not write pom for bundle "
- + bundlePackage.getArtifact().getArtifactId(),
- e);
- }
-
- // update dependencies POM
- bundlesPom.append("\t\t<dependency>\n");
- bundlesPom
- .append("\t\t\t<groupId>"
- + bundlePackage.getArtifact().getGroupId()
- + "</groupId>\n");
- bundlesPom.append("\t\t\t<artifactId>"
- + bundlePackage.getArtifact().getArtifactId()
- + "</artifactId>\n");
- bundlesPom
- .append("\t\t\t<version>"
- + bundlePackage.getArtifact().getVersion()
- + "</version>\n");
- bundlesPom.append("\t\t</dependency>\n");
-
- }
-
- bundlesPom.append("\t</dependencies>\n");
- String bundlePomStr = closePomFile(bundlesPom);
-
- try {
- FileUtils.writeStringToFile(bundlesPomFile(), bundlePomStr);
- } catch (IOException e) {
- throw new MojoExecutionException("Could not write dependency pom",
- e);
- }
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.osgi;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Update the manifests based on the POM
- *
- * @goal update-manifests
- * @phase package
- * @author mbaudier
- *
- */
-public class UpdateManifestsMojo extends AbstractBundlesPackagerMojo {
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- if (!PACKAGING_BUNDLE.equals(project.getPackaging())) {
- getLog().info(
- "Project is not of packaging type " + PACKAGING_BUNDLE
- + ", skipping...");
- }
-
- int sIndex = snapshotIndex();
- String versionMf = null;
- if (sIndex >= 0) {// SNAPSHOT
- versionMf = versionMain(sIndex) + ".SNAPSHOT";
- } else {
- throw new MojoExecutionException("Can only modify on SNAPSHOT");
- }
-
- File[] bundleDirs = getBundleDirectory().listFiles(bundleFileFilter());
- for (int i = 0; i < bundleDirs.length; i++) {
- OutputStream out = null;
- try {
- File dir = bundleDirs[i];
- File originalMf = manifestFileFromDir(dir);
- Manifest manifest = readManifest(originalMf);
- manifest.getMainAttributes().putValue("Bundle-Version",
- versionMf);
- manifest.getMainAttributes().put(
- Attributes.Name.MANIFEST_VERSION, "1.0");
-
- out = new FileOutputStream(originalMf);
- manifest.write(out);
- getLog().info(
- "Update MANIFEST of bundle " + dir + " with version "
- + versionMf);
- } catch (IOException e) {
- throw new MojoExecutionException(
- "Could not modify manifets. WARNING: some manifests may already have been modified! Check your sources.",
- e);
- } finally {
- IOUtils.closeQuietly(out);
- }
- }
-
- }
-}
+++ /dev/null
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.lifecycle.mapping.LifecycleMapping
- </role>
- <role-hint>bundles</role-hint>
- <implementation>
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
- </implementation>
- <configuration>
- <phases>
- <package>
- org.argeo.slc.maven:maven-argeo-osgi-plugin:package-bundles
- </package>
- <install>
- org.argeo.slc.maven:maven-argeo-osgi-plugin:install-bundles
- </install>
- <deploy>
- org.argeo.slc.maven:maven-argeo-osgi-plugin:deploy-bundles
- </deploy>
- </phases>
- </configuration>
- </component>
- </components>
-</component-set>
+++ /dev/null
-<project>
-
- <taskdef resource="net/sf/antcontrib/antlib.xml" />
-
- <target name="simple-bundles" depends="generate-poms,deploy-pom">
- </target>
-
- <target name="generate-poms">
-
- <loadfile property="distributionManagement"
- srcFile="distributionManagement.xml"/>
-
- <property name="targetDir" location="target" />
- <mkdir dir="${targetDir}" />
-
- <copy todir="${targetDir}/bundles">
- <fileset dir="${bundlesBase}" includes="**" excludes="*.xml,.*,target/**" />
- </copy>
-
- <pathconvert property="dirs" pathsep=",">
- <path>
- <dirset dir="${targetDir}/bundles" includes="*" />
- </path>
- <mapper>
- <flattenmapper />
- </mapper>
- </pathconvert>
-
- <if>
- <contains string="${projectVersion}" substring="-SNAPSHOT" />
- <then>
- <property name="qualifier" value="SNAPSHOT" />
- </then>
- <else>
- <tstamp>
- <format property="qualifier" pattern="yyyyMMdd" />
- </tstamp>
- </else>
- </if>
-
-
- <property name="aggregatorPomFile" value="${targetDir}/bundles/pom.xml" />
- <echo file="${aggregatorPomFile}">
- <![CDATA[
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>${projectGroupId}</groupId>
- <artifactId>aggregator</artifactId>
- <version>${projectVersion}</version>
- <packaging>pom</packaging>
- <modules>
- ]]></echo>
- <for list="${dirs}" param="dir">
-
- <sequential>
- <echo file="${aggregatorPomFile}" append="true">
- <![CDATA[<module>@{dir}</module>]]></echo>
- </sequential>
- </for>
- <echo file="${aggregatorPomFile}" append="true">
- <![CDATA[
- <module>bundles</module>
- </modules>
- ${distributionManagement}
- </project>
- ]]></echo>
-
-
- <for list="${dirs}" param="dir">
-
- <sequential>
- <echo>Generate POM for @{dir}</echo>
-
- <var name="bundleDir" value="${targetDir}/bundles/@{dir}" />
- <mkdir dir="${bundleDir}/target" />
-
-
- <replace file="${bundleDir}/META-INF/MANIFEST.MF" token="qualifier" value="${qualifier}" />
-
- <copy file="${bundleDir}/META-INF/MANIFEST.MF" tofile="${bundleDir}/target/bundle.properties" />
- <replace file="${bundleDir}/target/bundle.properties" token=" " value="" />
- <replace file="${bundleDir}/target/bundle.properties" token=":" value="=" />
- <replace file="${bundleDir}/target/bundle.properties" token=".SNAPSHOT" value="-SNAPSHOT" />
- <var file="${bundleDir}/target/bundle.properties" />
-
- <copy file="pom-template.xml" toFile="${bundleDir}/pom.xml">
- <filterset>
- <filtersfile file="${bundleDir}/target/bundle.properties" />
- <filter token="distributionManagement" value="${distributionManagement}"/>
- </filterset>
- </copy>
- </sequential>
- </for>
-
-</target>
-
-<target name="deploy-pom">
-
- <property name="targetDir" location="target" />
-
- <pathconvert property="dirs" pathsep=",">
- <path>
- <dirset dir="${targetDir}/bundles" includes="*" />
- </path>
- <mapper>
- <flattenmapper />
- </mapper>
- </pathconvert>
-
- <mkdir dir="${targetDir}/bundles/bundles" />
- <property name="deployPomFile" value="${targetDir}/bundles/bundles/pom.xml" />
-
- <echo file="${deployPomFile}">
- <![CDATA[
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>${projectGroupId}</groupId>
- <artifactId>bundles</artifactId>
- <version>${projectVersion}</version>
- <packaging>pom</packaging>
- <dependencies>
- ]]></echo>
-
- <for list="${dirs}" param="dir">
-
- <sequential>
- <echo>Add @{dir} to deploy POM</echo>
- <mkdir dir="${targetDir}" />
-
- <var name="bundleDir" value="${targetDir}/bundles/@{dir}" />
- <var file="${bundleDir}/target/bundle.properties" />
-
- <echo file="${deployPomFile}" append="true">
- <![CDATA[
- <dependency>
- <groupId>${projectGroupId}</groupId>
- <artifactId>${Bundle-SymbolicName}</artifactId>
- <version>${Bundle-Version}</version>
- </dependency>
- ]]></echo>
- </sequential>
- </for>
-
- <echo file="${deployPomFile}" append="true">
- <![CDATA[
- </dependencies>
- ${distributionManagement}
- </project>
- ]]></echo>
-</target>
-</project>
\ No newline at end of file
+++ /dev/null
-<pluginMetadata>
- <mojos>
- <mojo>
- <goal>simple-bundles-old</goal>
- <call>simple-bundles-old</call>
- <description>
- Process a simple bundle (no Java)
- </description>
-
- <requiresProject>true</requiresProject>
-
- <parameters>
- <parameter>
- <name>bundlesBase</name>
- <property>bundlesBase</property>
- <required>true</required>
- <defaultValue>bundles</defaultValue>
- <type>java.io.File</type>
- <description>The base directory for the bundles.
- </description>
- </parameter>
- <parameter>
- <name>projectVersion</name>
- <property>projectVersion</property>
- <required>true</required>
- <readonly>true</readonly>
- <defaultValue>${project.version}</defaultValue>
- <type>java.lang.String</type>
- <description>The group id of the project currently being built.
- </description>
- </parameter>
- <parameter>
- <name>projectGroupId</name>
- <property>projectGroupId</property>
- <required>true</required>
- <readonly>true</readonly>
- <defaultValue>${project.groupId}</defaultValue>
- <type>java.lang.String</type>
- <description>The group id of the project currently being built.
- </description>
- </parameter>
- </parameters>
- </mojo>
- <mojo>
- <goal>deploy-pom</goal>
- <call>deploy-pom</call>
- <description>
- Generate a POM with the dependencies
- </description>
-
- <requiresProject>true</requiresProject>
- <parameters>
- <parameter>
- <name>projectGroupId</name>
- <property>projectGroupId</property>
- <required>true</required>
- <readonly>true</readonly>
- <defaultValue>${project.groupId}</defaultValue>
- <type>java.lang.String</type>
- <description>The group id of the project currently being built.
- </description>
- </parameter>
- <parameter>
- <name>projectVersion</name>
- <property>projectVersion</property>
- <required>true</required>
- <readonly>true</readonly>
- <defaultValue>${project.version}</defaultValue>
- <type>java.lang.String</type>
- <description>The group id of the project currently being built.
- </description>
- </parameter>
- </parameters>
-
- </mojo>
- </mojos>
-</pluginMetadata>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>maven-argeo-pde-plugin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Sat Dec 06 10:08:40 CET 2008
-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=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.3
+++ /dev/null
-#Fri Dec 05 10:50:52 CET 2008
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-version=1
+++ /dev/null
-<project>\r
- <modelVersion>4.0.0</modelVersion>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>maven-argeo-pde-plugin</artifactId>\r
- <version>0.3.4</version>\r
- <packaging>maven-plugin</packaging>\r
- <name>Argeo PDE Plugin</name>\r
-\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- <configuration>\r
- <source>1.4</source>\r
- <target>1.4</target>\r
- </configuration>\r
- </plugin>\r
- <plugin>\r
- <artifactId>maven-plugin-plugin</artifactId>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-tools-ant\r
- </artifactId>\r
- <version>2.1</version>\r
- </dependency>\r
- </dependencies>\r
- </plugin>\r
- </plugins>\r
- </build>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-api</artifactId>\r
- <version>2.0</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-script-ant</artifactId>\r
- <version>2.0.9</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-project</artifactId>\r
- <version>2.0.7</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>ant-contrib</groupId>\r
- <artifactId>ant-contrib</artifactId>\r
- <version>1.0b2</version>\r
- <exclusions>\r
- <exclusion>\r
- <groupId>ant</groupId>\r
- <artifactId>ant</artifactId>\r
- </exclusion>\r
- </exclusions>\r
- </dependency>\r
- </dependencies>\r
- <distributionManagement>\r
- <repository>\r
- <uniqueVersion>false</uniqueVersion>\r
- <id>argeo-restricted</id>\r
- <name>Argeo FOSS Repository</name>\r
- <url>file:///var/argeo/maven2/argeo\r
- </url>\r
- </repository>\r
- <snapshotRepository>\r
- <uniqueVersion>true</uniqueVersion>\r
- <id>argeo-snapshots-restricted</id>\r
- <name>Argeo FOSS Snapshots Repository</name>\r
- <url>file:///var/argeo/maven2/argeo-snapshots\r
- </url>\r
- </snapshotRepository>\r
- </distributionManagement>\r
-</project>
\ No newline at end of file
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Forks a eclipseTarget lifecycle.
- *
- * @goal eclipseTarget
- * @execute lifecycle="eclipseTarget" phase="initialize"
- */
-public class EclipseTargetMojo extends AbstractMojo {
- public void execute() throws MojoExecutionException {
- getLog().info("EclipseTargetMojo done");
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-import java.util.List;
-
-public class Feature {
- private String updateSite;
- private String copyright;
- private List plugins;
-
- public String getUpdateSite() {
- return updateSite;
- }
-
- public void setUpdateSite(String license) {
- this.updateSite = license;
- }
-
- public String getCopyright() {
- return copyright;
- }
-
- public void setCopyright(String copyright) {
- this.copyright = copyright;
- }
-
- public List getPlugins() {
- return plugins;
- }
-
- public void setPlugins(List plugins) {
- this.plugins = plugins;
- }
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.maven.model.License;
-import org.apache.maven.model.Organization;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
-
-/**
- * Generates a feature descripto based on the pom
- *
- * @goal featureDescriptor
- * @phase process-resources
- */
-public class FeatureDescriptorMojo extends AbstractMojo {
- /**
- * The Maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject project;
-
- /**
- * The directory for the pom
- *
- * @parameter expression="${basedir}"
- * @required
- */
- private File baseDir;
-
- /**
- * Information about the feature
- *
- * @parameter expression="${argeo-pde.feature}"
- * @required
- */
- private Feature feature;
-
- public void execute() throws MojoExecutionException {
- File featureDesc = new File(baseDir, "feature.xml");
- FileWriter fileWriter = null;
- try {
- fileWriter = new FileWriter(featureDesc);
- PrettyPrintXMLWriter xmlWriter = new PrettyPrintXMLWriter(
- fileWriter);
- xmlWriter.startElement("feature");
- xmlWriter.addAttribute("id", project.getArtifactId());
- xmlWriter.addAttribute("label", project.getName());
-
- // Version
- String projectVersion = project.getVersion();
- int indexSnapshot = projectVersion.indexOf("-SNAPSHOT");
- if (indexSnapshot > -1)
- projectVersion = projectVersion.substring(0, indexSnapshot);
- projectVersion = projectVersion + ".qualifier";
-
- // project.
- xmlWriter.addAttribute("version", projectVersion);
-
-
- Organization organization = project.getOrganization();
- if (organization != null && organization.getName() != null)
- xmlWriter.addAttribute("provider-name", organization.getName());
-
- if (project.getDescription() != null || project.getUrl() != null) {
- xmlWriter.startElement("description");
- if (project.getUrl() != null)
- xmlWriter.addAttribute("url", project.getUrl());
- if (project.getDescription() != null)
- xmlWriter.writeText(project.getDescription());
- xmlWriter.endElement();// description
- }
-
- if (feature.getCopyright() != null
- || (organization != null && organization.getUrl() != null)) {
- xmlWriter.startElement("copyright");
- if (organization != null && organization.getUrl() != null)
- xmlWriter.addAttribute("url", organization.getUrl());
- if (feature.getCopyright() != null)
- xmlWriter.writeText(feature.getCopyright());
- xmlWriter.endElement();// copyright
- }
-
- if (feature.getUpdateSite() != null) {
- xmlWriter.startElement("url");
- xmlWriter.startElement("update");
- xmlWriter.addAttribute("url", feature.getUpdateSite());
- xmlWriter.endElement();// update
- xmlWriter.endElement();// url
- }
-
- List licenses = project.getLicenses();
- if (licenses.size() > 0) {
- // take the first one
- License license = (License) licenses.get(0);
- xmlWriter.startElement("license");
-
- if (license.getUrl() != null)
- xmlWriter.addAttribute("url", license.getUrl());
- if (license.getComments() != null)
- xmlWriter.writeText(license.getComments());
- else if (license.getName() != null)
- xmlWriter.writeText(license.getName());
- xmlWriter.endElement();// license
- }
-
- List plugins = feature.getPlugins();
- for (int i = 0; i < plugins.size(); i++) {
- Plugin plugin = (Plugin) plugins.get(i);
- xmlWriter.startElement("plugin");
- xmlWriter.addAttribute("id", plugin.getId());
- xmlWriter.addAttribute("version", plugin.getVersion());
- xmlWriter.addAttribute("unpack", plugin.getUnpack());
- xmlWriter.endElement();// plugin
- }
-
- xmlWriter.endElement();// feature
- } catch (IOException e) {
- throw new MojoExecutionException("Cannot write feature descriptor",
- e);
- }
- IOUtil.close(fileWriter);
- getLog().info("FeatureDescriptorMojo done");
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-import java.io.File;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Builds an element and adds it as main artifact.
- *
- * @goal packageElement
- * @phase package
- * @execute goal="buildElement"
- */
-public class PackageElementMojo extends AbstractMojo {
- /**
- * The Maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject project;
-
- /**
- * The build directory.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private String buildDirectory;
-
- public void execute() throws MojoExecutionException {
- File file = new File(buildDirectory, project.getArtifactId() + ".zip");
- project.getArtifact().setFile(file);
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-import java.io.File;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Builds a product and adds it as main artifact.
- *
- * @goal packageProduct
- * @phase package
- * @execute goal="buildProduct"
- */
-public class PackageProductMojo extends AbstractMojo {
- /**
- * The Maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject project;
-
- /**
- * The build directory.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private String buildDirectory;
-
- public void execute() throws MojoExecutionException {
- File file = new File(buildDirectory, project.getArtifactId() + ".zip");
- project.getArtifact().setFile(file);
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.pde;
-
-public class Plugin {
- private String id;
- private String version;
- private String unpack = "false";
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getUnpack() {
- return unpack;
- }
-
- public void setUnpack(String unpack) {
- this.unpack = unpack;
- }
-
-}
+++ /dev/null
-<lifecycles>
- <lifecycle>
- <id>eclipseTarget</id>
- <phases>
- <phase>
- <id>initialize</id>
- <executions>
- <execution>
- <goals>
- <goal>org.apache.maven.plugins:maven-dependency-plugin:unpack-dependencies</goal>
- </goals>
- <configuration>
- <useSubDirectoryPerArtifact>
- true
- </useSubDirectoryPerArtifact>
- </configuration>
- </execution>
- <execution>
- <goals>
- <goal>eclipseTarget-collect</goal>
- </goals>
- </execution>
- </executions>
- </phase>
- </phases>
- </lifecycle>
- <!--
- <lifecycle>
- <id>buildNumber</id>
- <phases>
- <phase>
- <id>validate</id>
- <executions>
- <execution>
- <goals>
- <goal>org.codehaus.mojo:buildnumber-maven-plugin:create</goal>
- </goals>
- <configuration>
- <buildNumberPropertyName>scmRevision</buildNumberPropertyName>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </execution>
- </executions>
- </phase>
- </phases>
- </lifecycle>
- -->
-</lifecycles>
+++ /dev/null
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.lifecycle.mapping.LifecycleMapping
- </role>
- <role-hint>zip</role-hint>
- <implementation>
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
- </implementation>
- <configuration>
- <lifecycles>
- <lifecycle>
- <id>default</id>
- <phases>
- <initialize>
- org.argeo.slc.maven:maven-argeo-pde-plugin:eclipseTarget
- </initialize>
- <process-resources>
- org.argeo.slc.maven:maven-argeo-pde-plugin:featureDescriptor
- </process-resources>
- <package>
- org.argeo.slc.maven:maven-argeo-pde-plugin:packageElement
- </package>
- <install>
- org.apache.maven.plugins:maven-install-plugin:install
- </install>
- <deploy>
- org.apache.maven.plugins:maven-deploy-plugin:deploy
- </deploy>
- </phases>
- </lifecycle>
- </lifecycles>
- </configuration>
- </component>
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler
- </role>
- <role-hint>zip</role-hint>
- <implementation>
- org.apache.maven.artifact.handler.DefaultArtifactHandler
- </implementation>
- <configuration>
- <type>zip</type>
- <includesDependencies>false</includesDependencies>
- <language>java</language>
- <extension>zip</extension>
- <addedToClasspath>false</addedToClasspath>
- </configuration>
- </component>
- </components>
-</component-set>
+++ /dev/null
-<project>
- <!--
- Defaults
- -->
-
- <!-- Maven project basedir -->
- <property name="projectDirectory" location="${basedir}" />
- <!-- Maven build dir -->
- <property name="project.build.directory" location="${projectDirectory}/target" />
- <!-- Maven dependency plugin dir -->
- <property name="dependencyDir" location="${project.build.directory}/dependency" />
- <!-- Arguments passed to Eclipse ant -->
- <property name="eclipseAntArgs" value="" />
- <!-- Additional arguments passed to Eclipse build script -->
- <property name="buildScriptProperties" value="" />
-
- <!--
- Argeo PDE folders
- -->
- <!-- Argeo PDE plugin dir -->
- <property name="argeo-pde.dir" location="${project.build.directory}/argeo-pde" />
- <!-- Temporary folder used by Eclipse build -->
- <property name="buildTempFolder" location="${argeo-pde.dir}/temp" />
- <!-- Eclipse Builder -->
- <!--<property name="pdeBuilder" location="${argeo-pde.dir}/pdeBuilder" />-->
-
- <!-- Eclipse Target -->
- <property name="eclipseTarget" location="${argeo-pde.dir}/eclipseTarget" />
- <property name="pdeBuilder" location="${eclipseTarget}" />
-
- <!-- TODO: remove this since we build only features? -->
- <available file="${projectDirectory}/plugin.xml" property="elementType" value="plugin" />
- <available file="${projectDirectory}/feature.xml" property="elementType" value="feature" />
-
- <!-- Destination dirs -->
- <property name="argeo-pde.destinationDir" location="${argeo-pde.dir}/destination" />
- <property name="pluginDestination" location="${argeo-pde.destinationDir}/plugins" />
- <property name="featureDestination" location="${argeo-pde.destinationDir}/features" />
-
- <!-- Source dirs -->
- <property name="argeo-pde.sourceDir" location="${argeo-pde.dir}/source" />
- <property name="buildDirectory" location="${argeo-pde.sourceDir}" />
-
-
- <!-- TODO: make it more generic. Site file template -->
- <property name="siteTemplate" location="${projectDirectory}/site.template" />
-
- <!-- TODO: put it under argeo-pde. Product build properties -->
- <property name="buildConfiguration" value="buildConfiguration" />
- <property name="buildConfiguration.dir" location="${projectDirectory}/${buildConfiguration}" />
-
-
-
- <!--
- Element build properties
- -->
-
- <!--
- TARGET Build Element
- -->
- <target name="buildElement" depends="init" description="Builds an element (plugin or feature)">
- <fail message="Property buildScriptTargets has to be set" unless="buildScriptTargets" />
-
- <mkdir dir="${pluginDestination}" />
- <mkdir dir="${featureDestination}" />
-
- <!-- Copy to source -->
- <property name="sourceBaseDir" location="${projectDirectory}/../.." />
- <copy todir="${argeo-pde.sourceDir}">
- <fileset dir="${sourceBaseDir}">
- <include name="plugins/**" />
- <include name="features/**" />
- <exclude name="**/target/**" />
- <exclude name="**/.svn/**" />
- </fileset>
- </copy>
-
- <property name="elementBuildScript" location="${buildDirectory}/${elementType}s/${elementId}/build.xml" />
-
- <eclipseAnt antfile="${ant.file}" antargs="eclipse.generateScripts -DpdeBuilder=${pdeBuilder} -DpluginPath=${dependencyDir} -DprojectDirectory=${projectDirectory} -DeclipseBuildDir=${eclipseBuildDir} -DelementId=${elementId} -DbuildDirectory=${buildDirectory}" />
- <eclipseAnt antfile="${elementBuildScript}" antargs="${buildScriptTargets} -Dplugin.destination=${pluginDestination} -Dfeature.destination=${featureDestination} -DelementId=${elementId} -DbuildTempFolder=${buildTempFolder} -Dtemp.folder=${buildTempFolder}/temp.folder -Dfeature.temp.folder=${buildTempFolder}/feature.temp.folder -DjavacFailOnError=true ${buildScriptProperties}" />
-
- <copy todir="${project.build.directory}">
- <fileset dir="${featureDestination}">
- <include name="*.zip" />
- </fileset>
- <mergemapper to="${elementId}.zip" />
- </copy>
-
- <!-- TODO Update site
- <copy tofile="${project.build.directory}/site.xml" file="${siteTemplate}">
- <filterset begintoken="$${" endtoken="}">
- <filtersfile file="${buildDirectory}/finalFeaturesVersions.properties" />
- </filterset>
- </copy>
- <zip destfile="${project.build.directory}/${elementId}-updatesite.zip">
- <fileset dir="${project.build.directory}">
- <include name="plugins/*.jar" />
- <include name="features/*.jar" />
- <include name="site.xml" />
- </fileset>
- </zip>
- -->
- </target>
-
- <!--
- TARGET Build Product
- -->
- <target name="buildProduct" depends="init" description="Builds a product">
- <!-- Load provided build.properties to leave a chance to override -->
- <property file="${buildConfiguration.dir}/build.properties" />
- <!-- Set default properties -->
- <property name="archivePrefix" value="${elementId}" />
- <property name="buildId" value="${archivePrefix}" />
- <property name="buildLabel" value="${archivePrefix}" />
- <property name="collectingFolder" value="${archivePrefix}" />
- <property name="skipFetch" value="true" />
- <property name="skipMaps" value="true" />
- <property name="runPackager" value="true" />
-
- <!-- Find PDE build file -->
- <pathconvert pathsep="" property="productBuildFile">
- <path>
- <fileset dir="${pdeBuilder}/plugins">
- <include name="org.eclipse.pde.build_*/scripts/productBuild/productBuild.xml" />
- </fileset>
- </path>
- </pathconvert>
- <echo message="productBuildFile=${productBuildFile}" />
-
- <!-- Copy sources -->
- <property name="buildDirectory" location="${project.build.directory}/productBuild" />
- <mkdir dir="${buildDirectory}" />
- <copy todir="${buildDirectory}" includeemptydirs="true" verbose="true">
- <fileset dir="${projectDirectory}/../..">
- <include name="plugins/**" />
- <include name="features/**" />
- <exclude name="**/.svn/**" />
- <exclude name="**/target/**" />
- </fileset>
- </copy>
-
- <!-- Execute -->
- <eclipseAnt antfile="${productBuildFile}" antargs="-Dbuilder=${buildConfiguration.dir} -DbuildDirectory=${buildDirectory} -DskipBase=true -DbaseLocation=${eclipseTarget} -DpluginPath=${dependencyDir} -DarchivePrefix=${archivePrefix} -DbuildLabel=${buildLabel} -DbuildId=${buildId} -DcollectingFolder=${collectingFolder} -DskipFetch=${skipFetch} -DskipMaps=${skipMaps} -DrunPackager=${runPackager}" />
-
- <!-- Copy to target dir -->
- <copy todir="${project.build.directory}">
- <fileset dir="${buildDirectory}/${collectingFolder}">
- <include name="*.zip" />
- </fileset>
- <globmapper from="${archivePrefix}-*" to="${elementId}-*" />
- </copy>
- </target>
-
- <!--
- TARGET eclipseTarget-collect
- -->
- <target name="eclipseTarget-collect" description="Creates an Eclipse target location based on the dependencies">
- <taskdef resource="net/sf/antcontrib/antlib.xml" />
- <for param="dir">
- <dirset dir="${project.build.directory}/dependency">
- <include name="*" />
- </dirset>
- <sequential>
- <copy todir="${eclipseTarget}" failonerror="false">
- <fileset dir="@{dir}">
- <include name="plugins/**" />
- <include name="features/**" />
- </fileset>
- </copy>
- <copy todir="${eclipseTarget}" failonerror="false">
- <fileset dir="@{dir}/eclipse">
- <include name="plugins/**" />
- <include name="features/**" />
- </fileset>
- </copy>
- </sequential>
- </for>
-
- <!-- Copy configuration from SDK -->
- <for param="dir">
- <dirset dir="${project.build.directory}/dependency">
- <include name="eclipse-sdk-*" />
- </dirset>
- <sequential>
- <copy todir="${eclipseTarget}" failonerror="false">
- <fileset dir="@{dir}/eclipse">
- <include name="configuration/**" />
- </fileset>
- </copy>
- </sequential>
- </for>
- </target>
-
- <!--
- COMMON UTILITIES
- -->
- <target name="init">
- <path id="pdeBuilder.launcher.classpath">
- <fileset dir="${pdeBuilder}/plugins">
- <include name="org.eclipse.equinox.launcher_*.jar" />
- </fileset>
- </path>
-
- <!-- Log properties -->
- <echo message="basedir=${basedir}" />
- <echo message="ant.file=${ant.file}" />
- <echo message="projectDirectory=${projectDirectory}" />
-
- <echo message="pdeBuilder=${pdeBuilder}" />
- <echo message="eclipseTarget=${eclipseTarget}" />
-
- <echo message="elementType=${elementType}" />
- <echo message="elementId=${elementId}" />
- <echo message="elementBuildScript=${elementBuildScript}" />
- <echo message="buildScriptTargets=${buildScriptTargets}" />
- <echo message="buildScriptProperties=${buildScriptProperties}" />
-
- <echo message="eclipseAntArgs=${eclipseAntArgs}" />
-
- <echo message="buildConfiguration.dir=${buildConfiguration.dir}" />
- </target>
- <!--
- <target name="setPluginPath">
- <mkdir dir="${dependencyDir}" />
- <pathconvert property="pluginPath">
- <path>
- <pathelement location="${dependencyDir}" />
- <dirset dir="${pluginPathBase}">
- <include name="*" />
- </dirset>
- </path>
- </pathconvert>
- <echo message="pluginPath=${pluginPath}" />
- </target>
--->
- <!-- TARGETS TO BE CALLED WITH ANT ECLIPSE -->
- <target name="eclipse.generateScripts" depends="init">
- <fail message="Property elementType has to be set" unless="elementType" />
- <eclipse.buildScript elements="${elementType}@${elementId}" buildDirectory="${buildDirectory}" baseLocation="${eclipseTarget}" outputUpdateJars="true" generateVersionsLists="true" pluginPath="${dependencyDir}" />
- </target>
-
- <!-- MACRODEFS -->
- <macrodef name="eclipseAnt">
- <attribute name="antfile" />
- <attribute name="antargs" />
- <sequential>
- <echo message="Call Eclipse Ant for file @{antfile} with args ${eclipseAntArgs} @{antargs}" />
- <java fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true">
- <classpath refid="pdeBuilder.launcher.classpath" />
- <arg line="-data ${argeo-pde.dir}/workspace" />
- <arg line="-application org.eclipse.ant.core.antRunner" />
- <arg line="-buildfile @{antfile}" />
- <arg line="${eclipseAntArgs}" />
- <arg line="@{antargs}" />
- </java>
- </sequential>
- </macrodef>
-</project>
\ No newline at end of file
+++ /dev/null
-<pluginMetadata>
- <mojos>
- <mojo>
- <goal>buildElement</goal>
- <call>buildElement</call>
- <description>
- Builds an element (plugin or feature)
- </description>
-
- <requiresProject>true</requiresProject>
-
- <parameters>
- <!-- Common -->
- <parameter>
- <name>eclipseAntArgs</name>
- <property>eclipseAntArgs</property>
- <expression>${eclipseAntArgs}</expression>
- <defaultValue></defaultValue>
- <type>java.lang.String</type>
- <description>
- Additional args passed to Eclipse Ant (such as
- verbose/debug level)
- </description>
- </parameter>
- <parameter>
- <name>elementId</name>
- <property>elementId</property>
- <required>true</required>
- <defaultValue>${project.artifactId}
- </defaultValue>
- <type>java.lang.String</type>
- <description>
- The artifact id of the project by default, will
- be used
- as element id.
- </description>
- </parameter>
- <!-- Specific -->
- <parameter>
- <name>buildScriptTargets</name>
- <property>buildScriptTargets</property>
- <required>true</required>
- <expression>${buildScriptTargets}</expression>
- <defaultValue>
- build.update.jar zip.distribution
- </defaultValue>
- <type>java.lang.String</type>
- <description>
- The targets to execute in the generated build
- script
- </description>
- </parameter>
- <parameter>
- <name>buildScriptProperties</name>
- <property>buildScriptProperties</property>
- <required>true</required>
- <expression>${buildScriptProperties}
- </expression>
- <defaultValue></defaultValue>
- <type>java.lang.String</type>
- <description>
- The properties to pass to the generated build
- script
- </description>
- </parameter>
- </parameters>
- </mojo>
-
-
- <mojo>
- <goal>buildProduct</goal>
- <call>buildProduct</call>
- <description>Builds a product</description>
-
- <requiresProject>true</requiresProject>
-
- <parameters>
- <!-- Common -->
- <parameter>
- <name>eclipseAntArgs</name>
- <property>eclipseAntArgs</property>
- <expression>${eclipseAntArgs}</expression>
- <defaultValue></defaultValue>
- <type>java.lang.String</type>
- <description>
- Additional args passed to Eclipse Ant (such as
- verbose/debug level)
- </description>
- </parameter>
- <parameter>
- <name>elementId</name>
- <property>elementId</property>
- <required>true</required>
- <defaultValue>${project.artifactId}
- </defaultValue>
- <type>java.lang.String</type>
- <description>
- The artifact id of the project by default, will
- be used
- as element id.
- </description>
- </parameter>
- <!-- Specific -->
- <parameter>
- <name>buildConfiguration</name>
- <property>buildConfiguration</property>
- <required>true</required>
- <defaultValue>buildConfiguration</defaultValue>
- <expression>${buildConfiguration}</expression>
- <type>java.lang.String</type>
- <description>
- Relative path to the product build directory
- </description>
- </parameter>
- </parameters>
- </mojo>
-
-
- <mojo>
- <goal>clean</goal>
- <call>clean</call>
- <description>Clean generated artifacts</description>
- <requiresProject>true</requiresProject>
-
- <parameters>
- <parameter>
- <name>elementId</name>
- <property>elementId</property>
- <required>true</required>
- <readonly>true</readonly>
- <defaultValue>${project.artifactId}
- </defaultValue>
- <type>java.lang.String</type>
- <description>
- The artifact id of the project by default, will
- be used
- as element id.
- </description>
- </parameter>
- </parameters>
- </mojo>
-
- <mojo>
- <goal>eclipseTarget-collect</goal>
- <call>eclipseTarget-collect</call>
- <description>
- Installs an Eclipse target based on dependencies
- </description>
- <requiresProject>true</requiresProject>
- </mojo>
- </mojos>
-</pluginMetadata>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>argeo.slc.testfeature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-bin.includes = feature.xml
+++ /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>
- <groupId>org.argeo.slc.sandbox</groupId>
- <artifactId>argeo.slc.testfeature</artifactId>
- <version>0.1.1-SNAPSHOT</version>
- <packaging>eclipseFeature</packaging>
- <name>Argeo SLC Test Eclipse Feature</name>
- <scm>
- <developerConnection>
- scm:svn:https://www.argeo.org/svn/slc/trunk/maven/maven-argeo-pde-plugin/src/test/eclipse/features/argeo.slc.testfeature
- </developerConnection>
- </scm>
- <build>
- <plugins>
- <plugin>
- <groupId>org.argeo.slc.maven</groupId>
- <artifactId>maven-argeo-pde-plugin</artifactId>
- <version>0.3.1-SNAPSHOT</version>
- <extensions>true</extensions>
- <configuration>
- <buildScriptProperties><![CDATA[-DjavacSource=1.5 -DjavacTarget=1.5]]></buildScriptProperties>
- <feature>
- <plugins>
- <plugin>
- <id>argeo.slc.testplugin</id>
- <version>1.0.0.qualifier</version>
- </plugin>
- </plugins>
- </feature>
- </configuration>
- </plugin>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>getScmRevision</id>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <buildNumberPropertyName>scmRevision</buildNumberPropertyName>
- <doCheck>false</doCheck>
- <doUpdate>true</doUpdate>
- </configuration>
- </execution>
- <execution> <id>getTimestamp</id> <phase>initialize</phase>
- <goals> <goal>create</goal> </goals> <configuration>
- <format>{0}_{1,date,yyyyMMddHHmmss}</format> <items>
- <item>${scmRevision}</item> <item>timestamp</item> </items>
- </configuration> </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>true</doUpdate>
- </configuration>
- </plugin>
- -->
- </plugins>
- </build>
-
- <dependencies>
- <!-- Eclipse Base -->
- <dependency>
- <groupId>org.argeo.dep.dist</groupId>
- <artifactId>eclipse-sdk-linux-gtk</artifactId>
- <version>3.4.1</version>
- <type>tar.gz</type>
- <classifier>dist</classifier>
- </dependency>
- <dependency>
- <groupId>org.argeo.dep.dist</groupId>
- <artifactId>eclipse-rcp-deltapack</artifactId>
- <version>3.4.1</version>
- <type>zip</type>
- <classifier>dist</classifier>
- </dependency>
- </dependencies>
- <pluginRepositories>
- <pluginRepository>
- <id>argeo-plugins</id>
- <url>http://www.argeo.org/maven/argeo</url>
- </pluginRepository>
- </pluginRepositories>
-
-</project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <feature url="features/org.argeo.slc.ui.launch.feature_${org.argeo.slc.ui.launch.feature}.jar" id="org.argeo.slc.ui.launch.feature" version="${org.argeo.slc.ui.launch.feature}">
- <category name="argeo.slc.ui"/>
- </feature>
- <category-def name="argeo.slc.ui" label="Argeo SLC UI">
- <description>
- UI extensions used to simplify development based on Argeo SLC.
- </description>
- </category-def>
-</site>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <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="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>argeo.slc.testplugin</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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Fri Dec 05 11:33:10 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-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
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Testplugin Plug-in
-Bundle-SymbolicName: argeo.slc.testplugin; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: argeo.slc.testplugin.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+++ /dev/null
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- contexts.xml
+++ /dev/null
-<contexts>
- <context id="viewer" title="Sample View">
- <description>This is the context help for the sample view with a table viewer. It was generated by a PDE template.</description>
- <topic href="/PLUGINS_ROOT/org.eclipse.platform.doc.isv/guide/ua_help_context.htm" label="Context-sensitive help">
- <enablement>
- <with variable="platform">
- <test property="org.eclipse.core.runtime.isBundleInstalled" args="org.eclipse.platform.doc.isv"/>
- </with>
- </enablement>
- </topic>
- </context>
-</contexts>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.views">
- <category
- name="Sample Category"
- id="argeo.slc.testplugin">
- </category>
- <view
- name="Sample View"
- icon="icons/sample.gif"
- category="argeo.slc.testplugin"
- class="argeo.slc.testplugin.views.SampleView"
- id="argeo.slc.testplugin.views.SampleView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.jdt.ui.JavaPerspective">
- <view
- ratio="0.5"
- relative="org.eclipse.ui.views.TaskList"
- relationship="right"
- id="argeo.slc.testplugin.views.SampleView">
- </view>
- </perspectiveExtension>
- </extension>
-
-</plugin>
+++ /dev/null
-package argeo.slc.testplugin;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "argeo.slc.testplugin";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
+++ /dev/null
-package argeo.slc.testplugin.views;
-
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.*;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.SWT;
-
-
-/**
- * This sample class demonstrates how to plug-in a new
- * workbench view. The view shows data obtained from the
- * model. The sample creates a dummy model on the fly,
- * but a real implementation would connect to the model
- * available either in this or another plug-in (e.g. the workspace).
- * The view is connected to the model using a content provider.
- * <p>
- * The view uses a label provider to define how model
- * objects should be presented in the view. Each
- * view can present the same model objects using
- * different labels and icons, if needed. Alternatively,
- * a single label provider can be shared between views
- * in order to ensure that objects of the same type are
- * presented in the same way everywhere.
- * <p>
- */
-
-public class SampleView extends ViewPart {
- private TableViewer viewer;
- private Action action1;
- private Action action2;
- private Action doubleClickAction;
-
- /*
- * The content provider class is responsible for
- * providing objects to the view. It can wrap
- * existing objects in adapters or simply return
- * objects as-is. These objects may be sensitive
- * to the current input of the view, or ignore
- * it and always show the same content
- * (like Task List, for example).
- */
-
- class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public Object[] getElements(Object parent) {
- return new String[] { "One", "Two", "Three" };
- }
- }
- class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
- public String getColumnText(Object obj, int index) {
- return getText(obj);
- }
- public Image getColumnImage(Object obj, int index) {
- return getImage(obj);
- }
- public Image getImage(Object obj) {
- return PlatformUI.getWorkbench().
- getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
- }
- }
- class NameSorter extends ViewerSorter {
- }
-
- /**
- * The constructor.
- */
- public SampleView() {
- }
-
- /**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setSorter(new NameSorter());
- viewer.setInput(getViewSite());
-
- // Create the help context id for the viewer's control
- PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "argeo.slc.testplugin.viewer");
- makeActions();
- hookContextMenu();
- hookDoubleClickAction();
- contributeToActionBars();
- }
-
- private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- SampleView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- fillLocalPullDown(bars.getMenuManager());
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- private void fillLocalPullDown(IMenuManager manager) {
- manager.add(action1);
- manager.add(new Separator());
- manager.add(action2);
- }
-
- private void fillContextMenu(IMenuManager manager) {
- manager.add(action1);
- manager.add(action2);
- // Other plug-ins can contribute there actions here
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- private void fillLocalToolBar(IToolBarManager manager) {
- manager.add(action1);
- manager.add(action2);
- }
-
- private void makeActions() {
- action1 = new Action() {
- public void run() {
- showMessage("Action 1 executed");
- }
- };
- action1.setText("Action 1");
- action1.setToolTipText("Action 1 tooltip");
- action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
-
- action2 = new Action() {
- public void run() {
- showMessage("Action 2 executed");
- }
- };
- action2.setText("Action 2");
- action2.setToolTipText("Action 2 tooltip");
- action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
- doubleClickAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection)selection).getFirstElement();
- showMessage("Double-click detected on "+obj.toString());
- }
- };
- }
-
- private void hookDoubleClickAction() {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- doubleClickAction.run();
- }
- });
- }
- private void showMessage(String message) {
- MessageDialog.openInformation(
- viewer.getControl().getShell(),
- "Sample View",
- message);
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>maven-argeo-qooxdoo-plugin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
- <modelVersion>4.0.0</modelVersion>\r
- <parent>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>slc-maven</artifactId>\r
- <version>0.1.4</version>\r
- <relativePath>..</relativePath>\r
- </parent>\r
- <artifactId>maven-argeo-qooxdoo-plugin</artifactId>\r
- <version>0.8.1.6</version>\r
- <packaging>maven-plugin</packaging>\r
- <name>Argeo Qooxdoo Plugin</name>\r
-\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- <configuration>\r
- <source>1.5</source>\r
- <target>1.5</target>\r
- </configuration>\r
- </plugin>\r
- </plugins>\r
- </build>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>org.argeo.slc.maven.shared</artifactId>\r
- <version>0.1.3</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-api</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-project</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.codehaus.plexus</groupId>\r
- <artifactId>plexus-archiver</artifactId>\r
- </dependency>\r
- </dependencies>\r
-</project>
+++ /dev/null
-package org.argeo.slc.maven.plugins.qooxdoo;
-
-import java.io.File;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.plugin.AbstractMojo;
-import org.argeo.slc.maven.plugin.MavenDependencyManager;
-
-/**
- * Factorize common configuration
- */
-public abstract class AbstractQooxdooMojo extends AbstractMojo {
- /**
- * List of Remote Repositories used by the resolver
- *
- * @parameter expression="${project.remoteArtifactRepositories}"
- * @readonly
- * @required
- */
- protected java.util.List<ArtifactRepository> remoteRepos;
- /**
- * Location of the local repository.
- *
- * @parameter expression="${localRepository}"
- * @readonly
- * @required
- */
- protected org.apache.maven.artifact.repository.ArtifactRepository local;
-
- /**
- * The directory for the pom
- *
- * @parameter expression="${basedir}"
- * @required
- */
- protected File baseDir;
-
- /**
- * Dependency manager
- *
- * @component
- */
- protected MavenDependencyManager depManager;
-
- /**
- * Source base where Qooxdoo SDK will be unpacked
- *
- * @parameter expression="${srcBase}" default-value="src"
- * @required
- */
- protected File srcBase;
-
- /**
- * Qooxdoo cache location
- *
- * @parameter expression="${cache}" default-value="cache"
- * @required
- */
- protected File cache;
-
- /**
- * Name of the SDK directory (the base dire in the unpacked distribution)
- *
- * @parameter expression="${sdkDirName}" default-value="qooxdoo-sdk"
- * @required
- */
- protected String sdkDirName;
-
- /**
- * SDK maven groupId
- *
- * @parameter expression="${sdkGroupId}" default-value="org.argeo.dep.dist"
- * @required
- */
- protected String sdkGroupId;
-
- /**
- * SDK maven artifactId
- *
- * @parameter expression="${sdkArtifactId}" default-value="qooxdoo-sdk"
- * @required
- */
- protected String sdkArtifactId;
-
- /**
- * SDK maven classifier
- *
- * @parameter expression="${sdkClassifier}" default-value="dist"
- * @required
- */
- protected String sdkClassifier;
-
- /**
- * SDK maven version
- *
- * @parameter expression="${sdkVersion}" default-value="0.8.1.argeo.1"
- * @required
- */
- protected String sdkVersion;
-
- /**
- * SDK maven type
- *
- * @parameter expression="${sdkType}" default-value="zip"
- * @required
- */
- protected String sdkType;
-
- protected File getSdkDir() {
- return new File(srcBase.getPath() + File.separator + sdkDirName);
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.qooxdoo;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * Prepares Qooxdoo environment
- *
- * @goal env
- */
-public class EnvironmentMojo extends AbstractQooxdooMojo {
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- Artifact qxSdkArtifact = depManager.getResolvedArtifact(remoteRepos,
- local, sdkGroupId, sdkArtifactId, sdkVersion, sdkType,
- sdkClassifier, Artifact.SCOPE_COMPILE);
- if (!getSdkDir().exists())
- depManager.unpackArtifact(qxSdkArtifact, srcBase);
- else
- getLog().warn("Qooxdoo SDK already unpacked, skip unpacking...");
- getLog().info("Qooxdoo environment prepared");
- }
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.qooxdoo;
-
-import java.io.File;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.codehaus.plexus.util.cli.CommandLineException;
-import org.codehaus.plexus.util.cli.CommandLineUtils;
-import org.codehaus.plexus.util.cli.Commandline;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- * Calls Qooxdoo python tool chain
- *
- * @goal generate
- */
-public class GenerateMojo extends AbstractQooxdooMojo {
- /**
- * The Qooxdoo build target.
- *
- * @parameter expression="${job}"
- * @required
- */
- private String job;
-
- public void execute() throws MojoExecutionException, MojoFailureException {
- try {
- File generateScript = new File(srcBase+ File.separator
- + sdkDirName + File.separator + "tool" + File.separator
- + "bin", "generator.py");
- getLog().info("Running Qooxdoo job: " + job + " ...");
-
- Commandline cl = new Commandline();
-
- cl.setExecutable("python");// python needs to be installed
- cl.setWorkingDirectory(baseDir.getCanonicalPath());
- cl.createArgument().setValue(generateScript.getCanonicalPath());
- cl.createArgument().setValue(job);
-
- StreamConsumer stdout = new StdoutConsumer(getLog());
- StreamConsumer stderr = new StderrConsumer(getLog());
- try {
- int result = CommandLineUtils.executeCommandLine(cl, stdout,
- stderr);
- if (result != 0) {
- throw new MojoExecutionException("Qooxdoo job returned: \'"
- + result + "\'.");
- }
- } catch (CommandLineException e) {
- throw new MojoExecutionException("Unable to run Qooxdoo job", e);
- }
- getLog().info("Finished Qooxdoo job: " + job);
-
- } catch (Exception e) {
- throw new MojoExecutionException(
- "Unexpected exception when running Python", e);
- }
-
- }
-
- /**
- * Consumer to receive lines sent to stdout. The lines are logged as info.
- */
- private class StdoutConsumer implements StreamConsumer {
- /** Logger to receive the lines. */
- private Log logger;
-
- /**
- * Constructor.
- *
- * @param log
- * The logger to receive the lines
- */
- public StdoutConsumer(Log log) {
- logger = log;
- }
-
- /**
- * Consume a line.
- *
- * @param string
- * The line to consume
- */
- public void consumeLine(String string) {
- logger.info(string);
- }
- }
-
- /**
- * Consumer to receive lines sent to stderr. The lines are logged as
- * warnings.
- */
- private class StderrConsumer implements StreamConsumer {
- /** Logger to receive the lines. */
- private Log logger;
-
- /**
- * Constructor.
- *
- * @param log
- * The logger to receive the lines
- */
- public StderrConsumer(Log log) {
- logger = log;
- }
-
- /**
- * Consume a line.
- *
- * @param string
- * The line to consume
- */
- public void consumeLine(String string) {
- logger.warn(string);
- }
- }
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugins.qooxdoo;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.codehaus.plexus.util.FileUtils;
-
-/**
- * Reset Qooxdoo context: removes SDK, clean cache, etc.
- *
- * @goal reset
- */
-public class ResetMojo extends AbstractQooxdooMojo {
- public void execute() throws MojoExecutionException, MojoFailureException {
- if (getSdkDir().exists()) {
- delete(getSdkDir());
- }
-
- if (cache.exists()) {
- delete(cache);
- }
-
- }
-
- protected void delete(File dir) throws MojoExecutionException {
- try {
- FileUtils.deleteDirectory(dir);
- getLog().info("Deleted directory " + dir);
- } catch (IOException e) {
- throw new MojoExecutionException("Cannot delete " + dir, e);
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.maven.shared</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-#Fri Apr 24 16:09:20 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
-#Fri Apr 24 08:11:23 CEST 2009
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
- <modelVersion>4.0.0</modelVersion>\r
- <parent>\r
- <groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>slc-maven</artifactId>\r
- <version>0.1.4</version>\r
- <relativePath>..</relativePath>\r
- </parent>\r
- <artifactId>org.argeo.slc.maven.shared</artifactId>\r
- <version>0.1.3</version>\r
- <packaging>jar</packaging>\r
- <name>Argeo Maven Plugin Development Support</name>\r
-\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-compiler-plugin</artifactId>\r
- </plugin>\r
- </plugins>\r
- </build>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-api</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-project</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.codehaus.plexus</groupId>\r
- <artifactId>plexus-archiver</artifactId>\r
- </dependency>\r
- <dependency>\r
- <groupId>commons-io</groupId>\r
- <artifactId>commons-io</artifactId>\r
- </dependency>\r
-\r
- </dependencies>\r
-</project>
+++ /dev/null
-package org.argeo.slc.maven.plugin;
-
-import java.io.File;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
-import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
-import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.InvalidDependencyVersionException;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.UnArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-
-/**
- * Abstract Maven plugin for interacting with dependencies
- */
-public class DefaultMavenDependencyManager implements MavenDependencyManager {
- /**
- * Used to look up Artifacts in the remote repository.
- *
- * @parameter expression=
- * "${component.org.apache.maven.artifact.factory.ArtifactFactory}"
- * @required
- * @readonly
- */
- protected org.apache.maven.artifact.factory.ArtifactFactory factory;
-
- /**
- * Used to look up Artifacts in the remote repository.
- *
- * @parameter expression=
- * "${component.org.apache.maven.artifact.resolver.ArtifactResolver}"
- * @required
- * @readonly
- */
- protected org.apache.maven.artifact.resolver.ArtifactResolver resolver;
-
- /**
- * To look up Archiver/UnArchiver implementations
- *
- * @parameter expression=
- * "${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
- * @required
- * @readonly
- */
- protected ArchiverManager archiverManager;
-
- /** @component */
- protected ArtifactMetadataSource artifactMetadataSource;
-
- public DefaultMavenDependencyManager() {
- }
-
- public Artifact getResolvedArtifact(List remoteRepos,
- ArtifactRepository local, String groupId, String artifactId,
- String version, String type, String classifier, String scope)
- throws MojoExecutionException {
- VersionRange vr;
- try {
- vr = VersionRange.createFromVersionSpec(version);
- } catch (InvalidVersionSpecificationException e1) {
- e1.printStackTrace();
- vr = VersionRange.createFromVersion(version);
- }
-
- Artifact qxSdkArtifact = factory.createDependencyArtifact(groupId,
- artifactId, vr, type, classifier, scope);
- try {
- resolver.resolve(qxSdkArtifact, remoteRepos, local);
- } catch (ArtifactResolutionException e) {
- throw new MojoExecutionException("Unable to resolve artifact.", e);
- } catch (ArtifactNotFoundException e) {
- throw new MojoExecutionException("Unable to find artifact.", e);
- }
-
- return qxSdkArtifact;
- }
-
- public void unpackArtifact(Artifact artifact, File location)
- throws MojoExecutionException {
- File file = artifact.getFile();
- try {
- UnArchiver unArchiver;
- unArchiver = archiverManager.getUnArchiver(file);
- unArchiver.setSourceFile(file);
- unArchiver.setDestDirectory(location);
- unArchiver.extract();
- } catch (NoSuchArchiverException e) {
- throw new MojoExecutionException("Unknown archiver type", e);
- } catch (ArchiverException e) {
- e.printStackTrace();
- throw new MojoExecutionException("Error unpacking file: " + file
- + " to: " + location + "\r\n" + e.toString(), e);
- }
- }
-
- public Set getTransitiveProjectDependencies(MavenProject project,
- List remoteRepos, ArtifactRepository local)
- throws InvalidDependencyVersionException,
- ArtifactNotFoundException, ArtifactResolutionException {
- Set artifacts = project.createArtifacts(this.factory, null, null);
-
- ArtifactResolutionResult arr = resolver.resolveTransitively(artifacts,
- project.getArtifact(), local, remoteRepos,
- this.artifactMetadataSource, null);
-
- // Order, just for display
- Set dependencies = new TreeSet(new ArtifactComparator());
- dependencies.addAll(arr.getArtifacts());
- return dependencies;
- }
-
- protected static class ArtifactComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- Artifact a1 = (Artifact) o1;
- Artifact a2 = (Artifact) o2;
-
- if (!a1.getGroupId().equals(a2.getGroupId()))
- return a1.getGroupId().compareTo(a2.getGroupId());
- else
- return a1.getArtifactId().compareTo(a2.getArtifactId());
- }
- }
-
-}
+++ /dev/null
-package org.argeo.slc.maven.plugin;
-
-import java.io.File;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.InvalidDependencyVersionException;
-
-public interface MavenDependencyManager {
- String ROLE = MavenDependencyManager.class.getName();
-
- public Artifact getResolvedArtifact(List remoteRepos,
- ArtifactRepository local, String groupId, String artifactId,
- String version, String type, String classifier, String scope)
- throws MojoExecutionException;
-
- public void unpackArtifact(Artifact artifact, File location)
- throws MojoExecutionException;
-
- public Set getTransitiveProjectDependencies(MavenProject project,
- List remoteRepos, ArtifactRepository local)
- throws InvalidDependencyVersionException,
- ArtifactNotFoundException, ArtifactResolutionException;
-}
+++ /dev/null
-package org.argeo.slc.maven.plugin;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-
-import org.apache.commons.io.IOUtils;
-
-public class SystemCall implements Runnable {
- private String execDir;
-
- private String cmd = null;
- private String[] command = null;
-
- private boolean synchronous = true;
- private boolean captureStdIn = false;
-
- public SystemCall() {
-
- }
-
- public SystemCall(String execDir, String cmd, boolean captureStdIn) {
- super();
- this.execDir = execDir;
- this.cmd = cmd;
- this.synchronous = true;
- this.captureStdIn = captureStdIn;
- }
-
- public SystemCall(String execDir, String[] command, boolean captureStdIn) {
- super();
- this.execDir = execDir;
- this.command = command;
- this.synchronous = true;
- this.captureStdIn = captureStdIn;
- }
-
- public void run() {
- try {
- // Execution directory
- File dir = null;
- if (execDir != null) {
- // Replace '/' by local file separator, for portability
- execDir.replace('/', File.separatorChar);
- dir = new File(execDir).getCanonicalFile();
- }
-
- final Process process;
-
- if (cmd != null) {
- process = Runtime.getRuntime().exec(cmd, null, dir);
- } else if (command != null) {
- process = Runtime.getRuntime().exec(command, null, dir);
- ;
- } else {
- throw new RuntimeException("No command specified");
- }
-
- Runtime.getRuntime().addShutdownHook(new Thread() {
-
- public void run() {
- if (process != null) {
- try {
- process.exitValue();
- } catch (Exception e) {
- process.destroy();
- System.err.println("Killed process " + process);
- }
- }
- }
- });
-
- // Manage standard streams
- StreamReaderThread stdOutThread = new StreamReaderThread(process
- .getInputStream(), false);
- stdOutThread.start();
- // TODO: understand why streams are not properly flushed
- StreamReaderThread stdErrThread = new StreamReaderThread(process
- .getInputStream(), false);
- stdErrThread.start();
- if (captureStdIn)
- new StdInThread(process.getOutputStream()).start();
-
- // Wait for the end of the process
- if (synchronous) {
- int exitCode = process.waitFor();
- if (exitCode != 0) {
- Thread.sleep(5000);// leave the process a chance to log
- System.err.println("Process return exit code " + exitCode);
- }
- } else {
- // asynchronous: return
- }
- } catch (Exception e) {
- throw new RuntimeException("Could not execute command " + cmd, e);
- }
-
- }
-
- /**
- * Shortcut method returning the current exec dir if the specified one is
- * null.
- */
- private String getUsedDir(File dir) {
- if (dir == null)
- return System.getProperty("user.dir");
- else
- return dir.getPath();
- }
-
- public void setCmd(String command) {
- this.cmd = command;
- }
-
- public void setExecDir(String execdir) {
- this.execDir = execdir;
- }
-
- public void setCommand(String[] command) {
- this.command = command;
- }
-
- protected synchronized void write(String str, boolean isErr) {
- if (isErr) {
- System.err.print(str);
- System.err.flush();
- } else {
- System.out.print(str);
- System.out.flush();
- }
- notifyAll();
- }
-
- protected class StreamReaderThread extends Thread {
- private final InputStream stream;
- private final boolean isErr;
-
- public StreamReaderThread(InputStream stream, boolean isErr) {
- this.stream = stream;
- this.isErr = isErr;
- }
-
- public void run() {
- // BufferedReader in = null;
- InputStreamReader isr = null;
- try {
- isr = new InputStreamReader(stream);
- int c;
- StringBuffer buf = new StringBuffer(256);
- char lastCr = '\n';
- while ((c = isr.read()) != -1) {
- char cr = (char) c;
-
- buf.append(cr);
-
- boolean write = false;
- if (lastCr == '>' && cr == ' ')
- write = true;
- else if (cr == '\n')
- write = true;
-
- lastCr = cr;
- if (write) {
- write(buf.toString(), isErr);
- buf = new StringBuffer(256);
- }
-
- // if (isErr) {
- // System.err.print(cr);
- // if (cr == '\n' || cr == '>')
- // System.err.flush();
- // } else {
- // System.out.print(cr);
- // if (cr == '\n' || cr == '>')
- // System.out.flush();
- // }
- }
- // String line = null;
- // while ((line = in.readLine()) != null) {
- // stdOutCallback(line);
- // System.out.
- // }
- } catch (IOException e) {
- // catch silently
- // because the other methods
- // to check whether the stream
- // is closed would probably
- // be to costly
- } finally {
- if (synchronous)
- IOUtils.closeQuietly(isr);
- }
- }
- }
-
- protected class StdInThread extends Thread {
- private final OutputStream stream;
-
- public StdInThread(OutputStream stream) {
- this.stream = stream;
- }
-
- public void run() {
- // BufferedReader in = null;
- // Writer out = null;
- InputStreamReader isr = null;
- try {
- // out = new OutputStreamWriter(stream);
- isr = new InputStreamReader(System.in);
- int c;
- while ((c = isr.read()) != -1) {
- stream.write(c);
- stream.flush();
- }
-
- /*
- * in = new BufferedReader(new InputStreamReader(System.in));
- * String line = null; while ((line = in.readLine()) != null) {
- * out.write(line); out.write("\n"); out.flush(); }
- */
- } catch (IOException e) {
- throw new RuntimeException("Could not write to stdin stream", e);
- } finally {
- if (synchronous) {
- IOUtils.closeQuietly(isr);
- // IOUtils.closeQuietly(in);
- // IOUtils.closeQuietly(out);
- }
- }
- }
-
- }
-}
+++ /dev/null
-<component-set>
- <components>
- <component>
- <role>org.argeo.slc.maven.plugin.MavenDependencyManager
- </role>
- <implementation>
- org.argeo.slc.maven.plugin.DefaultMavenDependencyManager
- </implementation>
- <requirements>
- <requirement>
- <role>org.apache.maven.artifact.factory.ArtifactFactory
- </role>
- <field-name>factory</field-name>
- </requirement>
- <requirement>
- <role>org.apache.maven.artifact.resolver.ArtifactResolver
- </role>
- <field-name>resolver</field-name>
- </requirement>
- <requirement>
- <role>org.codehaus.plexus.archiver.manager.ArchiverManager
- </role>
- <field-name>archiverManager</field-name>
- </requirement>
- <requirement>
- <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource
- </role>
- <field-name>artifactMetadataSource
- </field-name>
- </requirement>
- </requirements>
- <configuration />
- </component>
- </components>
-</component-set>
+++ /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>
- <groupId>org.argeo.slc.maven</groupId>
- <version>0.1.4</version>
- <artifactId>slc-maven</artifactId>
- <packaging>pom</packaging>
- <name>Argeo Maven</name>
- <modules>
- <module>org.argeo.slc.maven.shared</module>
- <module>maven-argeo-qooxdoo-plugin</module>
- <module>maven-argeo-osgi-plugin</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0.7</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- <version>1.0-alpha-9</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default
- </artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-script-ant</artifactId>
- <version>2.0.9</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <repositories>
- <repository>
- <id>central</id>
- <url>http://repo1.maven.org/maven2</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>warn</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- <repository>
- <id>argeo</id>
- <url>http://www.argeo.org/maven/argeo</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- <repository>
- <id>argeo-snapshots</id>
- <url>http://www.argeo.org/maven/argeo-snapshots</url>
- <releases>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- </repositories>
- <distributionManagement>
- <repository>
- <uniqueVersion>false</uniqueVersion>
- <id>argeo-restricted</id>
- <name>Argeo FOSS Repository</name>
- <url>file:///var/argeo/maven2/argeo</url>
- </repository>
- <snapshotRepository>
- <uniqueVersion>true</uniqueVersion>
- <id>argeo-snapshots-restricted</id>
- <name>Argeo FOSS Snapshots Repository</name>
- <url>file:///var/argeo/maven2/argeo-snapshots</url>
- </snapshotRepository>
- <site>
- <id>argeo-slc-site</id>
- <name>SLC Site</name>
- <url>
- file:///var/argeo/projects/SLC/www/site/${project.version}
- </url>
- </site>
- </distributionManagement>
-
-</project>
-