Skip to content

Instantly share code, notes, and snippets.

View fbricon's full-sized avatar
🖖

Fred Bricon fbricon

🖖
View GitHub Profile
<!-- Required mavenarchiver update site -->
<associateSites>
<associateSite label="m2e extras" url="https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201107060316/"/>
</associateSites>
package org.maven.ide.eclipse.wtp.jpt;
import java.io.File;
import org.apache.maven.model.Resource;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
@fbricon
fbricon / gist:2035545
Created March 14, 2012 10:14
GWT Errai deployment instructions for Eclipse
Running the Application in JBoss Developer Studio or Eclipse with JBoss Tools
=============================================================================
We assume you already have the project in your workspace because it was created from
the Maven archetype within your IDE.
To run the project and try it out, you will need to perform a maven compilation before the first time you deploy,
as some resources and classes can not be generated via the GWT/Eclipse compilers alone :
1. Right-click on the project the project node in the Package Explorer and select Run As > Maven Build...
2. Set goals = package and click Run. GWT compilation might take a few minutes.
#Moving m2e-wtp project to Eclipse
Over the last 2+ years we have done a lot of work at helping improving Maven Integration for Eclipse (m2e) in areas of performance, features and extensions.
One of those extensions, if not the most important one, is maintaining and developing Maven Integration for Web Tools Platform also called m2e-wtp.
Today (or rather last night) our proposal for making this an Eclipse.org project [got posted](http://www.eclipse.org/proposals/technology.m2e.m2e-wtp/).
#What is m2e-wtp
@fbricon
fbricon / StacksUtil.java
Created September 3, 2012 14:35
StacksUtil
package org.jboss.tools.stacks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
import org.jboss.jdf.stacks.model.Archetype;
import org.jboss.jdf.stacks.model.ArchetypeVersion;
@fbricon
fbricon / gist:3736168
Created September 17, 2012 08:26
Add access rules to Maven Classpath
public void configureClasspath(IMavenProjectFacade facade,
IClasspathDescriptor classpath, IProgressMonitor monitor)
throws CoreException {
IProject project = facade.getProject();
Set<IRuntime> runtimes = getTargetedJBossRuntimes(project);
if (runtimes == null || runtimes.isEmpty()) {
return;
@fbricon
fbricon / gist:3857677
Created October 9, 2012 09:45
Make JDF quickstarts available as importable projects in JBoss Tools
def basedir = project.basedir.canonicalPath.replace("\\", "/")
def version = "4.0.0"
def examplesBaseUrl = System.getProperty('examples.base.url')?:"http://download.jboss.org/jbosstools/examples/${version}";
if (examplesBaseUrl.endsWith("/")) {
examplesBaseUrl = examplesBaseUrl.substring(0, examplesBaseUrl.length() -1);
}
def zipDir = new File(project.build.directory,"zips")
@fbricon
fbricon / gist:4169929
Created November 29, 2012 15:48
Incremental build friendly ModuleAnnotationProcessor
/*
* Copyright 2011 JBoss, by Red Hat, Inc
*
* 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
tried :
IMavenExecutionContext context = MavenPlugin.getMaven().createExecutionContext();
version = context.execute(new ICallable<String>() {
public String call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
return MavenPlugin.getMaven().resolvePluginVersion(groupId, artifactId, context.getSession());
}
}, new NullProgressMonitor());
and got
@fbricon
fbricon / offlineExamples.groovy
Last active December 17, 2015 13:58
JBT quickstarts going offline * download quickstarts * unzip maven quickstarts * run maven builds of the quickstarts (activating all declared profiles) * call stacks client * generate projects from all archetypes and build them * dedicated local maven repo is populated throughout all the builds This is *very* rough / brittle. Still - use argumen…
/*************************************************************************************
* Copyright (c) 2013 Red Hat, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* JBoss by Red Hat - Initial implementation.
************************************************************************************/