Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cazenave
Pastis Vitamui
Commits
26b1d422
Commit
26b1d422
authored
Apr 21, 2020
by
cazenave
Browse files
correction dependances log4j Ok
parent
fec12b22
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
ui/ui-pastis/pom.xml
View file @
26b1d422
...
...
@@ -4,7 +4,7 @@
<packaging>
war
</packaging>
<url>
http://maven.apache.org
</url>
<artifactId>
rest-api
</artifactId>
<artifactId>
ui-pastis
</artifactId>
<name>
PASTIS-API
</name>
<parent>
...
...
@@ -53,13 +53,6 @@
<groupId>
fr.gouv.vitamui
</groupId>
<artifactId>
iam-external-client
</artifactId>
</dependency>
<dependency>
<groupId>
fr.gouv.vitamui
</groupId>
<artifactId>
ui-frontend
</artifactId>
<scope>
provided
</scope>
<type>
pom
</type>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
fr.gouv.vitamui
</groupId>
<artifactId>
ui-frontend
</artifactId>
...
...
@@ -137,7 +130,6 @@
<artifactId>
maven-jaxb2-plugin
</artifactId>
<version>
0.14.0
</version>
</dependency>
<dependency>
<groupId>
javax.json
</groupId>
<artifactId>
javax.json-api
</artifactId>
...
...
@@ -168,21 +160,6 @@
<artifactId>
resteasy-jaxrs
</artifactId>
<version>
3.9.0.Final
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-web
</artifactId>
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-slf4j-impl
</artifactId>
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
...
...
@@ -379,16 +356,104 @@
</build>
<profiles>
<profile>
<id>
dev
</id>
<properties>
<spring.profiles.active>
dev
</spring.profiles.active>
</properties>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
</profiles>
<profiles>
<profile>
<id>
dev
</id>
<build>
<!-- Start of development plugins -->
<plugins>
<!-- Read the config.properties files with the properties plug-in -->
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
properties-maven-plugin
</artifactId>
<version>
1.0-alpha-2
</version>
<executions>
<execution>
<phase>
initialize
</phase>
<goals>
<goal>
read-project-properties
</goal>
</goals>
<configuration>
<files>
<file>
${project.basedir}/src/main/resources/config.properties
</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<!-- Jetty maven plugin -->
<plugin>
<groupId>
org.eclipse.jetty
</groupId>
<artifactId>
jetty-maven-plugin
</artifactId>
<version>
9.4.12.v20180830
</version>
<configuration>
<scanIntervalSeconds>
10
</scanIntervalSeconds>
<jettyXml>
jetty-dev.xml,jetty-web.xml
</jettyXml>
</configuration>
</plugin>
<!-- Create folder for .rng files on server -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.6
</version>
<configuration>
<warName>
${war.dev.filename}
</warName>
</configuration>
</plugin>
<!-- Jsonix plugin -->
<plugin>
<groupId>
org.jvnet.jaxb2.maven2
</groupId>
<artifactId>
maven-jaxb2-plugin
</artifactId>
<version>
0.14.0
</version>
<executions>
<execution>
<goals>
<goal>
generate
</goal>
</goals>
<configuration>
<extension>
true
</extension>
<args>
<arg>
-Xjsonix
</arg>
<arg>
-Xjsonix-compact
</arg>
</args>
<plugins>
<plugin>
<groupId>
org.hisrc.jsonix
</groupId>
<artifactId>
jsonix-schema-compiler
</artifactId>
<version>
2.3.9
</version>
</plugin>
</plugins>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<!-- Tests -->
<testResources>
<testResource>
<directory>
${project.basedir}/src/test/resources
</directory>
</testResource>
</testResources>
<finalName>
${war.dev.filename}
</finalName>
</build>
</profile>
</profiles>
</project>
ui/ui-pastis/run.sh
View file @
26b1d422
...
...
@@ -7,4 +7,4 @@ cp -r src/main/config target/src/main/config
#retrieve version
version
=
"
$(
grep
-oP
'(?<=>).*?(?=</version>)'
pom.xml |
grep
-v
'version'
)
"
./target/ui-pastis-
$(
echo
$version
)
.
j
ar
-Xms128m
-Xmx512m
--spring
.config.additional-location
=
file:src/main/config/ui-pastis-application-dev.yml
./target/ui-pastis-
$(
echo
$version
)
.
w
ar
-Xms128m
-Xmx512m
--spring
.config.additional-location
=
file:src/main/config/ui-pastis-application-dev.yml
ui/ui-pastis/src/main/conf/ui-pastis-application-dev.yml
→
ui/ui-pastis/src/main/conf
ig
/ui-pastis-application-dev.yml
View file @
26b1d422
...
...
@@ -9,14 +9,14 @@ spring:
enabled
:
false
register
:
false
ui-
identity
:
ui-
pastis
:
iam-external-client
:
server-host
:
localhost
server-port
:
8083
secure
:
true
ssl-configuration
:
keystore
:
key-path
:
src/main/config/ui-
identity
.jks
key-path
:
src/main/config/ui-
portal
.jks
key-password
:
jkspasswd
type
:
JKS
truststore
:
...
...
@@ -25,29 +25,27 @@ ui-identity:
hostname-verification
:
false
base-url
:
portal
:
"
https://dev.vitamui.com:4200"
admin-identity
:
"
https://dev.vitamui.com:4201/"
identity
:
"
https://dev.vitamui.com:4201/"
admin-identity
:
"
https://dev.vitamui.com:4201/
identity
"
identity
:
"
https://dev.vitamui.com:4201/
identity
"
server
:
host
:
dev.vitamui.com
port
:
9001
scheme
:
http
s
port
:
8080
scheme
:
http
ssl
:
key-store
:
src/main/config/ui-
identity
.jks
key-store
:
src/main/config/ui-
portal
.jks
key-store-password
:
jkspasswd
key-password
:
jkspasswd
servlet.session.cookie.path
:
/identity-api
management
:
server
:
address
:
localhost
port
:
9101
port
:
8888
ssl
:
enabled
:
false
ui
:
url
:
"
https://dev.vitamui.com:420
1
"
redirect-url
:
https://dev.vitamui.com:900
1
/${ui-prefix}
url
:
"
https://dev.vitamui.com:420
0
"
redirect-url
:
https://dev.vitamui.com:900
0
/${ui-prefix}
cas
:
internal-url
:
https://dev.vitamui.com:8080/cas
...
...
@@ -67,4 +65,4 @@ logging:
fr.gouv.vitamui
:
DEBUG
fr.gouv.vitamui.commons.rest.AbstractRestController
:
INFO
management.endpoints.web.exposure.include
:
"
*"
\ No newline at end of file
management.endpoints.web.exposure.include
:
"
*"
ui/ui-pastis/src/main/java/fr/cines/pac/ws/PastisRestApplication.java
View file @
26b1d422
...
...
@@ -33,6 +33,8 @@ import org.springframework.core.env.Environment;
import
javax.ws.rs.ApplicationPath
;
import
javax.ws.rs.core.Application
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
*
...
...
@@ -57,13 +59,13 @@ public class PastisRestApplication extends Application {
app
.
run
(
args
);
}
/**
public Set<Class<?>> getClasses( )
public
Set
<
Class
<?>>
getClasses
(
)
{
final
Set
<
Class
<?>>
returnValue
=
new
HashSet
<
Class
<?>>(
);
returnValue
.
add
(
PastisResource
.
class
);
return
returnValue
;
}
**/
/** La constante LOGGER. */
...
...
ui/ui-pastis/src/main/resources/ui-pastis-application.yml
View file @
26b1d422
# TECHNICAL PROPERTIES / DON'T put environment properties
# This property can be override by a config file give at run time with spring.config.location
spring
:
application
:
name
:
${server-identity.identityRole}
...
...
ui/ui-pastis/src/test/java/fr/cines/pac/ws/PastisResourceTest.java
deleted
100644 → 0
View file @
fec12b22
/*
* Copyright CINES Centre Informatique National de l'Enseignement Supérieur, 2017
* Tout droit d'utilisation strictement soumis à l'approbation du CINES
*/
package
fr.cines.pac.ws
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
javax.xml.bind.JAXBException
;
import
org.junit.Test
;
import
org.xml.sax.SAXException
;
import
org.xml.sax.XMLReader
;
import
org.xml.sax.helpers.XMLReaderFactory
;
import
fr.cines.pac.pastis.util.PastisGetPropertyValues
;
/**
* @author RACHID Sala <rachid@cines.fr>
*/
public
class
PastisResourceTest
{
@Test
public
void
testGetSAX2Handler
()
throws
FileNotFoundException
,
JAXBException
{
PastisSAX2Handler
handler
=
new
PastisSAX2Handler
();
PastisGetXmlJsonTree
getJson
=
new
PastisGetXmlJsonTree
();
try
{
XMLReader
xmlReader
=
XMLReaderFactory
.
createXMLReader
();
xmlReader
.
setContentHandler
(
handler
);
String
rngBaseFile
=
new
PastisGetPropertyValues
().
getTestPropValues
()
.
getProperty
(
"rng.base.file"
);
ClassLoader
loader
=
ClassLoader
.
getSystemClassLoader
();
if
(
null
!=
loader
.
getResource
(
rngBaseFile
)
&&
null
!=
loader
.
getResource
(
rngBaseFile
).
toURI
())
{
xmlReader
.
parse
(
loader
.
getResource
(
rngBaseFile
).
toURI
().
toString
());
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
SAXException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
getJson
.
getJsonParsedTreeTest
(
handler
.
elementRNGRoot
);
// ElementProperties e = handler.getJsonParsed();
// if(null != e && null != e.toString()) {
// System.out.println(e.toString());
// }
}
}
\ No newline at end of file
ui/ui-pastis/src/test/java/fr/cines/pac/ws/PastisUnmarshalingTest.java
deleted
100644 → 0
View file @
fec12b22
package
fr.cines.pac.ws
;
import
java.io.FileNotFoundException
;
import
java.io.InputStream
;
import
javax.xml.bind.JAXBContext
;
import
javax.xml.bind.JAXBException
;
import
javax.xml.bind.Unmarshaller
;
import
fr.cines.pac.pastis.jaxb.model.GrammarXML
;
import
fr.cines.pac.pastis.util.PastisGetPropertyValues
;
public
class
PastisUnmarshalingTest
{
//@JsonSerialize(using = RngSerialize.class)
//JSONObject jsonObject;
//@Test
public
void
testRng
()
throws
FileNotFoundException
{
try
{
JAXBContext
jaxbContext
=
JAXBContext
.
newInstance
(
GrammarXML
.
class
);
Unmarshaller
unmarshaller
=
jaxbContext
.
createUnmarshaller
();
String
rngFile
=
new
PastisGetPropertyValues
().
getPropValues
().
getProperty
(
"rng.base.file"
);
InputStream
os
=
getClass
().
getClassLoader
().
getResourceAsStream
(
rngFile
);
GrammarXML
grammar
=
(
GrammarXML
)
unmarshaller
.
unmarshal
(
os
);
//String publisher = grammar.toString();Grammar
//System.out.println("Rng : " + publisher);
}
catch
(
JAXBException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
//@Test
// public void parseRng() throws UnsupportedEncodingException, JsonProcessingException, JAXBException {
// try {
//
// // Init grammar unmarshaller
// JAXBContext jaxbContext = JAXBContext.newInstance(GrammarXML.class);
// Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
//
// // Get file
// String rngFile = new PastisGetPropertyValues().getPropValues().getProperty("rng.base.file");
// InputStream in = getClass().getClassLoader().getResourceAsStream(rngFile);
//
// // Umsharshall
// GrammarXML grammar = (GrammarXML) unmarshaller.unmarshal(in);
//
//
// // To string
// //BufferedReader br = new BufferedReader(new InputStreamReader(in ,"UTF-8"));
// //String dataString = br.lines().collect(Collectors.joining(System.lineSeparator()));
// //JSONObject xmlJSONObj = XML.toJSONObject(dataString);
// //String jsonPrettyPrintString = xmlJSONObj.toString(PRETTY_PRINT_INDENT_FACTOR);
// //System.out.println(xmlJSONObj);
// //System.out.println(jsonPrettyPrintString);
//
// //String jsonPrettyPrintString = jsonObject.toString(PRETTY_PRINT_INDENT_FACTOR);
// //System.out.println(jsonPrettyPrintString);
//
//
// // Test with custom serializer
//
// RngSerialize rngSerializer = new RngSerialize(GrammarXML.class);
// ObjectMapper objectMapper = new ObjectMapper();
// objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
//
// SimpleModule module = new SimpleModule("RngSerialize");
// module.addSerializer(GrammarXML.class, rngSerializer);
// objectMapper.registerModule(module);
//
// String grammarJson = objectMapper.writeValueAsString(grammar);
//
// System.out.println(grammarJson);
//
//
//
// } catch (JSONException je) {
// //System.out.println(je.toString());
// }
// }
}
ui/ui-pastis/src/test/resources/build.properties
deleted
100644 → 0
View file @
fec12b22
node.version
=
10.15.3
npm.version
=
6.4.1
rng.path
=
${user.home}/rng
\ No newline at end of file
ui/ui-pastis/src/test/resources/log4j2.xml
deleted
100644 → 0
View file @
fec12b22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<Configuration
status=
"info"
monitorInterval=
"10"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_OUT"
>
<PatternLayout
pattern=
"%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %X{DepositIdentifier} - %X{TransferingAgencyIdentifier} - %msg%n"
/>
<Filters>
<ThresholdFilter
level=
"WARN"
onMatch=
"ACCEPT"
/>
<ThresholdFilter
level=
"ERROR"
onMatch=
"ACCEPT"
/>
</Filters>
</Console>
</Appenders>
<Loggers>
<Logger
name=
"com"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"java"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"javax"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"org"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"net"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"org.irods.jargon.core"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Logger
name=
"fr.cines"
level=
"info"
additivity=
"false"
>
<AppenderRef
ref=
"Console"
/>
</Logger>
<Root
level=
"info"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
ui/ui-pastis/src/test/resources/prof3.rng
deleted
100644 → 0
View file @
fec12b22
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rng:grammar
xmlns:a=
"http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:rng=
"http://relaxng.org/ns/structure/1.0"
xmlns:seda=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
datatypeLibrary=
"http://www.w3.org/2001/XMLSchema-datatypes"
ns=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
>
<rng:start>
<rng:element
name=
"ArchiveTransfer"
>
<rng:optional>
<rng:attribute
name=
"id"
>
<rng:data
type=
"ID"
/>
</rng:attribute>
</rng:optional>
<rng:zeroOrMore>
<rng:element
name=
"ArchiveUnit"
>
<rng:attribute
name=
"id"
seda:profid=
"id294404"
>
<rng:data
type=
"ID"
/>
</rng:attribute>
<rng:element
name=
"ArchiveUnitRefId"
a:defaultValue=
"id386134"
>
<rng:data
type=
"NCName"
/>
</rng:element>
</rng:element>
</rng:zeroOrMore>
<!-- ArchiveTransfer / ArchivalAgency -->
<rng:element
name=
"ArchivalAgency"
>
<rng:element
name=
"Identifier"
>
<rng:value>
Identifier4
</rng:value>
</rng:element>
</rng:element>
<!-- ArchiveTransfer /TransferringAgency -->
<rng:element
name=
"TransferringAgency"
>
<rng:element
name=
"Identifier"
>
<rng:value>
Identifier5
</rng:value>
</rng:element>
</rng:element>
</rng:element>
</rng:start>
<rng:define
name=
"any_content"
>
<rng:interleave>
<rng:zeroOrMore>
<rng:ref
name=
"any_element"
/>
</rng:zeroOrMore>
<rng:text/>
</rng:interleave>
</rng:define>
<rng:define
name=
"any_element"
>
<rng:element>
<rng:anyName/>
<rng:ref
name=
"any_attributes"
/>
<rng:zeroOrMore>
<rng:ref
name=
"any_content"
/>
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:define
name=
"any_attributes"
>
<rng:zeroOrMore>
<rng:attribute>
<rng:anyName/>
</rng:attribute>
</rng:zeroOrMore>
</rng:define>
<rng:define
name=
"OpenType"
>
<rng:zeroOrMore>
<rng:element>
<rng:anyName/>
<rng:zeroOrMore>
<rng:attribute>
<rng:anyName/>
</rng:attribute>
</rng:zeroOrMore>
</rng:element>
</rng:zeroOrMore>
</rng:define>
</rng:grammar>
ui/ui-pastis/src/test/resources/prof3.xml
deleted
100644 → 0
View file @
fec12b22
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rng:grammar
xmlns:a=
"http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:rng=
"http://relaxng.org/ns/structure/1.0"
xmlns:seda=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
datatypeLibrary=
"http://www.w3.org/2001/XMLSchema-datatypes"
ns=
"fr:gouv:culture:archivesdefrance:seda:v2.1"
>
<rng:start>
<rng:element
name=
"ArchiveTransfer"
>
<rng:optional>
<rng:attribute
name=
"id"
>
<rng:data
type=
"ID"
/>
</rng:attribute>
</rng:optional>
<rng:zeroOrMore>
<rng:element
name=
"ArchiveUnit"
>
<rng:attribute
name=
"id"
seda:profid=
"id294404"
>
<rng:data
type=
"ID"
/>
</rng:attribute>
<rng:element
name=
"ArchiveUnitRefId"
a:defaultValue=
"id386134"
>
<rng:data
type=
"NCName"
/>
</rng:element>
</rng:element>
</rng:zeroOrMore>
<!-- ArchiveTransfer / ArchivalAgency -->
<rng:element
name=
"ArchivalAgency"
>
<rng:element
name=
"Identifier"
>
<rng:value>
Identifier4
</rng:value>
</rng:element>
</rng:element>
<!-- ArchiveTransfer /TransferringAgency -->
<rng:element
name=
"TransferringAgency"
>
<rng:element
name=
"Identifier"
>
<rng:value>
Identifier5
</rng:value>
</rng:element>
</rng:element>
</rng:element>
</rng:start>
<rng:define
name=
"any_content"
>
<rng:interleave>
<rng:zeroOrMore>
<rng:ref
name=
"any_element"
/>
</rng:zeroOrMore>
<rng:text/>
</rng:interleave>
</rng:define>
<rng:define
name=
"any_element"
>
<rng:element>
<rng:anyName/>
<rng:ref
name=
"any_attributes"
/>
<rng:zeroOrMore>
<rng:ref
name=
"any_content"
/>
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:define
name=
"any_attributes"
>
<rng:zeroOrMore>
<rng:attribute>
<rng:anyName/>
</rng:attribute>
</rng:zeroOrMore>
</rng:define>