JBoss Tools SVN: r39150 - trunk/documentation/whatsnew/maven.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-27 12:09:10 -0500 (Mon, 27 Feb 2012)
New Revision: 39150
Modified:
trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html
Log:
JBIDE-11029 : add more Maven N&N
Modified: trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html 2012-02-27 16:39:27 UTC (rev 39149)
+++ trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html 2012-02-27 17:09:10 UTC (rev 39150)
@@ -66,7 +66,7 @@
<p>
<small>
- See <a href="https://issues.jboss.org/browse/JBIDE-10750">JBIDE-10750</a> , for more details.
+ See <a href="https://issues.jboss.org/browse/JBIDE-10750">JBIDE-10750</a> for more details.
</small></p>
</td>
</tr>
@@ -87,7 +87,7 @@
</p>
<p>
<small>
- See <a href="https://issues.jboss.org/browse/JBIDE-9688">JBIDE-9688</a> , for more details.
+ See <a href="https://issues.jboss.org/browse/JBIDE-9688">JBIDE-9688</a> for more details.
</small>
</p>
</td>
@@ -98,6 +98,35 @@
</td>
</tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname4"></a><b>Better Maven conversion</b></td>
+ <td valign="top">
+ <p>Installing the JBoss Maven Facet to an Eclipse project will create a much better, cleaner pom.xml :
+ <ul>
+ <li>does not add plugin configuration when the existing values correspond to maven defaults</li>
+ <li>locks down plugin versions</li>
+ <li>remove java nature from EAR, POM projects</li>
+ <li>adds children projects to parent's dependency management section</li>
+ <li>makes the plugin configurations respect the corresponding eclipse facet version</li>
+ <li>removes custom output directory settings, everything goes to target/classes now</li>
+ <li>JBoss Seam is now referenced as an ejb type dependency everywhere.</li>
+ <li>adds support for web fragments</li>
+ </ul>
+ </p>
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-10762">JBIDE-10762</a> for more details.
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
</table>
</body>
13 years, 2 months
JBoss Tools SVN: r39149 - in trunk/documentation/whatsnew: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-27 11:39:27 -0500 (Mon, 27 Feb 2012)
New Revision: 39149
Added:
trunk/documentation/whatsnew/images/jpa-enabled-project.png
trunk/documentation/whatsnew/images/new-jpa-configurator.png
trunk/documentation/whatsnew/images/new-profiles-mgmt-feature.png
trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html
Modified:
trunk/documentation/whatsnew/index.html
Log:
JBIDE-11029 : add Maven N&N
Added: trunk/documentation/whatsnew/images/jpa-enabled-project.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/jpa-enabled-project.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/new-jpa-configurator.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/new-jpa-configurator.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/new-profiles-mgmt-feature.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/new-profiles-mgmt-feature.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2012-02-27 16:23:57 UTC (rev 39148)
+++ trunk/documentation/whatsnew/index.html 2012-02-27 16:39:27 UTC (rev 39149)
@@ -34,6 +34,34 @@
</tr>
<tr>
<td valign="top" align="left">
+ <p align="right"><b>3.3.0.Beta1</b>
+ <td valign="top">
+ <!--
+ <p><a href="core/core-news-3.3.0.M5.html">Core/General</a></p>
+ <p><a href="openshift/openshift-news-2.3.0.M5.html">OpenShift
+ Tools</a></p>
+ <p><a href="as/as-news-3.3.0.M5.html">JBoss AS Server
+ Tools</a></p>
+ -->
+ <p><a href="jst/jst-news-3.3.0.Beta1.html">JST/JSF</a></p>
+ <p><a href="vpe/vpe-news-3.3.0.Beta1.html">Visual Page Editor</a></p>
+ <p><a href="cdi/cdi-news-3.3.0.Beta1.html">CDI/Seam 3 Tools</a></p>
+ <!--
+ <p><a href="forge/forge-news-3.3.0.M5.html">Forge Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.5.0.M5.html">Hibernate Tools</a></p>
+ <p><a href="examples/examples-news-3.3.0.M5.html">Project Examples</a></p>
+ -->
+ <p><a href="seam/seam-news-3.3.0.Beta1.html">Seam 2 Tools</a></p>
+ <p><a href="maven/maven-news-3.3.0.Beta1.html">Maven Tools</a></p>
+ <!--
+ <p><a href="central/central-news-1.0.0.M5.html">JBoss Central</a></p>
+ <p><a href="teiid/teiid-news-7.6.html">Teiid Designer</a></p>
+ <p><a href="ws/ws-news-1.2.2.M5.html">Webservices Tools</a></p>
+ -->
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
<p align="right"><b>3.3.0.M5</b>
<td valign="top">
<p><a href="core/core-news-3.3.0.M5.html">Core/General</a></p>
@@ -51,8 +79,7 @@
<p><a href="central/central-news-1.0.0.M5.html">JBoss Central</a></p>
<p><a href="teiid/teiid-news-7.6.html">Teiid Designer</a></p>
<p><a href="ws/ws-news-1.2.2.M5.html">Webservices Tools</a></p>
-
- </td>
+ </td>
</tr>
<tr>
<td valign="top" align="left">
Added: trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta1.html 2012-02-27 16:39:27 UTC (rev 39149)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>What's New in Maven Tools</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>Maven Tools</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+ href="../hibernate/hibernate-news-3.5.0.M3.html">Hibernate Tools ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>JBoss Maven Integration</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname1" id="itemname1"></a><b>Standalone Maven Profiles Management Interface</b></td>
+ <td valign="top">
+ <p>The Maven Profile management user interface introduced in <a href="./maven-news-3.3.0.M3.html#itemname1">JBoss Tools 3.3.0.M3</a> is now available as a standalone feature. </p>
+ <img src="../images/new-profiles-mgmt-feature.png" />
+ <p>This change allows you to install the Maven Profile Management on Eclipse distributions without dragging any WTP dependencies.</p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-10604">JBIDE-10604</a> for more details.
+ </small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname2" id="itemname2"></a><b>New JPA configurator</b></td>
+ <td valign="top">
+ <p>If a maven project contains a persistence.xml, the JPA Facet will be automatically applied during m2e's project configuration, using the "Discover annotated classes automatically" setting.
+ Any existing JPA configuration will be untouched.<br/>
+ </p>
+ <img src="../images/jpa-enabled-project.png" />
+ <p>The Maven JPA configurator feature can be selected from the Abridged or Maven Support categories in the JBoss Tools update site :
+ </p>
+ <img src="../images/new-jpa-configurator.png" />
+
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-10750">JBIDE-10750</a> , for more details.
+ </small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname3"></a><b>JBoss Maven repository indexed by default</b></td>
+ <td valign="top">
+ <p>If m2e's configured as such, the <a href="https://repository.jboss.org/nexus/content/repositories/releases/">JBoss Releases repository</a> index will be downloaded/updated on workspace startup.
+ This will allow users to search and find JBoss artifacts out-of-the-box. However, keep in mind the JBoss repository will need to be explicitely declared in your settings.xml (or pom.xml) for your projects to build.
+ Fortunately, you can add it easily via the <a href="./maven-news-3.3.0.M3.html#itemname5">JBoss repository template in m2e's XML editor</a>.
+ </p>
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-9688">JBIDE-9688</a> , for more details.
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
13 years, 2 months
JBoss Tools SVN: r39148 - in trunk/build: tycho-plugins and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-02-27 11:23:57 -0500 (Mon, 27 Feb 2012)
New Revision: 39148
Added:
trunk/build/tycho-plugins/
trunk/build/tycho-plugins/generate-repository-facade/
trunk/build/tycho-plugins/generate-repository-facade/.classpath
trunk/build/tycho-plugins/generate-repository-facade/.project
trunk/build/tycho-plugins/generate-repository-facade/.settings/
trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.jdt.core.prefs
trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.m2e.core.prefs
trunk/build/tycho-plugins/generate-repository-facade/pom.xml
trunk/build/tycho-plugins/generate-repository-facade/src/
trunk/build/tycho-plugins/generate-repository-facade/src/main/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/
trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/GenerateRepositoryFacadeMojo.java
trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/
trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/index.html
trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/
trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.properties.xsl
trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.xsl
trunk/build/tycho-plugins/generate-repository-facade/src/test/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/FileTest.java
trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/XsltTest.java
Log:
JBIDE-11065
Plugin to generate repository files (as done in build.xml)
Added: trunk/build/tycho-plugins/generate-repository-facade/.classpath
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/.classpath (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/.classpath 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/.project
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/.project (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/.project 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>generate-repository-facade</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.jdt.core.prefs 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.m2e.core.prefs (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.m2e.core.prefs 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/.settings/org.eclipse.m2e.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/pom.xml
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/pom.xml (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/pom.xml 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,64 @@
+<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.jboss.tools.tycho</groupId>
+ <artifactId>generate-repository-facade</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>Mojo to Generate site.xml for eclipse-repository</name>
+
+ <properties>
+ <tychoVersion>0.14.0</tychoVersion>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-facade</artifactId>
+ <version>${tychoVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-packaging-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-core</artifactId>
+ <version>${tychoVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <version>8.7</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>saxon-dom</artifactId>
+ <version>8.7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2</url>
+ <layout>default</layout>
+ <releases><enabled>true</enabled></releases>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>central-plugin</id>
+ <url>http://repo1.maven.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+</project>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/GenerateRepositoryFacadeMojo.java
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/GenerateRepositoryFacadeMojo.java (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/GenerateRepositoryFacadeMojo.java 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,367 @@
+package org.jboss.tools.tycho.sitegenerator;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import java.util.zip.ZipOutputStream;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.archiver.zip.ZipArchiver;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.io.RawInputStreamFacade;
+import org.eclipse.tycho.ArtifactKey;
+import org.eclipse.tycho.ReactorProject;
+import org.eclipse.tycho.core.ArtifactDependencyVisitor;
+import org.eclipse.tycho.core.FeatureDescription;
+import org.eclipse.tycho.core.osgitools.EclipseRepositoryProject;
+import org.eclipse.tycho.model.FeatureRef;
+import org.eclipse.tycho.model.UpdateSite;
+import org.eclipse.tycho.model.UpdateSite.SiteFeatureRef;
+import org.eclipse.tycho.packaging.AbstractTychoPackagingMojo;
+import org.eclipse.tycho.packaging.UpdateSiteAssembler;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal generate-repository-facade
+ *
+ * @phase package
+ */
+public class GenerateRepositoryFacadeMojo extends AbstractTychoPackagingMojo {
+ /**
+ * @parameter expression="${session}"
+ * @readonly
+ */
+ private MavenSession session;
+
+ /**
+ * @parameter expression="${project}"
+ * @readonly
+ */
+ private MavenProject project;
+
+ /**
+ * Additional symbols, to replace in files
+ *
+ * @parameter
+ */
+ private Map<String, String> symbols;
+
+ /**
+ * template folder for HTML contents
+ * @parameter
+ */
+ private File siteTemplateFolder;
+
+ /**
+ * Additional sites to add to repo associateSites
+ * @parameter
+ */
+ private List<String> associateSites;
+
+ /**
+ * name of the file in ${siteTemplateFolder} to use as template for index.html
+ * @parameter default-value="index.html"
+ */
+ private String indexName;
+
+ public void execute() throws MojoExecutionException
+ {
+ getLog().warn("sites:" + associateSites.size());
+ if (!ArtifactKey.TYPE_ECLIPSE_REPOSITORY.equals(project.getPackaging())) {
+ return;
+ }
+
+ if (symbols == null) {
+ symbols = new HashMap<String, String>();
+ }
+ // TODO populate default symbols: ${update.site.name} & ${update.site.description}
+
+ File outputRepository = new File(project.getBuild().getDirectory(), "repository");
+ File outputSiteXml = generateSiteXml(outputRepository);
+ generateSiteProperties(outputRepository, outputSiteXml);
+ generateJBossToolsDirectoryXml(outputRepository);
+ generateWebStuff(outputRepository, outputSiteXml);
+ try {
+ alterContentJar(outputRepository);
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error while altering content.jar",ex);
+ }
+
+
+ File repoZipFile = new File(project.getBuild().getDirectory(), "repository.zip");
+ repoZipFile.delete();
+ try {
+ ZipArchiver archiver = new ZipArchiver();
+ archiver.setDestFile(repoZipFile);
+ archiver.setForced(true);
+ archiver.addDirectory(outputRepository);
+ archiver.createArchive();
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Could not create " + repoZipFile.getName(), ex);
+ }
+
+ }
+
+ private void generateWebStuff(File outputRepository, File outputSiteXml)
+ throws TransformerFactoryConfigurationError, MojoExecutionException {
+ // Generate index.html
+ try {
+ InputStream siteXsl = getClass().getResourceAsStream("/xslt/site.xsl");
+ Source xsltSource = new StreamSource(siteXsl);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer(xsltSource);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Result res = new StreamResult(out);
+ transformer.transform(new StreamSource(outputSiteXml), res);
+ siteXsl.close();
+ out.close();
+ symbols.put("${site.contents}", out.toString());
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error occured while generating 'site.properties'", ex);
+ }
+
+
+ try {
+ copyTemplateResources(outputRepository);
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error while copying siteTemplateFolder content to " + outputRepository, ex);
+ }
+ try {
+ alterIndexFile(outputRepository);
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error writing file " + indexName, ex);
+ }
+ }
+
+ private void generateJBossToolsDirectoryXml(File outputRepository)
+ throws MojoExecutionException {
+ // Generate jbosstools-directory.xml
+ File[] org_jboss_tools_central_discovery = new File(outputRepository, "plugins").listFiles(new FileFilter() {
+ public boolean accept(File arg0) {
+ return arg0.getName().startsWith("org.jboss.tools.central.discovery_") && arg0.getName().endsWith(".jar");
+ }
+ });
+ if (org_jboss_tools_central_discovery.length > 0) {
+ try {
+ FileOutputStream directoryXml = new FileOutputStream(new File(outputRepository, "jbosstools-directory.xml"));
+ directoryXml.write("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\">\n".getBytes());
+ directoryXml.write("<entry url=\"plugins/".getBytes());
+ directoryXml.write(org_jboss_tools_central_discovery[0].getName().getBytes());
+ directoryXml.write("\" permitCategories=\"true\"/>\n".getBytes());
+ directoryXml.write("</directory>".getBytes());
+ directoryXml.close();
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Could not write file 'jbosstools-directory.xml'", ex);
+ }
+ }
+ if (org_jboss_tools_central_discovery.length == 0) {
+ getLog().warn("No org.jboss.tools.central.discovery plugin in repo. Skip generatio of 'jbosstools-directory.xml'");
+ }
+ if (org_jboss_tools_central_discovery.length > 1) {
+ getLog().warn("Several org.jbosstools.central.discovery plugin in repo");
+ }
+ }
+
+ private void generateSiteProperties(File outputRepository,
+ File outputSiteXml) throws TransformerFactoryConfigurationError,
+ MojoExecutionException {
+ // Generate site.properties
+ try {
+ InputStream siteXsl = getClass().getResourceAsStream("/xslt/site.properties.xsl");
+ Source xsltSource = new StreamSource(siteXsl);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer(xsltSource);
+ FileOutputStream out = new FileOutputStream(new File(outputRepository, "site.properties"));
+ Result res = new StreamResult(out);
+ transformer.transform(new StreamSource(outputSiteXml), res);
+ siteXsl.close();
+ out.close();
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error occured while generating 'site.properties'", ex);
+ }
+
+ try {
+ copyTemplateResources(outputRepository);
+ } catch (Exception ex) {
+ throw new MojoExecutionException("Error while copying siteTemplateFolder content to " + outputRepository, ex);
+ }
+ }
+
+ private File generateSiteXml(File outputRepository)
+ throws MojoExecutionException {
+ // Generate site.xml
+ File categoryFile = new File(project.getBasedir(), "category.xml");
+ if (!categoryFile.isFile()) {
+ throw new MojoExecutionException("Missing 'category.xml file'");
+ }
+
+ UpdateSite site = null;
+ try {
+ site = UpdateSite.read(categoryFile);
+ } catch (IOException ex) {
+ throw new MojoExecutionException("Could not read 'category.xml' file", ex);
+ }
+ new EclipseRepositoryProject().getDependencyWalker(project).traverseUpdateSite(site, new ArtifactDependencyVisitor() {
+ @Override
+ public boolean visitFeature(FeatureDescription feature) {
+ FeatureRef featureRef = feature.getFeatureRef();
+ String id = featureRef.getId();
+ ReactorProject otherProject = feature.getMavenProject();
+ String version;
+ if (otherProject != null) {
+ version = otherProject.getExpandedVersion();
+ } else {
+ version = feature.getKey().getVersion();
+ }
+ String url = UpdateSiteAssembler.FEATURES_DIR + id + "_" + version + ".jar";
+ ((SiteFeatureRef) featureRef).setUrl(url);
+ featureRef.setVersion(version);
+ return false; // don't traverse included features
+ }
+ });
+
+ File outputSiteXml = new File(outputRepository, "site.xml");
+ try {
+ if (!outputSiteXml.exists()) {
+ outputSiteXml.createNewFile();
+ }
+ UpdateSite.write(site, outputSiteXml);
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ throw new MojoExecutionException("Could not write site.xml to '" + outputSiteXml.getAbsolutePath() + "'", ex);
+ }
+ return outputSiteXml;
+ }
+
+ private void alterContentJar(File outputRepository)
+ throws FileNotFoundException, IOException, SAXException,
+ ParserConfigurationException, TransformerFactoryConfigurationError,
+ TransformerConfigurationException, TransformerException {
+ File contentJar = new File(outputRepository, "content.jar");
+ ZipInputStream contentStream = new ZipInputStream(new FileInputStream(contentJar));
+ ZipEntry entry = null;
+ Document contentDoc = null;
+ boolean done = false;
+ while (!done && (entry = contentStream.getNextEntry()) != null) {
+ if (entry.getName().equals("content.xml")) {
+ contentDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(contentStream);
+ Element repoElement = (Element)contentDoc.getElementsByTagName("repository").item(0);
+ NodeList references = repoElement.getElementsByTagName("references");
+ for (int i = 0; i < references.getLength(); i++) {
+ Node currentRef = references.item(i);
+ currentRef.getParentNode().removeChild(currentRef);
+ }
+ if (associateSites != null && associateSites.size() > 0) {
+ Element refElement = contentDoc.createElement("references");
+ refElement.setAttribute("size", Integer.valueOf(2 * associateSites.size()).toString());
+ for (String associate : associateSites) {
+ Element rep0 = contentDoc.createElement("repository");
+ rep0.setAttribute("uri", associate);
+ rep0.setAttribute("url", associate);
+ rep0.setAttribute("type", "0");
+ rep0.setAttribute("options", "1");
+ refElement.appendChild(rep0);
+ Element rep1 = (Element)rep0.cloneNode(true);
+ refElement.appendChild(rep1);
+ }
+ repoElement.appendChild(refElement);
+ }
+ done = true;
+ }
+ }
+ // .close and .closeEntry raise exception:
+ // https://issues.apache.org/bugzilla/show_bug.cgi?id=3862
+ ZipOutputStream outContentStream = new ZipOutputStream(new FileOutputStream(contentJar));
+ ZipEntry contentXmlEntry = new ZipEntry("content.xml");
+ outContentStream.putNextEntry(contentXmlEntry);
+ TransformerFactory tFactory = TransformerFactory.newInstance();
+ Transformer transformer = tFactory.newTransformer();
+ DOMSource source = new DOMSource(contentDoc);
+ StreamResult result = new StreamResult(outContentStream);
+ transformer.transform(source, result);
+ outContentStream.closeEntry();
+ outContentStream.close();
+ }
+
+ private void alterIndexFile(File outputSite) throws FileNotFoundException, IOException {
+ File templateFile = new File(outputSite, indexName);
+ FileInputStream fis = new FileInputStream(templateFile);
+ String htmlFile = IOUtil.toString(fis, "UTF-8");
+ for (Entry<String, String> entry : symbols.entrySet()) {
+ String key = entry.getKey();
+ if (!key.startsWith("${")) {
+ key = "${" + key + "}";
+ }
+ htmlFile = htmlFile.replace(key, entry.getValue());
+ }
+ FileOutputStream out = new FileOutputStream(templateFile);
+ out.write(htmlFile.getBytes("UTF-8"));
+ out.close();
+ }
+
+ private void copyTemplateResources(File outputSite) throws IOException {
+ if (siteTemplateFolder != null) {
+ FileUtils.copyDirectory(siteTemplateFolder, outputSite);
+ } else {
+ // load from resources
+ InputStream indexStream = getClass().getResourceAsStream("/index.html");
+ indexName = "index.html";
+ FileUtils.copyStreamToFile(new RawInputStreamFacade(indexStream), new File(outputSite, "index.html"));
+ indexStream.close();
+ File webFolder = new File(outputSite, "web");
+ if (!webFolder.exists()) {
+ webFolder.mkdir();
+ }
+ InputStream cssStream = getClass().getResourceAsStream("/web/site.css");
+ FileUtils.copyStreamToFile(new RawInputStreamFacade(cssStream), new File(webFolder, "site.css"));
+ cssStream.close();
+ }
+ }
+}
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/main/java/org/jboss/tools/tycho/sitegenerator/GenerateRepositoryFacadeMojo.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/index.html
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/index.html (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/index.html 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,136 @@
+<html>
+<head>
+<title>${update.site.name} - ${update.site.description} Update Site${update.site.version}</title>
+<style>
+@import url("http://download.jboss.org/jbosstools/updates/web/site.css");
+</style>
+</head>
+<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
+<table marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
+ cellspacing="0" cellpadding="0" width="920" class="bodyText">
+ <tr>
+ <td colspan="3"><img
+ src="https://www.jboss.org/dms/tools/images/tools-banner.png" /></td>
+ </tr>
+ <tr>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
+ </tr>
+ <tr>
+ <td>      </td>
+ <td>
+ <h2 class="title">${update.site.name} - ${update.site.description} Update Site</h2>
+ <table width="100%">
+ <tr class="header">
+ <td class="sub-header" width="100%"><span>Latest Build${update.site.version}</span></td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">This is the <b>${update.site.description}</b>
+ Update Site for ${update.site.name}.
+ <blockquote style="border: 1px dashed #1778be; padding: 2px">
+ <ol>
+ <li>To <a class="link"
+ href="http://www.jboss.org/tools/download/installation/update_3_3">install</a>
+ from this site, start up Eclipse 3.7, then do:
+ <ul>
+ <code><strong>Help > Install New Software... ></strong></code>
+ </ul>
+ </li>
+ <li>Copy this site's URL into Eclipse, and hit Enter.</li>
+ <li>When the site loads, select the features to install,
+ or click the <code><strong>Select All</strong></code> button.</li>
+ <li>To properly resolve all dependencies, check
+ <ul><code><strong>[x] Contact all update sites during install to find required software</strong></code></ul>
+
+ <li>Click <code><strong>Next</strong></code>, agree to the license
+ terms, and install.</li>
+
+ <p class="bodyText">
+ You can also download JBoss Tools as individual zips for
+ offline installation. See <a class="link"
+ href="http://www.jboss.org/tools/download">JBoss Tools
+ Downloads</a>.<br /> If you downloaded this site as a zip, see
+ <a href="README.installation.txt">Installation README</a>.
+ See also <a
+ href="http://www.jboss.org/tools/download/installation">Installation
+ methods</a>.
+ </p>
+ </ol>
+ </blockquote>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>      </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <table width="100%">
+ <tr class="header">
+ <td class="sub-header" width="100%"><span> Installation
+ Types</span></td>
+ </tr>
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">Depending on how close to the bleeding edge
+ you like to be, there are several types of releases available.</p>
+ <br />
+
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Stable Releases</h4>
+
+ <p><a href="https://www.jboss.org/tools/download/stable.html">Stable
+ releases</a> are - as indicated by their name - stable.</p><br/>
+
+ </td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Development Milestones</h4>
+
+ <p><a href="https://www.jboss.org/tools/download/dev.html">Development
+ builds</a>, released once per milestone and only a few times a year, are
+ fairly stable, but there may be some things which do not yet work.
+ If you would like to try one of these milestones, we'd greatly
+ appreciate the assistance in testing and <a
+ href="https://jira.jboss.org/jira/browse/JBIDE">reporting of
+ issues in our issue tracker</a>.</p><br/>
+
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Nightly Builds</h4>
+
+ <p>The <a
+ href="https://www.jboss.org/tools/download/nightly.html">bleeding
+ edge</a> contains the latest and greatest new features, but nothing is
+ stable or guaranteed - yet. If you're using a Milestone and need a
+ fix, you can update to the latest Nightly, or wait for the next
+ Milestone.</p><br/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</center>
+</html>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/index.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.properties.xsl
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.properties.xsl (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.properties.xsl 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,20 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="text" indent="yes" />
+ <xsl:template match="/site">
+ <xsl:for-each select="category-def">
+ <xsl:sort select="@name" />
+ <xsl:variable name="catg"><xsl:value-of select="@name"/></xsl:variable>
+#
+<xsl:value-of select="$catg" />.category.features = \
+<xsl:for-each select="//feature">
+ <xsl:sort select="@id" />
+ <xsl:if test="count(./category[contains(@name,$catg)])>0"><xsl:value-of select="@id" />,
+</xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+#
+ </xsl:template>
+</xsl:stylesheet>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.properties.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.xsl
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.xsl (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.xsl 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,123 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <table cellspacing="2" cellpadding="0" border="0">
+ <xsl:if test="count(feature[contains(@id,'jboss')])>0">
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <!-- JBoss features -->
+ <xsl:for-each select="feature[contains(@id,'jboss')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="count(feature[not(contains(@id,'jboss'))])>0">
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <!-- other features -->
+ <xsl:for-each select="feature[not(contains(@id,'jboss'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine" colspan="1">
+ <a href="site.xml" style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine" colspan="1">
+ ::
+ <a href="plugins/" style="font-size:x-small">plugins</a>
+ ::
+ <a href="features/" style="font-size:x-small">features</a>
+ </td>
+ <td class="rowLine" colspan="1">
+ <a href="jbosstools-directory.xml" style="font-size:x-small">directory.xml</a> | <a href="site.properties" style="font-size:x-small">site.properties</a>
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/main/resources/xslt/site.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/FileTest.java
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/FileTest.java (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/FileTest.java 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,14 @@
+package org.jboss.tools.tycho.sitegenerator;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class FileTest {
+
+ @Test
+ public void testReplace() {
+ assertEquals("replaced", new String("${site.contents}").replace("${site.contents}", "replaced"));
+ }
+
+}
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/FileTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/XsltTest.java
===================================================================
--- trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/XsltTest.java (rev 0)
+++ trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/XsltTest.java 2012-02-27 16:23:57 UTC (rev 39148)
@@ -0,0 +1,30 @@
+package org.jboss.tools.tycho.sitegenerator;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.junit.Test;
+
+public class XsltTest {
+
+ @Test
+ public void testSiteProperties() throws Exception {
+ InputStream siteXsl = GenerateRepositoryFacadeMojo.class.getResourceAsStream("/xslt/site.properties.xsl");
+ Source xsltSource = new StreamSource(siteXsl);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer(xsltSource);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Result res = new StreamResult(out);
+ transformer.transform(new StreamSource(new ByteArrayInputStream("<site/>".getBytes())), res);
+ siteXsl.close();
+ out.close();
+ }
+
+}
Property changes on: trunk/build/tycho-plugins/generate-repository-facade/src/test/java/org/jboss/tools/tycho/sitegenerator/XsltTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 2 months
JBoss Tools SVN: r39147 - in trunk/documentation/whatsnew/vpe: images/3.3.0.Beta1 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-02-27 10:27:41 -0500 (Mon, 27 Feb 2012)
New Revision: 39147
Modified:
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10431-browsersim-skin.png
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10553-browsersim-default-page.png
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/5861comm.png
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/8701button.png
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/8701prefs.png
trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html
Log:
https://issues.jboss.org/browse/JBIDE-10963 : Visual Editor Component N&N for 3.3.0.Beta1
- set MIME types
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10431-browsersim-skin.png
___________________________________________________________________
Modified: svn:mime-type
- application/octet-stream
+ image/png
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10553-browsersim-default-page.png
___________________________________________________________________
Modified: svn:mime-type
- application/octet-stream
+ image/png
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/5861comm.png
___________________________________________________________________
Modified: svn:mime-type
- application/octet-stream
+ image/png
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/8701button.png
___________________________________________________________________
Modified: svn:mime-type
- application/octet-stream
+ image/png
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/8701prefs.png
___________________________________________________________________
Modified: svn:mime-type
- application/octet-stream
+ image/png
Property changes on: trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html
___________________________________________________________________
Added: svn:mime-type
+ text/html
13 years, 2 months
JBoss Tools SVN: r39146 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-27 10:22:09 -0500 (Mon, 27 Feb 2012)
New Revision: 39146
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java
Log:
https://issues.jboss.org/browse/JBIDE-10745 - toolbar state will be updated after preferences page is closed.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java 2012-02-27 14:26:30 UTC (rev 39145)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java 2012-02-27 15:22:09 UTC (rev 39146)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.preferences;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.State;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
@@ -22,12 +24,19 @@
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.editor.IVisualEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.handlers.ScrollLockSourceVisualHandler;
+import org.jboss.tools.vpe.handlers.ShowBorderHandler;
+import org.jboss.tools.vpe.handlers.ShowBundleAsELHandler;
+import org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler;
+import org.jboss.tools.vpe.handlers.ShowTextFormattingHandler;
import org.jboss.tools.vpe.messages.VpeUIMessages;
public class VpePreferencesPage extends FieldEditorPreferencePage implements
@@ -56,6 +65,8 @@
private Group tabsGroup;
private Group visualEditorToolbarGroup;
+ private ICommandService commandService = null;
+
public VpePreferencesPage() {
super();
setPreferenceStore(getPreferenceStore());
@@ -171,12 +182,48 @@
* only for newly opened.
*/
// mpe.updatePartAccordingToPreferences();
+
+ /*
+ * https://issues.jboss.org/browse/JBIDE-10745
+ */
+ boolean presfShowBorderForUnknownTags = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS);
+ boolean prefsShowNonVisualTags = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS);
+ boolean prefsShowTextFormattingBar = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(IVpePreferencesPage.SHOW_TEXT_FORMATTING);
+ boolean prefsShowBundlesAsEL = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
+ boolean prefsSynchronizeScrolling = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(IVpePreferencesPage.SYNCHRONIZE_SCROLLING_BETWEEN_SOURCE_VISUAL_PANES);
+
+ setCommandToggleState(ShowBorderHandler.COMMAND_ID, presfShowBorderForUnknownTags);
+ setCommandToggleState(ShowNonVisualTagsHandler.COMMAND_ID, prefsShowNonVisualTags);
+ setCommandToggleState(ShowTextFormattingHandler.COMMAND_ID, prefsShowTextFormattingBar);
+ setCommandToggleState(ShowBundleAsELHandler.COMMAND_ID, prefsShowBundlesAsEL);
+ setCommandToggleState(ScrollLockSourceVisualHandler.COMMAND_ID, prefsSynchronizeScrolling);
}
}
}
-
return true;
}
+
+ /**
+ * Set toolbar command state after Preferences Page has been changed.
+ * @param commandId command id
+ * @param newState new command state
+ */
+ private void setCommandToggleState(String commandId, boolean newState) {
+ if (commandService == null) {
+ commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ }
+ Command command = commandService.getCommand(commandId);
+ State state = command.getState("org.eclipse.ui.commands.toggleState"); //$NON-NLS-1$
+ boolean oldState = ((Boolean) state.getValue()).booleanValue();
+ if (oldState != newState) {
+ state.setValue(new Boolean(newState));
+ }
+ }
@Override
public IPreferenceStore getPreferenceStore() {
13 years, 2 months
JBoss Tools SVN: r39145 - branches/jbosstools-3.3.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-02-27 09:26:30 -0500 (Mon, 27 Feb 2012)
New Revision: 39145
Modified:
branches/jbosstools-3.3.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
Log:
https://issues.jboss.org/browse/JBIDE-10980
Added 2 null checks
Modified: branches/jbosstools-3.3.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2012-02-27 11:06:05 UTC (rev 39144)
+++ branches/jbosstools-3.3.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2012-02-27 14:26:30 UTC (rev 39145)
@@ -343,30 +343,31 @@
private void formatGeneratedCode(IProgressMonitor monitor, Map<String, File[]> generatedFiles) {
final TextFileBufferOperation operation = new FormatGeneratedCode( HibernateConsoleMessages.CodeGenerationLaunchDelegate_formate_generated_code );
- File[] javaFiles = generatedFiles.get("java"); //$NON-NLS-1$
- if(javaFiles.length>0) {
+ if (generatedFiles != null){
+ File[] javaFiles = generatedFiles.get("java"); //$NON-NLS-1$
+ if(javaFiles != null && javaFiles.length>0) {
- IPath[] locations = new IPath[javaFiles.length];
+ IPath[] locations = new IPath[javaFiles.length];
- for (int i = 0; i < javaFiles.length; i++) {
- File file = javaFiles[i];
- locations[i] = new Path(file.getPath());
- }
+ for (int i = 0; i < javaFiles.length; i++) {
+ File file = javaFiles[i];
+ locations[i] = new Path(file.getPath());
+ }
- FileBufferOperationRunner runner= new FileBufferOperationRunner(FileBuffers.getTextFileBufferManager(), HibernateConsolePlugin.getShell());
- try {
- runner.execute(locations, operation, monitor);
+ FileBufferOperationRunner runner= new FileBufferOperationRunner(FileBuffers.getTextFileBufferManager(), HibernateConsolePlugin.getShell());
+ try {
+ runner.execute(locations, operation, monitor);
+ }
+ catch (OperationCanceledException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_java_format_cancelled, e);
+ }
+ catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_exception_during_java_format, e);
+ } catch (Throwable e) { // full guard since the above operation seem to be able to fail with IllegalArugmentException and SWT Invalid thread access while users are editing.
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_exception_during_java_format, e);
+ }
}
- catch (OperationCanceledException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_java_format_cancelled, e);
- }
- catch (CoreException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_exception_during_java_format, e);
- } catch (Throwable e) { // full guard since the above operation seem to be able to fail with IllegalArugmentException and SWT Invalid thread access while users are editing.
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.CodeGenerationLaunchDelegate_exception_during_java_format, e);
- }
}
-
}
private ArtifactCollector runExporters (final ExporterAttributes attributes, final ExporterFactory[] exporterFactories, final Set<String> outputDirectories, final IProgressMonitor monitor)
13 years, 2 months
JBoss Tools SVN: r39144 - trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-02-27 06:06:05 -0500 (Mon, 27 Feb 2012)
New Revision: 39144
Modified:
trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
Log:
Longer delay because of reading/writing files from/to NFS on remote systems.
Modified: trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
===================================================================
--- trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2012-02-27 10:55:52 UTC (rev 39143)
+++ trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2012-02-27 11:06:05 UTC (rev 39144)
@@ -154,7 +154,7 @@
bot.sleep(Timing.time1S());
KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_ENTER);
KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
- bot.sleep(Timing.time10S());
+ bot.sleep(Timing.time20S());
KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_ENTER);
KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
}
13 years, 2 months
JBoss Tools SVN: r39143 - branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-27 05:55:52 -0500 (Mon, 27 Feb 2012)
New Revision: 39143
Modified:
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-11051 - patch to beta1
Modified: branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-27 10:50:14 UTC (rev 39142)
+++ branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-27 10:55:52 UTC (rev 39143)
@@ -429,7 +429,7 @@
<runtimeType
vendor="%enterpriseProviderName"
- class="org.jboss.ide.eclipse.as.core.server.internal.v7.LocalJBoss7ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.v7.LocalJBoss71ServerRuntime"
description="%jboss.eap.version.60.description"
name="%jboss.eap.version.60.runtime.name"
id="org.jboss.ide.eclipse.as.runtime.eap.60"
13 years, 2 months
JBoss Tools SVN: r39142 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-27 05:50:14 -0500 (Mon, 27 Feb 2012)
New Revision: 39142
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-11051 make eap6 use correct runtime
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-27 10:25:46 UTC (rev 39141)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-27 10:50:14 UTC (rev 39142)
@@ -429,7 +429,7 @@
<runtimeType
vendor="%enterpriseProviderName"
- class="org.jboss.ide.eclipse.as.core.server.internal.v7.LocalJBoss7ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.v7.LocalJBoss71ServerRuntime"
description="%jboss.eap.version.60.description"
name="%jboss.eap.version.60.runtime.name"
id="org.jboss.ide.eclipse.as.runtime.eap.60"
13 years, 2 months
JBoss Tools SVN: r39141 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-27 05:25:46 -0500 (Mon, 27 Feb 2012)
New Revision: 39141
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
Log:
fixed warnings (aded $NON-NLS, removed unneeded import)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2012-02-26 23:19:51 UTC (rev 39140)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2012-02-27 10:25:46 UTC (rev 39141)
@@ -14,7 +14,6 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -22,7 +21,7 @@
public class ShowInWebManagementActionProvider extends AbstractOpenBrowserServerAction {
- private static final String CONSOLE_URL_PATTERN = "http://{0}:{1}/console";
+ private static final String CONSOLE_URL_PATTERN = "http://{0}:{1}/console"; //$NON-NLS-1$
protected String getActionText() {
return Messages.ShowInWebManagementConsole_Action_Text;
}
13 years, 2 months