Skip to content

Commit

Permalink
basic workflow of importing from maven works, #17
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Feb 23, 2015
1 parent 8376474 commit f16df4e
Show file tree
Hide file tree
Showing 77 changed files with 1,619 additions and 44 deletions.
45 changes: 29 additions & 16 deletions de.dentrassi.osgi.job.web/WEB-INF/views/defaultResult.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<%@page import="de.dentrassi.osgi.job.JobHandle"%>

<%@ taglib tagdir="/WEB-INF/tags/main" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

Expand All @@ -17,21 +18,33 @@ else
pageContext.setAttribute ( "type", "default");
%>

<c:choose>
<c:when test="${empty job }">Job not found!</c:when>
<c:otherwise>

<div class="panel panel-${type }">
<div class="panel-heading">
<h4 class="panel-title">${fn:escapeXml(job.label) }</h4>
</div>

<div class="panel-body">
<c:if test="${not empty errorFormatted }">
<pre>${fn:escapeXml(errorFormatted) }</pre>
</c:if>
</div>
<h:main title="Job failed" subtitle="${fn:escapeXml(job.label) }">

<div class="container">

<div class="row">
<div class="col-md-12">

<c:choose>
<c:when test="${empty job }">Job not found!</c:when>
<c:otherwise>

<div class="panel panel-${type }">
<div class="panel-heading">
<h4 class="panel-title">${fn:escapeXml(job.error.message) }</h4>
</div>

<div class="panel-body">
<pre>${fn:escapeXml(job.error.formatted) }</pre>
</div>
</div>

</c:otherwise>
</c:choose>

</div>
</div>

</div>

</c:otherwise>
</c:choose>
</h:main>
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public ModelAndView result ( @PathVariable ( "id" ) final String id, final HttpS
{
final JobHandle job = this.manager.getJob ( id );

if ( job != null && job.isComplete () && job.getError () != null )
{
// show default error page
return defaultResult ( job );
}

final String factoryId = job.getRequest ().getFactoryId ();
final JobFactoryDescriptor desc = this.manager.getFactory ( factoryId );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ public default boolean isComplete ()
{
return getState () == State.COMPLETE;
}

public default boolean isFailed ()
{
return isComplete () && getError () != null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,10 @@ public int compare ( final SimpleArtifactInformation o1, final SimpleArtifactInf
}
};

@Override
public String toString ()
{
return String.format ( "[Artifact: %s - %s]", this.name, this.id );
}

}
11 changes: 11 additions & 0 deletions de.dentrassi.pm.external.maven/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/plexus-interpolation-1.22.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-3.2.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.21.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-model-builder-3.2.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/maven-aether-provider-3.2.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions de.dentrassi.pm.external.maven/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
28 changes: 28 additions & 0 deletions de.dentrassi.pm.external.maven/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.dentrassi.pm.external.maven</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false
33 changes: 33 additions & 0 deletions de.dentrassi.pm.external.maven/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Maven Wrapper Bundle
Bundle-SymbolicName: de.dentrassi.pm.external.maven
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Jens Reimann
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/maven-aether-provider-3.2.5.jar,
lib/maven-model-builder-3.2.5.jar,
lib/plexus-utils-3.0.21.jar,
lib/maven-model-3.2.5.jar,
lib/plexus-interpolation-1.22.jar
Export-Package: org.apache.maven.repository.internal;version="3.2.5";
uses:="org.apache.maven.model.building,
org.eclipse.aether.spi.log,
com.google.common.base,
org.eclipse.aether.artifact,
org.apache.maven.model,
org.eclipse.aether.spi.locator,
org.apache.maven.model.resolution,
org.eclipse.aether.deployment,
org.apache.maven.artifact.repository.metadata,
com.google.inject,
org.eclipse.aether.resolution,
org.eclipse.aether,
org.eclipse.aether.installation,
org.eclipse.aether.impl,
org.eclipse.aether.repository,
org.eclipse.aether.metadata"
Require-Bundle: org.eclipse.aether.api;bundle-version="1.0.1",
org.eclipse.aether.impl;bundle-version="1.0.1",
org.eclipse.aether.spi;bundle-version="1.0.1",
org.eclipse.aether.util;bundle-version="1.0.1"
4 changes: 4 additions & 0 deletions de.dentrassi.pm.external.maven/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin.includes = META-INF/,\
lib/,\
lib/maven-model-3.2.5.jar,\
lib/plexus-interpolation-1.22.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
16 changes: 16 additions & 0 deletions de.dentrassi.pm.external.maven/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>de.dentrassi.package.drone</groupId>
<artifactId>parent</artifactId>
<version>0.1.5-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>

<artifactId>de.dentrassi.pm.external.maven</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
68 changes: 68 additions & 0 deletions de.dentrassi.pm.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -941,4 +941,72 @@
version="0.0.0"
unpack="false"/>

<plugin
id="de.dentrassi.pm.external.maven"
download-size="0"
install-size="0"
version="0.0.0"/>

<plugin
id="de.dentrassi.pm.importer.aether"
download-size="0"
install-size="0"
version="0.0.0"/>

<plugin
id="org.eclipse.aether.api"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.connector.basic"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.impl"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.spi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.transport.classpath"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.transport.file"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.transport.http"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.aether.util"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
13 changes: 13 additions & 0 deletions de.dentrassi.pm.importer.aether/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions de.dentrassi.pm.importer.aether/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
65 changes: 65 additions & 0 deletions de.dentrassi.pm.importer.aether/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.dentrassi.pm.importer.aether</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<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>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
<linkedResources>
<link>
<name>WEB-INF/tags/main</name>
<type>2</type>
<locationURI>MAIN_TAGS_LOC</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>MAIN_TAGS_LOC</name>
<value>$%7BPARENT-1-PROJECT_LOC%7D/de.dentrassi.pm.common.web/WEB-INF/tags/main</value>
</variable>
</variableList>
</projectDescription>
12 changes: 12 additions & 0 deletions de.dentrassi.pm.importer.aether/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="de.dentrassi.pm.importer.aether">
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="de.dentrassi.pm.importer.aether"/>
<property name="java-output-path" value="/de.dentrassi.pm.importer.aether/bin"/>
</wb-module>
</project-modules>
Loading

0 comments on commit f16df4e

Please sign in to comment.